Created
May 11, 2016 15:09
-
-
Save elliotpotts/a5a81c1a3f622abda3ec0943b2dc3e33 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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