Skip to content

Instantly share code, notes, and snippets.

@elliotpotts
Created May 11, 2016 15:09
Show Gist options
  • Save elliotpotts/a5a81c1a3f622abda3ec0943b2dc3e33 to your computer and use it in GitHub Desktop.
Save elliotpotts/a5a81c1a3f622abda3ec0943b2dc3e33 to your computer and use it in GitHub Desktop.
use std::vec;
enum DerivativeType {
Ordinary,
Partial
}
struct Classification {
order: i32,
linear: bool,
homogeneous: bool,
derivative: DerivativeType,
independentVariables: Vec<String>,
dependentVariables: Vec<String>
}
enum Expression {
Sum { augend: Expression, addend: Expression },
Difference { minuend: Expression, subtrahend: Expression },
Product { multiplier: Expression, multiplicand: Expression },
Quotient { numerator: Expression, denomenator: Expression },
Power { base: Expression, exponent: Expression }
}
struct Equation {
lhs: Expression,
rhs: Expression
}
fn classify(eqn: Equation) -> Classification {
let mut class = Classification {
order: 0,
linear: false,
homogeneous: false,
derivative: DerivativeType::Ordinary,
independentVariables: Vec::new(),
dependentVariables: Vec::new()
};
}
fn main() {
println!("Hello, world!1");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment