Package jsl.utilities.random.arta
Class ARTACorrelationFinder
- java.lang.Object
-
- jsl.utilities.random.arta.ARTACorrelationEvaluator
-
- jsl.utilities.random.arta.ARTACorrelationFinder
-
public class ARTACorrelationFinder extends ARTACorrelationEvaluator
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
ARTACorrelationFinder.CorrFunction
-
Field Summary
Fields Modifier and Type Field Description double
DEFAULT_DELTA
static double
DEFAULT_HWBOUND
static int
DEFAULT_INITIAL_PTS
protected ARTACorrelationFinder.CorrFunction
myCorrFunction
protected double
myDelta
protected double
myDesiredCorrelation
protected double
myHWBound
protected int
myInitialPoints
protected Interval
myInterval
protected double
myLRho
protected double
myMatchingCorrelation
protected StochasticApproximationRootFinder
mySARootFinder
protected double
myURho
-
Fields inherited from class jsl.utilities.random.arta.ARTACorrelationEvaluator
myAntitheticFlag, myCorrelatedRng, myDistribution, myLag1Stat, myNumReps, mySampleSize, mySampleStat
-
-
Constructor Summary
Constructors Constructor Description ARTACorrelationFinder(RVariableIfc distribution)
ARTACorrelationFinder(RVariableIfc distribution, double lag1)
ARTACorrelationFinder(RVariableIfc distribution, double lag1, int sampleSize)
ARTACorrelationFinder(RVariableIfc distribution, double lag1, int sampleSize, int numReps)
ARTACorrelationFinder(RVariableIfc distribution, double lag1, int sampleSize, int numReps, boolean antitheticFlag)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkMatchingCorrelation(double desiredCorrelation)
double
findMatchingCorrelation()
Interval
getCorrelationInterval()
double
getDesiredCorrelation()
double
getDesiredPrecision()
double
getMatchingCorrelation()
double
getStoppingCriteria()
static void
main(java.lang.String[] args)
double
recommendInitialPoint(int n)
void
setDesiredPrecision(double prec)
void
setNumberOfPointsInInitialSearch(int n)
static void
test1()
static void
test2()
java.lang.String
toString()
Returns a String representationvoid
turnOnTimer(long milliseconds)
-
Methods inherited from class jsl.utilities.random.arta.ARTACorrelationEvaluator
estimateCorrelation, estimateCorrelation, estimateCorrelation, estimateCorrelation, estimateCorrelation, estimateCorrelation, getAntitheticFlag, getCorrelation, getLag1Statistics, getNumberOfReplications, getRandomVariable, getSampleSize, getSampleStatistics, sampleCorrelation, setAntitheticFlag, setCorrelation, setNumberOfReplications, setRandomVariable, setSampleSize
-
-
-
-
Field Detail
-
DEFAULT_HWBOUND
public static final double DEFAULT_HWBOUND
- See Also:
- Constant Field Values
-
DEFAULT_INITIAL_PTS
public static final int DEFAULT_INITIAL_PTS
- See Also:
- Constant Field Values
-
DEFAULT_DELTA
public final double DEFAULT_DELTA
- See Also:
- Constant Field Values
-
myDesiredCorrelation
protected double myDesiredCorrelation
-
myCorrFunction
protected ARTACorrelationFinder.CorrFunction myCorrFunction
-
mySARootFinder
protected StochasticApproximationRootFinder mySARootFinder
-
myMatchingCorrelation
protected double myMatchingCorrelation
-
myHWBound
protected double myHWBound
-
myDelta
protected double myDelta
-
myInitialPoints
protected int myInitialPoints
-
myInterval
protected Interval myInterval
-
myLRho
protected double myLRho
-
myURho
protected double myURho
-
-
Constructor Detail
-
ARTACorrelationFinder
public ARTACorrelationFinder(RVariableIfc distribution)
- Parameters:
distribution
- the distribution
-
ARTACorrelationFinder
public ARTACorrelationFinder(RVariableIfc distribution, double lag1)
- Parameters:
distribution
- the distributionlag1
- the desired lag
-
ARTACorrelationFinder
public ARTACorrelationFinder(RVariableIfc distribution, double lag1, int sampleSize)
- Parameters:
distribution
- the distributionlag1
- the desired lagsampleSize
- the sample size
-
ARTACorrelationFinder
public ARTACorrelationFinder(RVariableIfc distribution, double lag1, int sampleSize, int numReps)
- Parameters:
distribution
- the distributionlag1
- the desired lagsampleSize
- the sample sizenumReps
- the number of replications
-
ARTACorrelationFinder
public ARTACorrelationFinder(RVariableIfc distribution, double lag1, int sampleSize, int numReps, boolean antitheticFlag)
- Parameters:
distribution
- the distributionlag1
- the desired lagsampleSize
- the sample sizenumReps
- the number of replicationsantitheticFlag
- use antithetics flag
-
-
Method Detail
-
checkMatchingCorrelation
public boolean checkMatchingCorrelation(double desiredCorrelation)
-
getCorrelationInterval
public Interval getCorrelationInterval()
-
recommendInitialPoint
public double recommendInitialPoint(int n)
-
setNumberOfPointsInInitialSearch
public void setNumberOfPointsInInitialSearch(int n)
-
findMatchingCorrelation
public double findMatchingCorrelation()
-
getDesiredCorrelation
public double getDesiredCorrelation()
-
getMatchingCorrelation
public double getMatchingCorrelation()
-
toString
public java.lang.String toString()
Returns a String representation- Overrides:
toString
in classARTACorrelationEvaluator
- Returns:
- A String with basic results
-
turnOnTimer
public void turnOnTimer(long milliseconds)
-
getDesiredPrecision
public double getDesiredPrecision()
-
setDesiredPrecision
public void setDesiredPrecision(double prec)
-
getStoppingCriteria
public double getStoppingCriteria()
-
main
public static void main(java.lang.String[] args)
-
test1
public static void test1()
-
test2
public static void test2()
-
-