Package jline.api.mam
Class Amap2_fit_gammaKt
-
- All Implemented Interfaces:
public final class Amap2_fit_gammaKt
-
-
Method Summary
Modifier and Type Method Description final static Pair<MatrixCell, List<MatrixCell>>
amap2_fit_gamma(Double M1, Double M2, Double M3, Double GAMMA)
Finds an AMAP(2) fitting the given characteristics. final static List<MatrixCell>
amap2_fitall_gamma(Double M1, Double M2, Double M3, Double GAMMA)
Finds all AMAP(2) solutions for given moments and correlation. final static MatrixCell
amap2_assemble(Double l1, Double l2, Double p1, Double p2, Integer form)
Returns an AMAP(2) with the given parameters. final static Triple<Double, Double, Double>
amap2_adjust_gamma(Double M1, Double M2, Double M3, Double GAMMA, DoubleArray weights, Integer method, Integer constraints)
Computes a feasible set of characteristics for the AMAP(2) that is as close as possible to the desired set of characteristics. -
-
Method Detail
-
amap2_fit_gamma
final static Pair<MatrixCell, List<MatrixCell>> amap2_fit_gamma(Double M1, Double M2, Double M3, Double GAMMA)
Finds an AMAP(2) fitting the given characteristics. This is a key component for MAMAP fitting algorithms.
- Parameters:
M1
- First moment of inter-arrival timesM2
- Second moment of inter-arrival timesM3
- Third moment of inter-arrival timesGAMMA
- Auto-correlation decay rate of inter-arrival times- Returns:
Pair of (best AMAP, all feasible AMAPs)
-
amap2_fitall_gamma
final static List<MatrixCell> amap2_fitall_gamma(Double M1, Double M2, Double M3, Double GAMMA)
Finds all AMAP(2) solutions for given moments and correlation. This function implements the complete algebraic solution for AMAP(2) parameters based on the exact MATLAB implementation.
- Parameters:
M1
- First momentM2
- Second momentM3
- Third momentGAMMA
- Auto-correlation decay rate- Returns:
List of feasible AMAP(2) solutions
-
amap2_assemble
final static MatrixCell amap2_assemble(Double l1, Double l2, Double p1, Double p2, Integer form)
Returns an AMAP(2) with the given parameters. Implements the exact MATLAB amap2_assemble function.
- Parameters:
l1
- Lambda 1 parameterl2
- Lambda 2 parameterp1
- Probability parameter 1p2
- Probability parameter 2form
- Form type (1 for gamma 0, 2 for gamma < 0)- Returns:
AMAP(2) as MatrixCell
-
amap2_adjust_gamma
final static Triple<Double, Double, Double> amap2_adjust_gamma(Double M1, Double M2, Double M3, Double GAMMA, DoubleArray weights, Integer method, Integer constraints)
Computes a feasible set of characteristics for the AMAP(2) that is as close as possible to the desired set of characteristics. This implements the complete MATLAB algorithm.
- Parameters:
M1
- First moment of the marginal distributionM2
- Second moment of the marginal distributionM3
- Third moment of the marginal distributionGAMMA
- Auto-correlation decay rateweights
- Optional weights for M2, M3, GAMMA (default: 10, 1, 10)method
- Method for adjustment (1-4, default: 3)constraints
- Constraint type (1: safe, 2: theoretical, default: 2)- Returns:
Triple of adjusted (M2, M3, GAMMA)
-
-
-
-