The representation of a linear Expression that can be used to create a constraint.

Inheritance

Constructors

Expression(List<Term> terms, double constant)

Creates a new linear Expression using the given terms and constant.

Expression.fromExpression(Expression expr)

Creates a new linear Expression by copying the terms and constant of another expression.

Properties

constant double

The constant portion of this linear expression. This is just another Term with no Variable.

read-only
isConstant bool

read-only
terms List<Term>

The list of terms in this linear expression. Terms in a an Expression must have only one Variable (indeterminate) and a degree of 1.

read-only
value double

read-only
hashCode int

Get a hash code for this object.

read-only, inherited
runtimeType Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator *(EquationMember m) Expression

Creates a Expression by multiplying this member with the argument. Both members may need to be hoisted to expressions themselves before this can occur.

operator +(EquationMember m) Expression

Creates a Expression by adding this member with the argument. Both members may need to be hoisted to expressions themselves before this can occur.

operator -(EquationMember m) Expression

Creates a Expression by subtracting the argument from this member. Both members may need to be hoisted to expressions themselves before this can occur.

operator /(EquationMember m) Expression

Creates a Expression by dividing this member by the argument. Both members may need to be hoisted to expressions themselves before this can occur.

operator <=(EquationMember value) Constraint

Creates a Constraint by using this member as the left hand side expression and the argument as the right hand side Expression of a Constraint with a Relation.lessThanOrEqualTo relationship between the two.

operator >=(EquationMember value) Constraint

Creates a Constraint by using this member as the left hand side expression and the argument as the right hand side Expression of a Constraint with a Relation.greaterThanOrEqualTo relationship between the two.

operator ==(other) bool

The equality operator.

inherited

Methods

asExpression() Expression

The representation of this member after it is hoisted to be an expression.

equals(EquationMember value) Constraint

Creates a Constraint by using this member as the left hand side expression and the argument as the right hand side Expression of a Constraint with a Relation.equalTo relationship between the two.

toString() String

Returns a string representation of this object.

noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited