Class LinearExpression<T>

  • All Implemented Interfaces:
    Iterable<Map.Entry<T,​Rational>>

    @Immutable(containerOf="T")
    public final class LinearExpression<T>
    extends Object
    implements Iterable<Map.Entry<T,​Rational>>
    Simple sparse implementation for homogeneous linear expression of the form $\Sigma a_i x_i$, where $x_i$ is a set of variables and $a_i$ is a set of constants.

    Every constant stored has to have a non-zero value.