Package jline.api.mam
Class Mmap_mixture_order2
java.lang.Object
jline.api.mam.Mmap_mixture_order2
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceFunctional callback used internally for weight-combination enumeration. -
Method Summary
Modifier and TypeMethodDescriptionstatic MatrixCellmmap_mixture_order2(List<MatrixCell> mmaps, double[] weights) Creates a second-order MMAP mixture from a collection of MMAPs.static Pair<MatrixCell, double[]> mmap_mixture_order2_optimal(List<MatrixCell> mmaps, double[] targetCharacteristics) Creates a second-order MMAP mixture with automatic weight selection.
-
Method Details
-
mmap_mixture_order2
Creates a second-order MMAP mixture from a collection of MMAPs. This function reduces higher-order MMAPs to order 2 and creates a mixture.- Parameters:
mmaps- List of MMAPs to mixweights- Mixing weights (must sum to 1)- Returns:
- Second-order MMAP mixture
-
mmap_mixture_order2_optimal
public static Pair<MatrixCell,double[]> mmap_mixture_order2_optimal(List<MatrixCell> mmaps, double[] targetCharacteristics) Creates a second-order MMAP mixture with automatic weight selection. Weights are chosen to minimize the approximation error.- Parameters:
mmaps- List of MMAPs to mixtargetCharacteristics- Target moments to match (M1, M2, M3)- Returns:
- Pair of (optimized mixture, optimal weights)
-