public Monom(KindOfMonom Monom, double ParamaterA, double ParamaterB) { if (Monom != KindOfMonom.Constant) { a = ParamaterA; b = ParamaterB; } else { c = ParamaterA; } monom = Monom; }
public Monom(KindOfMonom ThisKindOfMonom, double ParamaterA, double ParamaterB) { if (ThisKindOfMonom != KindOfMonom.Constant) { mA = ParamaterA; mB = ParamaterB; _a = DoubleToInt(ParamaterA); _b = DoubleToInt(ParamaterB); } else { mC = DoubleToInt(ParamaterA); _c = DoubleToInt(ParamaterA); } this.ThisKindOfMonom = ThisKindOfMonom; }
public void Interpolate(List <Point> Points, KindOfMonom Monoms, bool MustBeCorrect) { if (MustBeCorrect) { CheckIfOneCanInterpolate(Points); } if (Monoms == KindOfMonom.Constant) { throw new Exception("One can't interpolate array of points only with constants, one can but it wont be good... don't select constants, pls, select line it's good, or sine"); } List <KindOfMonom> Monomz = new List <KindOfMonom>(Points.Count); Monomz.Add(KindOfMonom.Constant); for (int i = 1; i < Points.Count; i++) { Monomz.Add(Monoms); } Interpolate(Points, Monomz); }
public Monom(double Constant) { monom = KindOfMonom.Constant; }
public void Interpolate(List <Point> Points, KindOfMonom Monoms) { Interpolate(Points, Monoms, false); }