Show / Hide Table of Contents

    Class ConstantExpression

    A ConstantExpression only holds a double value but can be used as part of an expression

    Inheritance
    System.Object
    Expression
    ConstantExpression
    Inherited Members
    Expression.NonZeroTerms
    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 ConstantExpression : Expression

    Constructors

    ConstantExpression(Double)

    Initializes a new instance of the ConstantExpression class.

    Declaration
    public ConstantExpression(double value)
    Parameters
    Type Name Description
    System.Double value

    The value.

    Properties

    Constant

    Gets the constant.

    Declaration
    public override double Constant { get; }
    Property Value
    Type Description
    System.Double
    Overrides
    Expression.Constant

    ConstantValue

    Gets the constant.

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

    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

    IsLinear

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

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

    Always true because a ConstantExpression is always linear.

    Overrides
    Expression.IsLinear

    Terms

    Gets the terms.

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

    Always null because a ConstantExpression has no Terms.

    Overrides
    Expression.Terms

    Variables

    Gets the variables.

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

    Always null because a ConstantExpression has no Variables.

    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(ConstantExpression, Double)

    Implements the operator +.

    Declaration
    public static ConstantExpression operator +(ConstantExpression expression, double constant)
    Parameters
    Type Name Description
    ConstantExpression expression

    The expression.

    System.Double constant

    The constant.

    Returns
    Type Description
    ConstantExpression

    The result of the operator.

    Addition(Double, ConstantExpression)

    Implements the operator +.

    Declaration
    public static ConstantExpression operator +(double constant, ConstantExpression expression)
    Parameters
    Type Name Description
    System.Double constant

    The constant.

    ConstantExpression expression

    The expression.

    Returns
    Type Description
    ConstantExpression

    The result of the operator.

    Implicit(Double to ConstantExpression)

    Performs an implicit conversion from System.Double to ConstantExpression.

    Declaration
    public static implicit operator ConstantExpression(double value)
    Parameters
    Type Name Description
    System.Double value

    The value.

    Returns
    Type Description
    ConstantExpression

    The result of the conversion.

    Implicit(Int32 to ConstantExpression)

    Performs an implicit conversion from System.Int32 to ConstantExpression.

    Declaration
    public static implicit operator ConstantExpression(int value)
    Parameters
    Type Name Description
    System.Int32 value

    The value.

    Returns
    Type Description
    ConstantExpression

    The result of the conversion.

    Multiply(ConstantExpression, Double)

    Implements the operator *.

    Declaration
    public static ConstantExpression operator *(ConstantExpression expression, double factor)
    Parameters
    Type Name Description
    ConstantExpression expression

    The expression.

    System.Double factor

    The factor.

    Returns
    Type Description
    ConstantExpression

    The result of the operator.

    Multiply(Double, ConstantExpression)

    Implements the operator *.

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

    The factor.

    ConstantExpression expression

    The constant expression.

    Returns
    Type Description
    ConstantExpression

    A new ConstantExpression.

    Subtraction(ConstantExpression, Double)

    Implements the operator +.

    Declaration
    public static ConstantExpression operator -(ConstantExpression expression, double constant)
    Parameters
    Type Name Description
    ConstantExpression expression

    The expression.

    System.Double constant

    The constant.

    Returns
    Type Description
    ConstantExpression

    The result of the operator.

    Subtraction(Double, ConstantExpression)

    Implements the operator -.

    Declaration
    public static ConstantExpression operator -(double constant, ConstantExpression expression)
    Parameters
    Type Name Description
    System.Double constant

    The constant.

    ConstantExpression expression

    The expression.

    Returns
    Type Description
    ConstantExpression

    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