Package org.apache.commons.math.analysis.polynomials

Examples of org.apache.commons.math.analysis.polynomials.PolynomialFunction


      chart.setTitle(title);
      XYSeries s1 = new XYSeries("Aligned pairs");
      XYSeries s2 = new XYSeries("Non-aligned pairs");
      XYSeries s3 = new XYSeries("Model");

      PolynomialFunction function = getPolynomialFunction(data, linear);

      for (AlignStructMol point : data) {

        if (point.Aligned) {
          s1.add(point.row1.getPeaks()[0].getRT(),
              point.row2.getPeaks()[0].getRT());
        } else {
          s2.add(point.row1.getPeaks()[0].getRT(),
              point.row2.getPeaks()[0].getRT());
        }
        try {
          s3.add(function.value(point.row2.getPeaks()[0].getRT()),
              point.row2.getPeaks()[0].getRT());
        } catch (Exception e) {
        }
      }
View Full Code Here


    // Create a sorted set of scores matching
    TreeSet<RowVsRowScore> scoreSet = new TreeSet<RowVsRowScore>();

    // RANSAC algorithm
    List<AlignStructMol> list = ransacPeakLists(alignedPeakList, peakList);
    PolynomialFunction function = this.getPolynomialFunction(list);

    PeakListRow allRows[] = peakList.getRows();

    for (PeakListRow row : allRows) {
      // Calculate limits for a row with which the row can be aligned
      Range mzRange = mzTolerance.getToleranceRange(row.getAverageMZ());

      double rt;
      try {
        rt = function.value(row.getAverageRT());
      } catch (NullPointerException e) {
        rt = row.getAverageRT();
      }
      if (Double.isNaN(rt) || rt == -1) {
        rt = row.getAverageRT();
View Full Code Here

TOP

Related Classes of org.apache.commons.math.analysis.polynomials.PolynomialFunction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.