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 classARTACorrelationFinder.CorrFunction
-
Field Summary
Fields Modifier and Type Field Description doubleDEFAULT_DELTAstatic doubleDEFAULT_HWBOUNDstatic intDEFAULT_INITIAL_PTSprotected ARTACorrelationFinder.CorrFunctionmyCorrFunctionprotected doublemyDeltaprotected doublemyDesiredCorrelationprotected doublemyHWBoundprotected intmyInitialPointsprotected IntervalmyIntervalprotected doublemyLRhoprotected doublemyMatchingCorrelationprotected StochasticApproximationRootFindermySARootFinderprotected doublemyURho-
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 booleancheckMatchingCorrelation(double desiredCorrelation)doublefindMatchingCorrelation()IntervalgetCorrelationInterval()doublegetDesiredCorrelation()doublegetDesiredPrecision()doublegetMatchingCorrelation()doublegetStoppingCriteria()static voidmain(java.lang.String[] args)doublerecommendInitialPoint(int n)voidsetDesiredPrecision(double prec)voidsetNumberOfPointsInInitialSearch(int n)static voidtest1()static voidtest2()java.lang.StringtoString()Returns a String representationvoidturnOnTimer(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:
toStringin 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()
-
-