public IResult Match(IGlycanPeak glycan, SortedDictionary <int, List <IPeak> > cluster) { List <SortedDictionary <int, IPeak> > clustered = Combinator(cluster); List <double> distr = glycan.GetDistrib(); double maxScore = -1; List <IPeak> bestPeaks = new List <IPeak>(); foreach (SortedDictionary <int, IPeak> sequence in clustered) { double score = Fit(distr, sequence); if (score >= maxScore) { maxScore = score; bestPeaks = sequence.Select(s => s.Value).ToList(); } } return(factory.Produce(glycan, maxScore, bestPeaks)); }
public IResult Produce(IGlycanPeak glycan, double score, List <IPeak> peaks) { return(new NGlycanResult(glycan, score, peaks)); }
public void SetGlycan(IGlycanPeak glycan) { this.glycan = glycan; }
public NGlycanResult(IGlycanPeak glycan, double score, List <IPeak> peaks) { this.glycan = glycan; this.score = score; this.peaks = peaks; }