protected bool Equals(DecimalMonomial other) { if (other == null) { return(false); } return(this.Value == other.Value && this.Degree == other.Degree); }
public void Add(DecimalMonomial monomial) { if (monomial.Degree > this.Degree) { this.Polynomials.Add(monomial); this.Normalize(); } else { this[monomial.Degree] = this[monomial.Degree] + monomial; } }
public DecimalPolynomial Multiply(DecimalMonomial monomial) { return(new DecimalPolynomial(this.Polynomials.Select(x => x * monomial).ToList())); }