org.apache.commons.math3.optimization.fitting
Class GaussianFitterTest

java.lang.Object
  extended by org.apache.commons.math3.optimization.fitting.GaussianFitterTest

public class GaussianFitterTest
extends Object

Tests GaussianFitter.

Since:
2.2
Version:
$Id: GaussianFitterTest.java 1349707 2012-06-13 09:30:56Z erans $

Field Summary
protected static double[][] DATASET1
          Good data.
protected static double[][] DATASET2
          Poor data: right of peak not symmetric with left of peak.
protected static double[][] DATASET3
          Poor data: long tails.
protected static double[][] DATASET4
          Poor data: right of peak is missing.
protected static double[][] DATASET5
          Good data, but few points.
 
Constructor Summary
GaussianFitterTest()
           
 
Method Summary
protected static void addDatasetToGaussianFitter(double[][] points, GaussianFitter fitter)
          Adds the specified points to specified GaussianFitter instance.
 void testFit01()
          Basic.
 void testFit02()
          Zero points is not enough observed points.
 void testFit03()
          Two points is not enough observed points.
 void testFit04()
          Poor data: right of peak not symmetric with left of peak.
 void testFit05()
          Poor data: long tails.
 void testFit06()
          Poor data: right of peak is missing.
 void testFit07()
          Basic with smaller dataset.
 void testMath519()
           
 void testMath798()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATASET1

protected static final double[][] DATASET1
Good data.


DATASET2

protected static final double[][] DATASET2
Poor data: right of peak not symmetric with left of peak.


DATASET3

protected static final double[][] DATASET3
Poor data: long tails.


DATASET4

protected static final double[][] DATASET4
Poor data: right of peak is missing.


DATASET5

protected static final double[][] DATASET5
Good data, but few points.

Constructor Detail

GaussianFitterTest

public GaussianFitterTest()
Method Detail

testFit01

public void testFit01()
Basic.


testFit02

public void testFit02()
Zero points is not enough observed points.


testFit03

public void testFit03()
Two points is not enough observed points.


testFit04

public void testFit04()
Poor data: right of peak not symmetric with left of peak.


testFit05

public void testFit05()
Poor data: long tails.


testFit06

public void testFit06()
Poor data: right of peak is missing.


testFit07

public void testFit07()
Basic with smaller dataset.


testMath519

public void testMath519()

testMath798

public void testMath798()

addDatasetToGaussianFitter

protected static void addDatasetToGaussianFitter(double[][] points,
                                                 GaussianFitter fitter)
Adds the specified points to specified GaussianFitter instance.

Parameters:
points - data points where first dimension is a point index and second dimension is an array of length two representing the point with the first value corresponding to X and the second value corresponding to Y
fitter - fitter to which the points in points should be added as observed points


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.