org.opensha.commons.calc
Class FractileCurveCalculator

java.lang.Object
  extended by org.opensha.commons.calc.FractileCurveCalculator

public class FractileCurveCalculator
extends Object

Title: FractileCurveCalculator

Description: This class calculates fractiles from a list of discretized functions (e.g., hazzard curves) and their relative weights

Copyright: Copyright (c) 2002

Company:

Version:
1.0
Author:
unascribed

Constructor Summary
FractileCurveCalculator(XY_DataSetList functionList, List<Double> relativeWts)
          Constructor : Calls the set function
 
Method Summary
 AbstractXY_DataSet getFractile(double fraction)
          This returns the fractile curve corresponding to the specified fraction
 AbstractXY_DataSet getMaximumCurve()
          This returns a curve with the maximum value among all the curves.
 AbstractXY_DataSet getMeanCurve()
          This computes the mean curve from the list of functions (and their associated weights).
 AbstractXY_DataSet getMinimumCurve()
          This returns a curve with the minimum value among all the curves.
 ArbitrarilyDiscretizedFunc getStdDev()
          This returns the fractile curve corresponding to the specified fraction
 void set(XY_DataSetList functionList, List<Double> relativeWts)
          It accepts the function list for curves and relative weight assigned to each curve.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FractileCurveCalculator

public FractileCurveCalculator(XY_DataSetList functionList,
                               List<Double> relativeWts)
Constructor : Calls the set function

Parameters:
functionList - : List of curves for which fractile needs to be calculated
relativeWts - : weight assigned to each curves. It expects the ArrayList to contain Double values
Method Detail

set

public void set(XY_DataSetList functionList,
                List<Double> relativeWts)
It accepts the function list for curves and relative weight assigned to each curve. It checks for following condition : 1. Number of weights = number of curves in list (i.e. functionList.size() = relativeWts.size() ) 2. Number of X values in all curves are same It makes following asssumption: X values for in the curves are same

Parameters:
functionList - : List of curves for which fractile needs to be calculated
relativeWts - : Weight assigned to each curve, stored as a Double objects in this array list in the same order as in the functionList. Note that these values do not have to be normalized (they don't have to sum to 1.0) - this normalization is taken care of internally.

getMeanCurve

public AbstractXY_DataSet getMeanCurve()
This computes the mean curve from the list of functions (and their associated weights). TODO this should use empiricalDists

Returns:

getMinimumCurve

public AbstractXY_DataSet getMinimumCurve()
This returns a curve with the minimum value among all the curves. TODO this should use empiricalDists

Returns:

getMaximumCurve

public AbstractXY_DataSet getMaximumCurve()
This returns a curve with the maximum value among all the curves. TODO this should use empiricalDists

Returns:

getStdDev

public ArbitrarilyDiscretizedFunc getStdDev()
This returns the fractile curve corresponding to the specified fraction

Parameters:
fraction -
Returns:

getFractile

public AbstractXY_DataSet getFractile(double fraction)
This returns the fractile curve corresponding to the specified fraction

Parameters:
fraction -
Returns: