pub enum ExprKind {
Show 20 variants
Entity {
id: EntityIndex,
},
LineLineIntersection {
k: VarIndex,
l: VarIndex,
},
AveragePoint {
items: Vec<VarIndex>,
},
CircleCenter {
circle: VarIndex,
},
Sum {
plus: Vec<VarIndex>,
minus: Vec<VarIndex>,
},
Product {
times: Vec<VarIndex>,
by: Vec<VarIndex>,
},
Const {
value: ProcNum,
},
PartialPower {
value: VarIndex,
exponent: CompExponent,
},
PointPointDistance {
p: VarIndex,
q: VarIndex,
},
PointLineDistance {
point: VarIndex,
line: VarIndex,
},
ThreePointAngle {
p: VarIndex,
q: VarIndex,
r: VarIndex,
},
ThreePointAngleDir {
p: VarIndex,
q: VarIndex,
r: VarIndex,
},
TwoLineAngle {
k: VarIndex,
l: VarIndex,
},
PointX {
point: VarIndex,
},
PointY {
point: VarIndex,
},
PointPoint {
p: VarIndex,
q: VarIndex,
},
AngleBisector {
p: VarIndex,
q: VarIndex,
r: VarIndex,
},
ParallelThrough {
point: VarIndex,
line: VarIndex,
},
PerpendicularThrough {
point: VarIndex,
line: VarIndex,
},
ConstructCircle {
center: VarIndex,
radius: VarIndex,
},
}Expand description
A mathematical expression with a flattened memory model.
Variants§
Entity
An entity referece.
Fields
id: EntityIndexLineLineIntersection
An intersection of two lines: k and l
AveragePoint
The arithmetic mean of given point expressions
CircleCenter
Center of a circle.
Sum
Sum of numbers.
A normalized sum must be sorted and must not contain other sums or negations. An aggregated constant, if any, must be at the end.
Product
Product of numbers.
A normalized product must be sorted and must not contain other products. An aggregated constant, if any, must be at the end.
Const
A constant.
PartialPower
Raising a value to a power. Raises both parts of the number (real and imaginary) to the same power. This is NOT equivalent to exponentiating a complex.
PointPointDistance
A distance between two points.
PointLineDistance
A distance of a point from a line.
ThreePointAngle
An angle defined by three points (arm, origin, arm)
ThreePointAngleDir
A directed angle defined by three points (arm, origin, arm)
TwoLineAngle
The angle described by two lines.
PointX
The real part of a point.
PointY
The imaginary part of a point.
PointPoint
A line through two points.
AngleBisector
The angle bisector line.
ParallelThrough
A line parallel to another line going through a point
PerpendicularThrough
A line perpendicular to another line going through a point
ConstructCircle
A circle constructed from its center and radius.
Implementations§
Trait Implementations§
source§impl DeepClone for ExprKind
impl DeepClone for ExprKind
source§fn deep_clone(&self, arg0: &mut Math) -> Self
fn deep_clone(&self, arg0: &mut Math) -> Self
source§impl From<ExprKind> for ExpressionKind
impl From<ExprKind> for ExpressionKind
source§impl FromUnrolled<Circle> for ExprKind
impl FromUnrolled<Circle> for ExprKind
source§impl FromUnrolled<Line> for ExprKind
impl FromUnrolled<Line> for ExprKind
source§impl FromUnrolled<Point> for ExprKind
impl FromUnrolled<Point> for ExprKind
source§impl FromUnrolled<Scalar> for ExprKind
impl FromUnrolled<Scalar> for ExprKind
source§impl Ord for ExprKind
impl Ord for ExprKind
source§impl PartialOrd for ExprKind
impl PartialOrd for ExprKind
source§impl Reconstruct for ExprKind
impl Reconstruct for ExprKind
source§fn reconstruct(self, arg0: &mut ReconstructCtx<'_>) -> Self
fn reconstruct(self, arg0: &mut ReconstructCtx<'_>) -> Self
impl Eq for ExprKind
impl StructuralPartialEq for ExprKind
Auto Trait Implementations§
impl Freeze for ExprKind
impl RefUnwindSafe for ExprKind
impl Send for ExprKind
impl Sync for ExprKind
impl Unpin for ExprKind
impl UnwindSafe for ExprKind
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> CloneWithNode for Twhere
T: Clone,
impl<T> CloneWithNode for Twhere
T: Clone,
source§fn clone_with_node(&mut self) -> T
fn clone_with_node(&mut self) -> T
self and take its node.source§fn clone_without_node(&self) -> T
fn clone_without_node(&self) -> T
self without taking its node.source§impl<T> Convert for T
impl<T> Convert for T
source§fn convert<U>(self, context: &CompileContext) -> Expr<U>where
U: ConvertFrom<T>,
fn convert<U>(self, context: &CompileContext) -> Expr<U>where
U: ConvertFrom<T>,
self into a specific type. Read moresource§fn can_convert<U>(&self) -> boolwhere
U: ConvertFrom<T>,
fn can_convert<U>(&self) -> boolwhere
U: ConvertFrom<T>,
self can be converted into a specific type. Read more