public class RandomVariableCudaWithFinalizer extends Object implements RandomVariable
RandomVariable is thread safe (and does not mutate the class).
This implementation uses floats for the realizations (consuming less memory compared to using doubles). However,
the calculation of the average is performed using double precision.| Modifier and Type | Field and Description |
|---|---|
static jcuda.driver.CUcontext |
context |
static jcuda.driver.CUdevice |
device |
| Constructor and Description |
|---|
RandomVariableCudaWithFinalizer(double value)
Create a non stochastic random variable, i.e.
|
RandomVariableCudaWithFinalizer(double time,
jcuda.driver.CUdeviceptr realizations,
long size) |
RandomVariableCudaWithFinalizer(double time,
double value)
Create a non stochastic random variable, i.e.
|
RandomVariableCudaWithFinalizer(double time,
double[] realisations)
Create a stochastic random variable.
|
RandomVariableCudaWithFinalizer(double time,
float[] realisations)
Create a stochastic random variable.
|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddSumProduct, addSumProduct, getConditionalExpectation, getValuespublic static final jcuda.driver.CUdevice device
public static final jcuda.driver.CUcontext context
public RandomVariableCudaWithFinalizer(double time,
jcuda.driver.CUdeviceptr realizations,
long size)
public RandomVariableCudaWithFinalizer(double value)
value - the value, a constant.public RandomVariableCudaWithFinalizer(double time,
double value)
time - the filtration time, set to 0.0 if not used.value - the value, a constant.public RandomVariableCudaWithFinalizer(double time,
float[] realisations)
time - the filtration time, set to 0.0 if not used.realisations - the vector of realizations.public RandomVariableCudaWithFinalizer(double time,
double[] realisations)
time - the filtration time, set to 0.0 if not used.realisations - the vector of realizations.public static jcuda.driver.CUdeviceptr getCUdeviceptr(long size)
protected void finalize()
throws Throwable
public boolean equals(RandomVariable randomVariable)
equals in interface RandomVariablepublic double getFiltrationTime()
getFiltrationTime in interface RandomVariablepublic int getTypePriority()
getTypePriority in interface RandomVariablepublic double get(int pathOrState)
get in interface RandomVariablepublic int size()
size in interface RandomVariablepublic double getMin()
getMin in interface RandomVariablepublic double getMax()
getMax in interface RandomVariablepublic double getAverage()
getAverage in interface RandomVariablepublic double getAverage(RandomVariable probabilities)
getAverage in interface RandomVariablepublic double getVariance()
getVariance in interface RandomVariablepublic double getVariance(RandomVariable probabilities)
getVariance in interface RandomVariablepublic double getSampleVariance()
getSampleVariance in interface RandomVariablepublic double getStandardDeviation()
getStandardDeviation in interface RandomVariablepublic double getStandardDeviation(RandomVariable probabilities)
getStandardDeviation in interface RandomVariablepublic double getStandardError()
getStandardError in interface RandomVariablepublic double getStandardError(RandomVariable probabilities)
getStandardError in interface RandomVariablepublic double getQuantile(double quantile)
getQuantile in interface RandomVariablepublic double getQuantile(double quantile,
RandomVariable probabilities)
getQuantile in interface RandomVariablepublic double getQuantileExpectation(double quantileStart,
double quantileEnd)
getQuantileExpectation in interface RandomVariablepublic double[] getHistogram(double[] intervalPoints)
getHistogram in interface RandomVariablepublic double[][] getHistogram(int numberOfPoints,
double standardDeviations)
getHistogram in interface RandomVariablepublic boolean isDeterministic()
isDeterministic in interface RandomVariablepublic RandomVariable expand(int numberOfPaths)
public RandomVariable cache()
cache in interface RandomVariablepublic double[] getRealizations()
getRealizations in interface RandomVariablepublic RandomVariable apply(DoubleUnaryOperator function)
apply in interface RandomVariablepublic RandomVariable apply(DoubleBinaryOperator operator, RandomVariable argument)
apply in interface RandomVariablepublic RandomVariable apply(DoubleTernaryOperator operator, RandomVariable argument1, RandomVariable argument2)
apply in interface RandomVariablepublic RandomVariable cap(double cap)
cap in interface RandomVariablepublic RandomVariable floor(double floor)
floor in interface RandomVariablepublic RandomVariable add(double value)
add in interface RandomVariablepublic RandomVariable sub(double value)
sub in interface RandomVariablepublic RandomVariable mult(double value)
mult in interface RandomVariablepublic RandomVariable div(double value)
div in interface RandomVariablepublic RandomVariable pow(double exponent)
pow in interface RandomVariablepublic RandomVariable squared()
squared in interface RandomVariablepublic RandomVariable sqrt()
sqrt in interface RandomVariablepublic RandomVariableCudaWithFinalizer exp()
exp in interface RandomVariablepublic RandomVariableCudaWithFinalizer log()
log in interface RandomVariablepublic RandomVariable sin()
sin in interface RandomVariablepublic RandomVariable cos()
cos in interface RandomVariablepublic RandomVariable add(RandomVariable randomVariable)
add in interface RandomVariablepublic RandomVariable sub(RandomVariable randomVariable)
sub in interface RandomVariablepublic RandomVariable mult(RandomVariable randomVariable)
mult in interface RandomVariablepublic RandomVariable div(RandomVariable randomVariable)
div in interface RandomVariablepublic RandomVariable invert()
invert in interface RandomVariablepublic RandomVariable abs()
abs in interface RandomVariablepublic RandomVariable cap(RandomVariable randomVariable)
cap in interface RandomVariablepublic RandomVariable floor(RandomVariable randomVariable)
floor in interface RandomVariablepublic RandomVariable accrue(RandomVariable rate, double periodLength)
accrue in interface RandomVariablepublic RandomVariable discount(RandomVariable rate, double periodLength)
discount in interface RandomVariablepublic Double doubleValue()
doubleValue in interface RandomVariablepublic IntToDoubleFunction getOperator()
getOperator in interface RandomVariablepublic DoubleStream getRealizationsStream()
getRealizationsStream in interface RandomVariablepublic RandomVariable average()
average in interface RandomVariablepublic RandomVariable bus(RandomVariable randomVariable)
bus in interface RandomVariablepublic RandomVariable vid(RandomVariable randomVariable)
vid in interface RandomVariablepublic RandomVariable choose(RandomVariable valueIfTriggerNonNegative, RandomVariable valueIfTriggerNegative)
choose in interface RandomVariablepublic RandomVariable addProduct(RandomVariable factor1, double factor2)
addProduct in interface RandomVariablepublic RandomVariable addProduct(RandomVariable factor1, RandomVariable factor2)
addProduct in interface RandomVariablepublic RandomVariable addRatio(RandomVariable numerator, RandomVariable denominator)
addRatio in interface RandomVariablepublic RandomVariable subRatio(RandomVariable numerator, RandomVariable denominator)
subRatio in interface RandomVariablepublic RandomVariable isNaN()
isNaN in interface RandomVariableCopyright © 2019. All rights reserved.