/// <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); }
/// <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); }