public class ErrorPropagator
extends java.lang.Object
Constructor and Description |
---|
ErrorPropagator(DifferentiableOperation baseOperation,
DifferentiableVariable... sourceVariables)
Constructor
|
Modifier and Type | Method and Description |
---|---|
static ErrorPropagator |
getInstance(DifferentiableOperation baseOperation,
DifferentiableVariable... sourceVariables)
Construct an instance of this class
|
double |
getSigma()
Calculate the operation standard error propagated from the default source variances
|
double |
getVariance()
Calculate the operation variance propagated from the default source variances
|
double |
getVarianceWithCommonSourceVariance(double sourceVariance)
Calculate the operation variance propagated from a common source variance.
|
double |
getVarianceWithSourceVariances(double... sourceVariances)
Calculate the operation variance propagated from the source variances.
|
void |
setCommonSourceSigma(double sigma)
Set a common sigma to use as the default for all source variables
|
void |
setCommonSourceVariance(double variance)
Set a common variance to use as the default for all source variables
|
void |
setSourceSigma(DifferentiableVariable sourceVariable,
double sigma)
Set the default standard deviation for the specified source variable
|
void |
setSourceVariance(DifferentiableVariable sourceVariable,
double variance)
Set the default variance for the specified source variable
|
void |
setSourceVariances(double... sourceVariances)
Set the default variances for the source variables
|
public ErrorPropagator(DifferentiableOperation baseOperation, DifferentiableVariable... sourceVariables)
baseOperation
- the operation for which the error propagation will be performedsourceVariables
- independent variables from which source errors are to be propagatedpublic static ErrorPropagator getInstance(DifferentiableOperation baseOperation, DifferentiableVariable... sourceVariables)
baseOperation
- the operation for which the error propagation will be performedsourceVariables
- independent variables from which source errors are to be propagatedpublic void setSourceVariance(DifferentiableVariable sourceVariable, double variance)
sourceVariable
- variable for which to assign the variancevariance
- the variance to assign the variablepublic void setSourceVariances(double... sourceVariances)
sourceVariances
- the variances to each source in the order they were specified in the constructorpublic void setCommonSourceVariance(double variance)
public void setCommonSourceSigma(double sigma)
public void setSourceSigma(DifferentiableVariable sourceVariable, double sigma)
sourceVariable
- variable for which to assign the variancesigma
- standard deviation to assign the variablepublic double getVariance()
public double getVarianceWithCommonSourceVariance(double sourceVariance)
public double getVarianceWithSourceVariances(double... sourceVariances)
public double getSigma()