public class FuzzyCastToIntegerVertex extends ProbabilisticInteger
idGenerator
Constructor and Description |
---|
FuzzyCastToIntegerVertex(DoubleVertex input,
double fuzzinessSigma,
int min,
int max,
java.util.Random random) |
FuzzyCastToIntegerVertex(DoubleVertex input,
DoubleVertex fuzzinessSigma,
Vertex<java.lang.Integer> min,
Vertex<java.lang.Integer> max,
java.util.Random random)
Takes a double and casts it to an integer with a user definable level of fuzziness over the value cast to.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Double> |
dDensityAtValue()
This returns the derivative of the density function with respect to
any dependent vertices.
|
double |
density(java.lang.Integer value)
This is the value of the probability density at the supplied value.
|
java.util.Map<java.lang.String,java.lang.Double> |
dlnDensityAtValue()
This is the same as dDensityAtValue except for the log of the density.
|
java.lang.Integer |
sample() |
isProbabilistic, lazyEval, updateValue
abs, div, div, divideBy, divideBy, divideBy, lambda, minus, minus, minus, multiply, multiply, multiply, plus, plus, plus, times, times, unaryMinus
addChild, addParent, addParents, densityAtValue, equals, getChildren, getConnectedGraph, getId, getParents, getValue, hashCode, isObserved, logDensity, logDensityAtValue, observe, observeOwnValue, setAndCascade, setParents, setParents, setValue, unobserve, updateChildren
public FuzzyCastToIntegerVertex(DoubleVertex input, DoubleVertex fuzzinessSigma, Vertex<java.lang.Integer> min, Vertex<java.lang.Integer> max, java.util.Random random)
input
- fuzzinessSigma
- fuzziness is represented as a Gaussian distribution with mu of the input value and this sigma.min
- inclusivemax
- inclusiverandom
- public FuzzyCastToIntegerVertex(DoubleVertex input, double fuzzinessSigma, int min, int max, java.util.Random random)
public double density(java.lang.Integer value)
Vertex
public java.util.Map<java.lang.String,java.lang.Double> dDensityAtValue()
Vertex
dDensityAtValue
in class Vertex<java.lang.Integer>
public java.util.Map<java.lang.String,java.lang.Double> dlnDensityAtValue()
Vertex
dlog(P)/dx = (dP/dx)*(1/P(x))
dlnDensityAtValue
in class Vertex<java.lang.Integer>