/** * Adds a point to the sample. * Calling this method is equivalent to calling * {@code add(1.0, x, y)}. * * @param x Abscissa of the point. * @param y Observed value at {@code x}. After fitting we should * have {@code f(x)} as close as possible to this value. * * @see #add(double, double, double) * @see #add(WeightedObservedPoint) * @see #toList() */ public void add(double x, double y) { add(1d, x, y); }
/** * Adds a point to the sample. * Calling this method is equivalent to calling * {@code add(1.0, x, y)}. * * @param x Abscissa of the point. * @param y Observed value at {@code x}. After fitting we should * have {@code f(x)} as close as possible to this value. * * @see #add(double, double, double) * @see #add(WeightedObservedPoint) * @see #toList() */ public void add(double x, double y) { add(1d, x, y); }
/** * Adds a point to the sample. * Calling this method is equivalent to calling * {@code add(1.0, x, y)}. * * @param x Abscissa of the point. * @param y Observed value at {@code x}. After fitting we should * have {@code f(x)} as close as possible to this value. * * @see #add(double, double, double) * @see #add(WeightedObservedPoint) * @see #toList() */ public void add(double x, double y) { add(1d, x, y); }
WeightedObservedPoints points = new WeightedObservedPoints(); for(int i=0; i<x.length; i++) { points.add(x[i], y[i]);
WeightedObservedPoints points = new WeightedObservedPoints(); for(int i=0; i<x.length; i++) { points.add(x[i], y[i]);
points.add(x[i], y[i]);
points.add(x[i], y[i]);
obs.add(datapoint.mz, datapoint.intensity);
obs.add(datapoint.mz, datapoint.intensity);