/// <summary> /// creates a new basis /// </summary> /// <param name="grd">the <see cref="GridData"/> that stores grid information</param> /// <param name="degree">highest polynomial degree of basis polynomials</param> public Basis(IGridData grd, int degree) { this.m_GridDat = grd; var PolyList = grd.ChefBasis.GetOrthonormalPolynomials(degree); this.Polynomials = PolyList.ToList <PolynomialList>().AsReadOnly(); this.IsOrthonormal = true; this.MinimalLength = Polynomials.Min(pl => pl.Count); this.MaximalLength = Polynomials.Max(pl => pl.Count); this.Degree = this.Polynomials.Max(pl => pl.MaxAbsoluteDegree); }