pub struct Term<T> {
pub variable: T,
pub coefficient: OrderedFloat<f64>,
}Expand description
A variable and a coefficient to multiply that variable by. This is a sub-expression in a constraint equation.
Fields§
§variable: T§coefficient: OrderedFloat<f64>Implementations§
Trait Implementations§
Source§impl<T> Add<Expression<T>> for Term<T>
impl<T> Add<Expression<T>> for Term<T>
Source§type Output = Expression<T>
type Output = Expression<T>
The resulting type after applying the
+ operator.Source§fn add(self, e: Expression<T>) -> Expression<T>
fn add(self, e: Expression<T>) -> Expression<T>
Performs the
+ operation. Read moreSource§impl<T> Add<Term<T>> for Expression<T>
impl<T> Add<Term<T>> for Expression<T>
Source§type Output = Expression<T>
type Output = Expression<T>
The resulting type after applying the
+ operator.Source§impl<T: Clone> Add<Term<T>> for f32
impl<T: Clone> Add<Term<T>> for f32
Source§type Output = Expression<T>
type Output = Expression<T>
The resulting type after applying the
+ operator.Source§impl<T: Clone> Add<Term<T>> for f64
impl<T: Clone> Add<Term<T>> for f64
Source§type Output = Expression<T>
type Output = Expression<T>
The resulting type after applying the
+ operator.Source§impl<T: Clone> Add<f32> for Term<T>
impl<T: Clone> Add<f32> for Term<T>
Source§type Output = Expression<T>
type Output = Expression<T>
The resulting type after applying the
+ operator.Source§impl<T: Clone> Add<f64> for Term<T>
impl<T: Clone> Add<f64> for Term<T>
Source§type Output = Expression<T>
type Output = Expression<T>
The resulting type after applying the
+ operator.Source§impl<T: Clone> Add for Term<T>
impl<T: Clone> Add for Term<T>
Source§type Output = Expression<T>
type Output = Expression<T>
The resulting type after applying the
+ operator.Source§impl<T> AddAssign<Term<T>> for Expression<T>
impl<T> AddAssign<Term<T>> for Expression<T>
Source§fn add_assign(&mut self, t: Term<T>)
fn add_assign(&mut self, t: Term<T>)
Performs the
+= operation. Read moreSource§impl<T> DivAssign<f32> for Term<T>
impl<T> DivAssign<f32> for Term<T>
Source§fn div_assign(&mut self, v: f32)
fn div_assign(&mut self, v: f32)
Performs the
/= operation. Read moreSource§impl<T> DivAssign<f64> for Term<T>
impl<T> DivAssign<f64> for Term<T>
Source§fn div_assign(&mut self, v: f64)
fn div_assign(&mut self, v: f64)
Performs the
/= operation. Read moreSource§impl<T: Clone> From<Term<T>> for Expression<T>
impl<T: Clone> From<Term<T>> for Expression<T>
Source§fn from(t: Term<T>) -> Expression<T>
fn from(t: Term<T>) -> Expression<T>
Converts to this type from the input type.
Source§impl<T> MulAssign<f32> for Term<T>
impl<T> MulAssign<f32> for Term<T>
Source§fn mul_assign(&mut self, v: f32)
fn mul_assign(&mut self, v: f32)
Performs the
*= operation. Read moreSource§impl<T> MulAssign<f64> for Term<T>
impl<T> MulAssign<f64> for Term<T>
Source§fn mul_assign(&mut self, v: f64)
fn mul_assign(&mut self, v: f64)
Performs the
*= operation. Read moreSource§impl<T: Clone> Sub<Expression<T>> for Term<T>
impl<T: Clone> Sub<Expression<T>> for Term<T>
Source§type Output = Expression<T>
type Output = Expression<T>
The resulting type after applying the
- operator.Source§fn sub(self, e: Expression<T>) -> Expression<T>
fn sub(self, e: Expression<T>) -> Expression<T>
Performs the
- operation. Read moreSource§impl<T> Sub<Term<T>> for Expression<T>
impl<T> Sub<Term<T>> for Expression<T>
Source§type Output = Expression<T>
type Output = Expression<T>
The resulting type after applying the
- operator.Source§impl<T: Clone> Sub<Term<T>> for f32
impl<T: Clone> Sub<Term<T>> for f32
Source§type Output = Expression<T>
type Output = Expression<T>
The resulting type after applying the
- operator.Source§impl<T: Clone> Sub<Term<T>> for f64
impl<T: Clone> Sub<Term<T>> for f64
Source§type Output = Expression<T>
type Output = Expression<T>
The resulting type after applying the
- operator.Source§impl<T: Clone> Sub<f32> for Term<T>
impl<T: Clone> Sub<f32> for Term<T>
Source§type Output = Expression<T>
type Output = Expression<T>
The resulting type after applying the
- operator.Source§impl<T: Clone> Sub<f64> for Term<T>
impl<T: Clone> Sub<f64> for Term<T>
Source§type Output = Expression<T>
type Output = Expression<T>
The resulting type after applying the
- operator.Source§impl<T: Clone> Sub for Term<T>
impl<T: Clone> Sub for Term<T>
Source§type Output = Expression<T>
type Output = Expression<T>
The resulting type after applying the
- operator.Source§impl<T> SubAssign<Term<T>> for Expression<T>
impl<T> SubAssign<Term<T>> for Expression<T>
Source§fn sub_assign(&mut self, t: Term<T>)
fn sub_assign(&mut self, t: Term<T>)
Performs the
-= operation. Read moreimpl<T: Copy> Copy for Term<T>
impl<T: Eq> Eq for Term<T>
impl<T> StructuralPartialEq for Term<T>
Auto Trait Implementations§
impl<T> Freeze for Term<T>where
T: Freeze,
impl<T> RefUnwindSafe for Term<T>where
T: RefUnwindSafe,
impl<T> Send for Term<T>where
T: Send,
impl<T> Sync for Term<T>where
T: Sync,
impl<T> Unpin for Term<T>where
T: Unpin,
impl<T> UnwindSafe for Term<T>where
T: UnwindSafe,
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
Mutably borrows from an owned value. Read more