Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 1.37 KB

TODO.md

File metadata and controls

41 lines (31 loc) · 1.37 KB
  • Crear clases NumberDecimalExpr => BigInteger _unscaledValue, int _scale

  • Crear otro function aparte Equals, Equivalent(equivalentes): e1= n+1 e2= 1+n Equals(e1,e2)=false Equivalent(e1,e2)=true

  • Number struct => class

  • Terms tiene que ser inmutables:

    • cambiar Term que isNegative sea inmtable
    • simply tiene que es inmutbale
  • TermItem: Como hacer negate TermItem, �Multiplicar Term: (1+x-x^2)*(-(x^3x^2))? �AddTerm como Item o todos sus Items? property readonly IsNegative new method Negate() modify bool Term.AddInternal(Term t)

  • public virtual void ToRactionalValues(ref SortedSet? n, ref SortedSet? d) poner parametro para aplicar signo (por defecto falso)

  • Terms o Exprs?

  • crear class UnitaryOperatorExpr, y NegateTerItem.ToExpr

  • Modificar clases Term para el operador UnitaryOperatorExpr Negative

  • Arreglar Expr equals como :

public override bool Equals(AlgExpr? other) => (other is NumberExpr e) && Equals(e);

public bool Equals(NumberExpr? other) => other != null && base.Equals(other) && Number.Equals(other.Number);

  • Arreglar Expr compare to como:

public override int CompareTo(AlgExpr? other) => (other is NumberExpr n) ? CompareTo(n) : base.CompareTo(other);

public int CompareTo(NumberExpr? other)
{
	if (other == null)
		return 1 - 0;

	var cmp = base.CompareTo(other);

	return (cmp == 0) ? Number.CompareTo(other.Number) : 0;
}