public interface RandomVariableArray extends RandomVariable
RandomVariable
objects, implementing the RandomVariable
interface.
The array features a method getLevel()
which indicates if the object is an array where elements are themselves arrays. See getLevel()
.
All methods inherited from RandomVariable
act element wise on the vector elements getElement(int) and return
corresponding RandomVariableArray having the same level.
In addition methods are provided that reduce the level by one, like the scalar product, see sumProduct(RandomVariableArray)
.Modifier and Type | Method and Description |
---|---|
default RandomVariableArray |
getConditionalExpectation(ConditionalExpectationEstimator conditionalExpectationOperator)
Returns the conditional expectation using a given conditional expectation estimator.
|
RandomVariable |
getElement(int index) |
default int |
getLevel()
Returns the level of the array
The level of the array is given by 1 if the elements are of type
RandomVariable but not of type RandomVariableArray . |
int |
getNumberOfElements() |
RandomVariableArray |
map(Function<RandomVariable,RandomVariable> operator)
Component wise operation
|
RandomVariable |
sumProduct(RandomVariableArray array)
Components wise product followed by sum of all elements.
|
default Object |
toDoubleArray() |
abs, accrue, add, add, addProduct, addProduct, addRatio, addSumProduct, addSumProduct, apply, apply, apply, average, bus, cache, cap, cap, choose, cos, discount, div, div, doubleValue, equals, exp, expm1, floor, floor, get, getAverage, getAverage, getFiltrationTime, getHistogram, getHistogram, getMax, getMin, getOperator, getQuantile, getQuantile, getQuantileExpectation, getRealizations, getRealizationsStream, getSampleVariance, getStandardDeviation, getStandardDeviation, getStandardError, getStandardError, getTypePriority, getValues, getVariance, getVariance, invert, isDeterministic, isNaN, log, mult, mult, pow, sin, size, sqrt, squared, sub, sub, subRatio, vid
int getNumberOfElements()
RandomVariable getElement(int index)
default int getLevel()
RandomVariable
but not of type RandomVariableArray
.
If the elements are of type RandomVariableArray
the level of this array is 1 plus the level of its elements.
Note: the elements are required to be of the the same level.default Object toDoubleArray()
RandomVariableArray map(Function<RandomVariable,RandomVariable> operator)
operator
- A function operator mapping random variables x → operator(x).RandomVariable sumProduct(RandomVariableArray array)
RandomVariable
but may be instanceof RandomVariableArray
.array
- Given RandomVariableArray
of the same size()default RandomVariableArray getConditionalExpectation(ConditionalExpectationEstimator conditionalExpectationOperator)
RandomVariable
getConditionalExpectation
in interface RandomVariable
conditionalExpectationOperator
- A given conditional expectation estimator.Copyright © 2020. All rights reserved.