bb.science
Class DistributionFit

java.lang.Object
  extended by bb.science.DistributionFit
Direct Known Subclasses:
GaussianFit

public class DistributionFit
extends Object

Stores all information related to fitting of data samples to some statistical distribution.

Warning on all accessors: the field is directly returned, not a copy, so mutating the result invalidates this instance. So, only mutate the result if this instance will no longer be used.

This class is not multithread safe: while its immediate state is immutable, the deep state of its fields is not.

Author:
Brent Boyer

Field Summary
private  double[] bounds
           
private  String[] fitMeasureLabels
           
private  double[] fitMeasures
           
private  String[] paramLabels
           
private  double[] params
           
private  double[] pdfObserved
           
private  double[] pdfTheory
           
 
Constructor Summary
DistributionFit(String[] paramLabels, double[] params, String[] fitMeasureLabels, double[] fitMeasures, double[] bounds, double[] pdfObserved, double[] pdfTheory)
           
 
Method Summary
private  void append(String[] labels, double[] values, StringBuilder sb)
           
 double[] getBounds()
          Accessor for bounds.
 String[] getFitMeasureLabels()
          Accessor for fitMeasureLabels.
 double[] getFitMeasures()
          Accessor for fitMeasures.
 String[] getParamLabels()
          Accessor for paramLabels.
 double[] getParams()
          Accessor for params.
 double[] getPdfObserved()
          Accessor for pdfObserved.
 double[] getPdfTheory()
          Accessor for pdfTheory.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

paramLabels

private final String[] paramLabels

params

private final double[] params

fitMeasureLabels

private final String[] fitMeasureLabels

fitMeasures

private final double[] fitMeasures

bounds

private final double[] bounds

pdfObserved

private final double[] pdfObserved

pdfTheory

private final double[] pdfTheory
Constructor Detail

DistributionFit

public DistributionFit(String[] paramLabels,
                       double[] params,
                       String[] fitMeasureLabels,
                       double[] fitMeasures,
                       double[] bounds,
                       double[] pdfObserved,
                       double[] pdfTheory)
                throws IllegalArgumentException
Throws:
IllegalArgumentException
Method Detail

getParamLabels

public String[] getParamLabels()
Accessor for paramLabels.


getParams

public double[] getParams()
Accessor for params.


getFitMeasureLabels

public String[] getFitMeasureLabels()
Accessor for fitMeasureLabels.


getFitMeasures

public double[] getFitMeasures()
Accessor for fitMeasures.


getBounds

public double[] getBounds()
Accessor for bounds.


getPdfObserved

public double[] getPdfObserved()
Accessor for pdfObserved.


getPdfTheory

public double[] getPdfTheory()
Accessor for pdfTheory.


toString

public String toString()
Overrides:
toString in class Object

append

private void append(String[] labels,
                    double[] values,
                    StringBuilder sb)