Package jline.solvers.mam.lal
Class LalMamNum
java.lang.Object
jline.solvers.mam.lal.LalMamNum
Dense numeric helpers for the LAL matrix-analytic lowerings, on
double[][] so that every step is the numpy expression of the Python
solver_mam/lal_*.py modules.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic double[][]add(double[][] a, double[][] b) static voidaddInPlace(double[][] a, double[][] b) static int[][]adjacency(double[][] q) Adjacency lists of the positive off-diagonal entries of a dense matrix.static int[][]Adjacency lists from edge lists (self-loops kept, which do not affect SCCs).static booleanallclose(double[][] a, double[][] b, double rtol, double atol) numpy.allclose(a, b, rtol, atol).static booleanallclose(double[] a, double[] b, double rtol, double atol) static booleanallFinite(double[] a) static booleanallFinite(double[][] a) static double[][]Block-diagonal concatenation.static double[][]copy(double[][] a) static intcount(int[] comp) static doubledot(double[] a, double[] b) static double[][]eye(int n) static double[][][]static double[][][]fromCell(MatrixCell cell) static Stringg(double x) Pythonformat(x, 'g'): six significant digits, trailing zeros removed.static double[][]inv(double[][] a) Inverse via LU; throwsArithmeticExceptionwhen singular.static booleanirreducible(double[][] q) One strongly connected component over the positive off-diagonal entries.static booleanisclose(double a, double b, double rtol, double atol) numpy.isclose: NaN never equals NaN.static double[][]kron(double[][] a, double[][] b) static doublemaxAbs(double[] a) static doublemaxAbs(double[][] a) static doublemin(double[] a) static doublemin(double[][] a) static doubleminEigSym(double[][] a) Smallest eigenvalue of a symmetric matrix.static booleanmmapIsFeasible(double[][][] mmap) static booleanmmapIsFeasible(double[][][] mmap, double tol) Pythonmmap_isfeasible(mmap, tol).static double[][][]mmapNormalize(double[][][] mmap) Pythonmmap_normalizeon a [D0, D1, D11, ...] list (copies).static double[][][]mmapSuper(double[][][] a, double[][][] b) Pythonmmap_super(a, b, opt='default'), normalised.static double[][]mul(double[][] a, double[][] b) static double[]mv(double[][] a, double[] v) Matrix times column vector.static doublenormInf(double[][] a) Infinity norm (max absolute row sum).static double[][]qbdRLogred(double[][] b, double[][] l, double[][] f, int iterMax, double tol) Logarithmic reduction for the QBD rate matrix with an explicit tolerance (Pythonqbd_R_logred(B, L, F, iter_max, tol)); the JAR'sQbd_R_logredfixes the tolerance at 1e-12.static LineUnsupportedExceptionA refusal with idLINE:unsupported:<kind>.static LineUnsupportedExceptionstatic double[]rowSums(double[][] a) static longsatMul(long a, long b) Product of sizes, saturating atLong.MAX_VALUE.static double[][]scale(double[][] a, double s) static int[]scc(int[][] adj) Iterative Tarjan labelling of the strongly connected components.static double[]solve(double[][] a, double[] b) static double[][]solve(double[][] a, double[][] b) SolveA X = B; throwsArithmeticExceptionwhen singular.static doublespectralRadius(double[][] a) Largest eigenvalue modulus.static double[]stationaryGenerator(double[][] generator) Solve a uniquely stationary generator with scale-free balance rows (Pythonlal_qbd.stationary_generator).static double[][]sub(double[][] a, double[][] b) static doublesum(double[] a) static doublesum(double[][] a) static double[][]static MatrixCelltoCell(double[][][] mmap) static Matrix[]toMatrices(double[][][] mmap) static MatrixtoMatrix(double[][] a) static double[][]transpose(double[][] a) static booleanuniqueClosedClass(int[][] adj) Pythonunique_closed_class: exactly one closed communicating class.static double[]vm(double[] v, double[][] a) Row vector times matrix.static double[][]zeros(int n, int m)
-
Field Details
-
MIB
public static final long MIB- See Also:
-
-
Method Details
-
refuse
A refusal with idLINE:unsupported:<kind>. -
refuse
-
g
Pythonformat(x, 'g'): six significant digits, trailing zeros removed. -
zeros
public static double[][] zeros(int n, int m) -
eye
public static double[][] eye(int n) -
copy
public static double[][] copy(double[][] a) -
add
public static double[][] add(double[][] a, double[][] b) -
sub
public static double[][] sub(double[][] a, double[][] b) -
scale
public static double[][] scale(double[][] a, double s) -
addInPlace
public static void addInPlace(double[][] a, double[][] b) -
mul
public static double[][] mul(double[][] a, double[][] b) -
vm
public static double[] vm(double[] v, double[][] a) Row vector times matrix. -
mv
public static double[] mv(double[][] a, double[] v) Matrix times column vector. -
dot
public static double dot(double[] a, double[] b) -
sum
public static double sum(double[] a) -
sum
public static double sum(double[][] a) -
rowSums
public static double[] rowSums(double[][] a) -
transpose
public static double[][] transpose(double[][] a) -
kron
public static double[][] kron(double[][] a, double[][] b) -
maxAbs
public static double maxAbs(double[][] a) -
maxAbs
public static double maxAbs(double[] a) -
normInf
public static double normInf(double[][] a) Infinity norm (max absolute row sum). -
allFinite
public static boolean allFinite(double[][] a) -
allFinite
public static boolean allFinite(double[] a) -
min
public static double min(double[][] a) -
min
public static double min(double[] a) -
allclose
public static boolean allclose(double[][] a, double[][] b, double rtol, double atol) numpy.allclose(a, b, rtol, atol). -
allclose
public static boolean allclose(double[] a, double[] b, double rtol, double atol) -
isclose
public static boolean isclose(double a, double b, double rtol, double atol) numpy.isclose: NaN never equals NaN. -
solve
public static double[][] solve(double[][] a, double[][] b) SolveA X = B; throwsArithmeticExceptionwhen singular. -
solve
public static double[] solve(double[][] a, double[] b) -
inv
public static double[][] inv(double[][] a) Inverse via LU; throwsArithmeticExceptionwhen singular. -
stationaryGenerator
public static double[] stationaryGenerator(double[][] generator) Solve a uniquely stationary generator with scale-free balance rows (Pythonlal_qbd.stationary_generator). The generator is divided by its largest entry, each balance row is scaled by its own largest entry and the last row is replaced by the normalization. -
spectralRadius
public static double spectralRadius(double[][] a) Largest eigenvalue modulus. -
adjacency
public static int[][] adjacency(double[][] q) Adjacency lists of the positive off-diagonal entries of a dense matrix. -
adjacency
Adjacency lists from edge lists (self-loops kept, which do not affect SCCs). -
scc
public static int[] scc(int[][] adj) Iterative Tarjan labelling of the strongly connected components. -
count
public static int count(int[] comp) -
uniqueClosedClass
public static boolean uniqueClosedClass(int[][] adj) Pythonunique_closed_class: exactly one closed communicating class. -
irreducible
public static boolean irreducible(double[][] q) One strongly connected component over the positive off-diagonal entries. -
mmapNormalize
public static double[][][] mmapNormalize(double[][][] mmap) Pythonmmap_normalizeon a [D0, D1, D11, ...] list (copies). -
mmapSuper
public static double[][][] mmapSuper(double[][][] a, double[][][] b) Pythonmmap_super(a, b, opt='default'), normalised. -
mmapIsFeasible
public static boolean mmapIsFeasible(double[][][] mmap, double tol) Pythonmmap_isfeasible(mmap, tol). -
mmapIsFeasible
public static boolean mmapIsFeasible(double[][][] mmap) -
toMatrix
-
toArray
-
toCell
-
fromCell
-
fromArray
-
toMatrices
-
qbdRLogred
public static double[][] qbdRLogred(double[][] b, double[][] l, double[][] f, int iterMax, double tol) Logarithmic reduction for the QBD rate matrix with an explicit tolerance (Pythonqbd_R_logred(B, L, F, iter_max, tol)); the JAR'sQbd_R_logredfixes the tolerance at 1e-12. -
blockDiag
Block-diagonal concatenation. -
minEigSym
public static double minEigSym(double[][] a) Smallest eigenvalue of a symmetric matrix. -
list
-
satMul
public static long satMul(long a, long b) Product of sizes, saturating atLong.MAX_VALUE.
-