cassowary

Struct Term

Source
pub struct Term {
    pub variable: Variable,
    pub coefficient: f64,
}
Expand description

A variable and a coefficient to multiply that variable by. This is a sub-expression in a constraint equation.

Fields§

§variable: Variable§coefficient: f64

Trait Implementations§

Source§

impl Add<Expression> for Term

Source§

type Output = Expression

The resulting type after applying the + operator.
Source§

fn add(self, e: Expression) -> Expression

Performs the + operation. Read more
Source§

impl Add<Term> for Expression

Source§

type Output = Expression

The resulting type after applying the + operator.
Source§

fn add(self, t: Term) -> Expression

Performs the + operation. Read more
Source§

impl Add<Term> for Variable

Source§

type Output = Expression

The resulting type after applying the + operator.
Source§

fn add(self, t: Term) -> Expression

Performs the + operation. Read more
Source§

impl Add<Term> for f32

Source§

type Output = Expression

The resulting type after applying the + operator.
Source§

fn add(self, t: Term) -> Expression

Performs the + operation. Read more
Source§

impl Add<Term> for f64

Source§

type Output = Expression

The resulting type after applying the + operator.
Source§

fn add(self, t: Term) -> Expression

Performs the + operation. Read more
Source§

impl Add<Variable> for Term

Source§

type Output = Expression

The resulting type after applying the + operator.
Source§

fn add(self, v: Variable) -> Expression

Performs the + operation. Read more
Source§

impl Add<f32> for Term

Source§

type Output = Expression

The resulting type after applying the + operator.
Source§

fn add(self, v: f32) -> Expression

Performs the + operation. Read more
Source§

impl Add<f64> for Term

Source§

type Output = Expression

The resulting type after applying the + operator.
Source§

fn add(self, v: f64) -> Expression

Performs the + operation. Read more
Source§

impl Add for Term

Source§

type Output = Expression

The resulting type after applying the + operator.
Source§

fn add(self, t: Term) -> Expression

Performs the + operation. Read more
Source§

impl BitOr<Term> for PartialConstraint

Source§

type Output = Constraint

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Term) -> Constraint

Performs the | operation. Read more
Source§

impl BitOr<WeightedRelation> for Term

Source§

type Output = PartialConstraint

The resulting type after applying the | operator.
Source§

fn bitor(self, r: WeightedRelation) -> PartialConstraint

Performs the | operation. Read more
Source§

impl Clone for Term

Source§

fn clone(&self) -> Term

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Term

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Div<f32> for Term

Source§

type Output = Term

The resulting type after applying the / operator.
Source§

fn div(self, v: f32) -> Term

Performs the / operation. Read more
Source§

impl Div<f64> for Term

Source§

type Output = Term

The resulting type after applying the / operator.
Source§

fn div(self, v: f64) -> Term

Performs the / operation. Read more
Source§

impl From<Term> for Expression

Source§

fn from(t: Term) -> Expression

Converts to this type from the input type.
Source§

impl Mul<Term> for f32

Source§

type Output = Term

The resulting type after applying the * operator.
Source§

fn mul(self, t: Term) -> Term

Performs the * operation. Read more
Source§

impl Mul<Term> for f64

Source§

type Output = Term

The resulting type after applying the * operator.
Source§

fn mul(self, t: Term) -> Term

Performs the * operation. Read more
Source§

impl Mul<f32> for Term

Source§

type Output = Term

The resulting type after applying the * operator.
Source§

fn mul(self, v: f32) -> Term

Performs the * operation. Read more
Source§

impl Mul<f64> for Term

Source§

type Output = Term

The resulting type after applying the * operator.
Source§

fn mul(self, v: f64) -> Term

Performs the * operation. Read more
Source§

impl Neg for Term

Source§

type Output = Term

The resulting type after applying the - operator.
Source§

fn neg(self) -> Term

Performs the unary - operation. Read more
Source§

impl Sub<Expression> for Term

Source§

type Output = Expression

The resulting type after applying the - operator.
Source§

fn sub(self, e: Expression) -> Expression

Performs the - operation. Read more
Source§

impl Sub<Term> for Expression

Source§

type Output = Expression

The resulting type after applying the - operator.
Source§

fn sub(self, t: Term) -> Expression

Performs the - operation. Read more
Source§

impl Sub<Term> for Variable

Source§

type Output = Expression

The resulting type after applying the - operator.
Source§

fn sub(self, t: Term) -> Expression

Performs the - operation. Read more
Source§

impl Sub<Term> for f32

Source§

type Output = Expression

The resulting type after applying the - operator.
Source§

fn sub(self, t: Term) -> Expression

Performs the - operation. Read more
Source§

impl Sub<Term> for f64

Source§

type Output = Expression

The resulting type after applying the - operator.
Source§

fn sub(self, t: Term) -> Expression

Performs the - operation. Read more
Source§

impl Sub<Variable> for Term

Source§

type Output = Expression

The resulting type after applying the - operator.
Source§

fn sub(self, v: Variable) -> Expression

Performs the - operation. Read more
Source§

impl Sub<f32> for Term

Source§

type Output = Expression

The resulting type after applying the - operator.
Source§

fn sub(self, v: f32) -> Expression

Performs the - operation. Read more
Source§

impl Sub<f64> for Term

Source§

type Output = Expression

The resulting type after applying the - operator.
Source§

fn sub(self, v: f64) -> Expression

Performs the - operation. Read more
Source§

impl Sub for Term

Source§

type Output = Expression

The resulting type after applying the - operator.
Source§

fn sub(self, t: Term) -> Expression

Performs the - operation. Read more
Source§

impl Copy for Term

Auto Trait Implementations§

§

impl Freeze for Term

§

impl RefUnwindSafe for Term

§

impl Send for Term

§

impl Sync for Term

§

impl Unpin for Term

§

impl UnwindSafe for Term

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.