Package jline.api.mam
Class Map_bernsteinKt
-
- All Implemented Interfaces:
public final class Map_bernsteinKt
-
-
Method Summary
Modifier and Type Method Description final static MatrixCellmap_bernstein(Function1<Double, Double> f, Integer n)Converts a distribution to a MAP via Bernstein polynomial approximation. -
-
Method Detail
-
map_bernstein
final static MatrixCell map_bernstein(Function1<Double, Double> f, Integer n)
Converts a distribution to a MAP via Bernstein polynomial approximation.
Uses the Bernstein approximation of order n to construct a MAP representation of a continuous distribution specified by its probability density function.
The caller should rescale the resulting MAP to the desired mean using map_scale.
- Parameters:
f- the probability density function as a lambda (Double) -> Doublen- the number of phases for the approximation (default: 20)- Returns:
a MatrixCell containing the MAP representation {D0, D1}
-
-
-
-