Exemplo n.º 1
0
        /// <inheritdoc />
        public override bool Equals(object other)
        {
            if (this == other)
            {
                return(true);
            }
            if (other is LinearObjectiveFunction <T, TPolicy> )
            {
                var rhs = (LinearObjectiveFunction <T, TPolicy>)other;
                return(Policy.Equals(ConstantTerm, rhs.ConstantTerm) && Coefficients.Equals(rhs.Coefficients));
            }

            return(false);
        }
Exemplo n.º 2
0
 /// <inheritDoc/>
 public override bool Equals(object other)
 {
     if (this == other)
     {
         return(true);
     }
     if (other is LinearConstraint <T, TPolicy> )
     {
         var rhs = (LinearConstraint <T, TPolicy>)other;
         return(Relationship == rhs.Relationship && Policy.Equals(Value, rhs.Value) &&
                Coefficients.Equals(rhs.Coefficients));
     }
     return(false);
 }