Record Class MonteCarloSimulator.Estimate
java.lang.Object
java.lang.Record
com.quantfinlib.simulation.MonteCarloSimulator.Estimate
- Enclosing class:
MonteCarloSimulator
public static record MonteCarloSimulator.Estimate(double mean, double standardError, int samples)
extends Record
Monte Carlo estimate: mean, its standard error, and the number of independent samples.
-
Constructor Summary
ConstructorsConstructorDescriptionEstimate(double mean, double standardError, int samples) Creates an instance of aEstimaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doublemean()Returns the value of themeanrecord component.intsamples()Returns the value of thesamplesrecord component.doubleReturns the value of thestandardErrorrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Estimate
public Estimate(double mean, double standardError, int samples) Creates an instance of aEstimaterecord class.- Parameters:
mean- the value for themeanrecord componentstandardError- the value for thestandardErrorrecord componentsamples- the value for thesamplesrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
mean
public double mean()Returns the value of themeanrecord component.- Returns:
- the value of the
meanrecord component
-
standardError
public double standardError()Returns the value of thestandardErrorrecord component.- Returns:
- the value of the
standardErrorrecord component
-
samples
public int samples()Returns the value of thesamplesrecord component.- Returns:
- the value of the
samplesrecord component
-