public TPolynom Diff() { TPolynom newtpoly = new TPolynom(); foreach (TMember mem in this.Members) { newtpoly.Members.Add(new TMember(mem.FCoeff, mem.FDegree).Diff()); } return(newtpoly); }
public TPolynom Mul(TPolynom tp) { TPolynom newtpoly = new TPolynom(); foreach (TMember mem in tp.Members) { foreach (TMember newmem in this.Members) { newtpoly.Members.Add(new TMember(newmem.FCoeff * mem.FCoeff, newmem.FDegree + mem.FDegree)); } } return(newtpoly); }
public TPolynom Res(TPolynom tp) { TPolynom newtpoly = new TPolynom(); foreach (TMember mem in tp.Members) { newtpoly.Members.Add(new TMember(-mem.FCoeff, mem.FDegree)); } foreach (TMember mem in this.Members) { newtpoly.Members.Add(new TMember(mem.FCoeff, mem.FDegree)); } return(newtpoly); }