コード例 #1
0
 public Monomial(Monomial from)
 {
     this.parser      = from.parser;
     this.coefficient = from.coefficient;
     this.variable    = from.variable;
     this.exponent    = from.exponent;
     this.expression  = parser.CombineStringExpression(this.coefficient, this.variable, this.exponent);
 }
コード例 #2
0
 public Monomial(decimal?coefficient, string variable, int?exponent, IExpressionParser parser)
 {
     this.parser      = parser;
     this.coefficient = coefficient ?? 1;
     this.variable    = variable?.Trim();
     this.exponent    = exponent;
     this.expression  = parser.CombineStringExpression(this.coefficient, this.variable, this.exponent);
 }