public Option <CoeficientInfo> GetCoeficientInfoByDegree(int degree) { var coeficients = Coeficients .Where(x => x.Degree == degree) .Select(x => x.Coeficient) .AsEnumerable(); if (!coeficients.Any()) { return(None.Value); } return(new CoeficientInfo(coeficients.Sum(), degree)); }
public IEnumerable <int> GetDegreeCollection() => Coeficients .Select(x => x.Degree) .Distinct() .OrderBy(x => x) .AsEnumerable();