Show / Hide Table of Contents

    Class Term

    A term represents a variable and a coefficient which belongs to this variable (e.g. 2*x). Note that Terms are immutable.

    Inheritance
    System.Object
    Expression
    Term
    Inherited Members
    Expression.NonZeroTerms
    Expression.Constant
    Expression.Evaluate(IDictionary<String, Double>)
    Expression._bigMUserValue
    Expression.BigM
    Expression.EmptyExpression
    Expression.Sum(IEnumerable<Expression>)
    Expression.Sum(IEnumerable<Double>)
    Expression.Sum(IEnumerable<Term>)
    Expression.Sum(IEnumerable<Variable>)
    Expression.Sum(Int32, Int32, Func<Int32, Expression>)
    Expression.Sum(Int32, Int32, Func<Int32, Term>)
    Expression.Minimum(IEnumerable<Expression>, Nullable<Double>)
    Expression.Maximum(IEnumerable<Expression>, Nullable<Double>)
    Expression.Absolute(Expression, Nullable<Double>)
    Expression.Floor(Expression, Nullable<Double>)
    Expression.Ceiling(Expression, Nullable<Double>)
    Expression.Normalize()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: OPTANO.Modeling.Optimization
    Assembly: Optimization.dll
    Syntax
    [DataContract]
    [Serializable]
    public class Term : Expression

    Constructors

    Term(Variable, Double)

    Initializes a new instance of the Term class.

    Declaration
    public Term(Variable variable, double factor = 1)
    Parameters
    Type Name Description
    Variable variable

    The variable.

    System.Double factor

    The constant.

    Exceptions
    Type Condition
    System.ArgumentNullException

    variable mustn't be null

    Properties

    ContainsAtMostOneVariable

    Declaration
    public override bool ContainsAtMostOneVariable { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    Expression.ContainsAtMostOneVariable

    ContainsNoVariables

    Declaration
    public override bool ContainsNoVariables { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    Expression.ContainsNoVariables

    Factor

    Gets the factor.

    Declaration
    public double Factor { get; }
    Property Value
    Type Description
    System.Double

    IsLinear

    Gets or sets a value indicating whether this instance is linear.

    Declaration
    public override bool IsLinear { get; }
    Property Value
    Type Description
    System.Boolean

    true if this instance is linear; otherwise, false.

    Overrides
    Expression.IsLinear

    Terms

    Gets the terms.

    Declaration
    public override IEnumerable<Term> Terms { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<Term>
    Overrides
    Expression.Terms

    Variable

    Gets the variable.

    Declaration
    public Variable Variable { get; }
    Property Value
    Type Description
    Variable

    Variables

    Gets the variables.

    Declaration
    public override IEnumerable<Variable> Variables { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<Variable>
    Overrides
    Expression.Variables

    Methods

    ToString()

    Returns a System.String that represents this instance.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    A System.String that represents this instance.

    Overrides
    System.Object.ToString()

    Operators

    Addition(Term, Term)

    Implements the operator +.

    Declaration
    public static Expression operator +(Term term, Term term2)
    Parameters
    Type Name Description
    Term term

    The first term.

    Term term2

    The second term.

    Returns
    Type Description
    Expression

    The result of the operator.

    Addition(Term, Variable)

    Implements the operator +.

    Declaration
    public static Expression operator +(Term term, Variable variable)
    Parameters
    Type Name Description
    Term term

    The term.

    Variable variable

    The variable.

    Returns
    Type Description
    Expression

    The result of the operator.

    Addition(Term, Double)

    Implements the operator +.

    Declaration
    public static Expression operator +(Term term, double constant)
    Parameters
    Type Name Description
    Term term

    The term.

    System.Double constant

    The constant.

    Returns
    Type Description
    Expression

    The result of the operator.

    Addition(Variable, Term)

    Implements the operator +.

    Declaration
    public static Expression operator +(Variable variable, Term term)
    Parameters
    Type Name Description
    Variable variable

    The variable.

    Term term

    The term.

    Returns
    Type Description
    Expression

    The result of the operator.

    Addition(Double, Term)

    Implements the operator +.

    Declaration
    public static Expression operator +(double constant, Term term)
    Parameters
    Type Name Description
    System.Double constant

    The constant.

    Term term

    The term.

    Returns
    Type Description
    Expression

    The result of the operator.

    Implicit(Variable to Term)

    Performs an implicit conversion from Variable to Term.

    Declaration
    public static implicit operator Term(Variable variable)
    Parameters
    Type Name Description
    Variable variable

    The variable.

    Returns
    Type Description
    Term

    The result of the conversion.

    Multiply(Term, Term)

    Implements the operator *.

    Declaration
    public static Expression operator *(Term term, Term term2)
    Parameters
    Type Name Description
    Term term

    The term.

    Term term2

    The term2.

    Returns
    Type Description
    Expression

    The result of the operator.

    Multiply(Term, Variable)

    Implements the operator *.

    Declaration
    public static Expression operator *(Term term, Variable variable)
    Parameters
    Type Name Description
    Term term

    The term.

    Variable variable

    The variable.

    Returns
    Type Description
    Expression

    The result of the operator.

    Multiply(Term, Double)

    Implements the operator *.

    Declaration
    public static Term operator *(Term term, double factor)
    Parameters
    Type Name Description
    Term term

    The term.

    System.Double factor

    The factor.

    Returns
    Type Description
    Term

    The result of the operator.

    Multiply(Variable, Term)

    Implements the operator *.

    Declaration
    public static Expression operator *(Variable variable, Term term)
    Parameters
    Type Name Description
    Variable variable

    The variable.

    Term term

    The term.

    Returns
    Type Description
    Expression

    The result of the operator.

    Multiply(Double, Term)

    Implements the operator *.

    Declaration
    public static Term operator *(double factor, Term term)
    Parameters
    Type Name Description
    System.Double factor

    The factor.

    Term term

    The term.

    Returns
    Type Description
    Term

    The result of the operator.

    Subtraction(Term, Term)

    Implements the operator -.

    Declaration
    public static Expression operator -(Term term, Term term2)
    Parameters
    Type Name Description
    Term term

    The term.

    Term term2

    The term2.

    Returns
    Type Description
    Expression

    The result of the operator.

    Subtraction(Term, Variable)

    Implements the operator -.

    Declaration
    public static Expression operator -(Term term, Variable variable)
    Parameters
    Type Name Description
    Term term

    The term.

    Variable variable

    The variable.

    Returns
    Type Description
    Expression

    The result of the operator.

    Subtraction(Term, Double)

    Implements the operator -.

    Declaration
    public static Expression operator -(Term term, double constant)
    Parameters
    Type Name Description
    Term term

    The term.

    System.Double constant

    The constant.

    Returns
    Type Description
    Expression

    The result of the operator.

    Subtraction(Variable, Term)

    Implements the operator -.

    Declaration
    public static Expression operator -(Variable variable, Term term)
    Parameters
    Type Name Description
    Variable variable

    The variable.

    Term term

    The term.

    Returns
    Type Description
    Expression

    The result of the operator.

    Subtraction(Double, Term)

    Implements the operator -.

    Declaration
    public static Expression operator -(double constant, Term term)
    Parameters
    Type Name Description
    System.Double constant

    The constant.

    Term term

    The term.

    Returns
    Type Description
    Expression

    The result of the operator.

    UnaryNegation(Term)

    Implements the operator -.

    Declaration
    public static Term operator -(Term term)
    Parameters
    Type Name Description
    Term term

    The term.

    Returns
    Type Description
    Term

    The result of the operator.

    Extension Methods

    ReflectionHelper.GetFieldValue(Object, String)
    ReflectionHelper.SetFieldValue(Object, String, Object)
    ExtensionMethods.Clone<T>(T)
    ExtensionMethods.ThrowIfArgumentIsNull<T>(T, String)
    Back to top Copyright © OPTANO GmbH generated with DocFX
    Privacy Policy | Impressum – Legal Notice