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
sourceimpl<T> Add<Expression<T>> for Term<T>
impl<T> Add<Expression<T>> for Term<T>
type Output = Expression<T>
type Output = Expression<T>
The resulting type after applying the +
operator.
sourcefn add(self, e: Expression<T>) -> Expression<T>
fn add(self, e: Expression<T>) -> Expression<T>
Performs the +
operation. Read more
sourceimpl<T> Add<Term<T>> for Expression<T>
impl<T> Add<Term<T>> for Expression<T>
type Output = Expression<T>
type Output = Expression<T>
The resulting type after applying the +
operator.
sourcefn add(self, t: Term<T>) -> Expression<T>
fn add(self, t: Term<T>) -> Expression<T>
Performs the +
operation. Read more
sourceimpl<T: Clone> Add<Term<T>> for Term<T>
impl<T: Clone> Add<Term<T>> for Term<T>
type Output = Expression<T>
type Output = Expression<T>
The resulting type after applying the +
operator.
sourcefn add(self, t: Term<T>) -> Expression<T>
fn add(self, t: Term<T>) -> Expression<T>
Performs the +
operation. Read more
sourceimpl<T: Clone> Add<Term<T>> for f32
impl<T: Clone> Add<Term<T>> for f32
type Output = Expression<T>
type Output = Expression<T>
The resulting type after applying the +
operator.
sourcefn add(self, t: Term<T>) -> Expression<T>
fn add(self, t: Term<T>) -> Expression<T>
Performs the +
operation. Read more
sourceimpl<T: Clone> Add<Term<T>> for f64
impl<T: Clone> Add<Term<T>> for f64
type Output = Expression<T>
type Output = Expression<T>
The resulting type after applying the +
operator.
sourcefn add(self, t: Term<T>) -> Expression<T>
fn add(self, t: Term<T>) -> Expression<T>
Performs the +
operation. Read more
sourceimpl Add<Term<Variable>> for Variable
impl Add<Term<Variable>> for Variable
type Output = Expression<Variable>
type Output = Expression<Variable>
The resulting type after applying the +
operator.
sourceimpl Add<Variable> for Term<Variable>
impl Add<Variable> for Term<Variable>
type Output = Expression<Variable>
type Output = Expression<Variable>
The resulting type after applying the +
operator.
sourceimpl<T: Clone> Add<f32> for Term<T>
impl<T: Clone> Add<f32> for Term<T>
type Output = Expression<T>
type Output = Expression<T>
The resulting type after applying the +
operator.
sourcefn add(self, v: f32) -> Expression<T>
fn add(self, v: f32) -> Expression<T>
Performs the +
operation. Read more
sourceimpl<T: Clone> Add<f64> for Term<T>
impl<T: Clone> Add<f64> for Term<T>
type Output = Expression<T>
type Output = Expression<T>
The resulting type after applying the +
operator.
sourcefn add(self, v: f64) -> Expression<T>
fn add(self, v: f64) -> Expression<T>
Performs the +
operation. Read more
sourceimpl<T> AddAssign<Term<T>> for Expression<T>
impl<T> AddAssign<Term<T>> for Expression<T>
sourcefn add_assign(&mut self, t: Term<T>)
fn add_assign(&mut self, t: Term<T>)
Performs the +=
operation. Read more
sourceimpl<T> DivAssign<f32> for Term<T>
impl<T> DivAssign<f32> for Term<T>
sourcefn div_assign(&mut self, v: f32)
fn div_assign(&mut self, v: f32)
Performs the /=
operation. Read more
sourceimpl<T> DivAssign<f64> for Term<T>
impl<T> DivAssign<f64> for Term<T>
sourcefn div_assign(&mut self, v: f64)
fn div_assign(&mut self, v: f64)
Performs the /=
operation. Read more
sourceimpl<T: Clone> From<Term<T>> for Expression<T>
impl<T: Clone> From<Term<T>> for Expression<T>
sourcefn from(t: Term<T>) -> Expression<T>
fn from(t: Term<T>) -> Expression<T>
Converts to this type from the input type.
sourceimpl<T> MulAssign<f32> for Term<T>
impl<T> MulAssign<f32> for Term<T>
sourcefn mul_assign(&mut self, v: f32)
fn mul_assign(&mut self, v: f32)
Performs the *=
operation. Read more
sourceimpl<T> MulAssign<f64> for Term<T>
impl<T> MulAssign<f64> for Term<T>
sourcefn mul_assign(&mut self, v: f64)
fn mul_assign(&mut self, v: f64)
Performs the *=
operation. Read more
sourceimpl<T: PartialEq> PartialEq<Term<T>> for Term<T>
impl<T: PartialEq> PartialEq<Term<T>> for Term<T>
sourceimpl<T: Clone> Sub<Expression<T>> for Term<T>
impl<T: Clone> Sub<Expression<T>> for Term<T>
type Output = Expression<T>
type Output = Expression<T>
The resulting type after applying the -
operator.
sourcefn sub(self, e: Expression<T>) -> Expression<T>
fn sub(self, e: Expression<T>) -> Expression<T>
Performs the -
operation. Read more
sourceimpl<T> Sub<Term<T>> for Expression<T>
impl<T> Sub<Term<T>> for Expression<T>
type Output = Expression<T>
type Output = Expression<T>
The resulting type after applying the -
operator.
sourcefn sub(self, t: Term<T>) -> Expression<T>
fn sub(self, t: Term<T>) -> Expression<T>
Performs the -
operation. Read more
sourceimpl<T: Clone> Sub<Term<T>> for Term<T>
impl<T: Clone> Sub<Term<T>> for Term<T>
type Output = Expression<T>
type Output = Expression<T>
The resulting type after applying the -
operator.
sourcefn sub(self, t: Term<T>) -> Expression<T>
fn sub(self, t: Term<T>) -> Expression<T>
Performs the -
operation. Read more
sourceimpl<T: Clone> Sub<Term<T>> for f32
impl<T: Clone> Sub<Term<T>> for f32
type Output = Expression<T>
type Output = Expression<T>
The resulting type after applying the -
operator.
sourcefn sub(self, t: Term<T>) -> Expression<T>
fn sub(self, t: Term<T>) -> Expression<T>
Performs the -
operation. Read more
sourceimpl<T: Clone> Sub<Term<T>> for f64
impl<T: Clone> Sub<Term<T>> for f64
type Output = Expression<T>
type Output = Expression<T>
The resulting type after applying the -
operator.
sourcefn sub(self, t: Term<T>) -> Expression<T>
fn sub(self, t: Term<T>) -> Expression<T>
Performs the -
operation. Read more
sourceimpl Sub<Term<Variable>> for Variable
impl Sub<Term<Variable>> for Variable
type Output = Expression<Variable>
type Output = Expression<Variable>
The resulting type after applying the -
operator.
sourceimpl Sub<Variable> for Term<Variable>
impl Sub<Variable> for Term<Variable>
type Output = Expression<Variable>
type Output = Expression<Variable>
The resulting type after applying the -
operator.
sourceimpl<T: Clone> Sub<f32> for Term<T>
impl<T: Clone> Sub<f32> for Term<T>
type Output = Expression<T>
type Output = Expression<T>
The resulting type after applying the -
operator.
sourcefn sub(self, v: f32) -> Expression<T>
fn sub(self, v: f32) -> Expression<T>
Performs the -
operation. Read more
sourceimpl<T: Clone> Sub<f64> for Term<T>
impl<T: Clone> Sub<f64> for Term<T>
type Output = Expression<T>
type Output = Expression<T>
The resulting type after applying the -
operator.
sourcefn sub(self, v: f64) -> Expression<T>
fn sub(self, v: f64) -> Expression<T>
Performs the -
operation. Read more
sourceimpl<T> SubAssign<Term<T>> for Expression<T>
impl<T> SubAssign<Term<T>> for Expression<T>
sourcefn sub_assign(&mut self, t: Term<T>)
fn sub_assign(&mut self, t: Term<T>)
Performs the -=
operation. Read more
impl<T: Copy> Copy for Term<T>
impl<T: Eq> Eq for Term<T>
impl<T> StructuralEq for Term<T>
impl<T> StructuralPartialEq for Term<T>
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more