Package jline.lib.fjcodes
Class FjCodesUtilsKt
java.lang.Object
jline.lib.fjcodes.FjCodesUtilsKt
FJ_codes utility helpers translated from FJUtils.kt's top-level functions.
The class name preserves the Kotlin-generated facade name so existing
call sites (e.g.
FjCodesUtilsKt.setSubMatrix(...)) compile unchanged.-
Method Summary
Modifier and TypeMethodDescriptionstatic Matrixbuild_index(int m, int cr) Build combinatorial index patterns: enumerate all ways to distributecritems intombins.static double[]getRowAsArray(Matrix matrix, int row) Extract rowrowofmatrixas adouble[].static MatrixCompute Kronecker sum of two matrices: A xor B = A x I + I x B.static voidsetSubMatrix(Matrix target, int startRow, int startCol, Matrix source) Copysourceintotargetstarting at the given (0-based) row/column position.static intFind the 1-based index of the row inmatrixthat matchesrowelementwise (within 1e-10), or -1 if no row matches.
-
Method Details
-
kronsum
Compute Kronecker sum of two matrices: A xor B = A x I + I x B. -
vectmatch
Find the 1-based index of the row inmatrixthat matchesrowelementwise (within 1e-10), or -1 if no row matches. -
build_index
Build combinatorial index patterns: enumerate all ways to distributecritems intombins. Each row of the returned matrix is one distribution pattern. -
getRowAsArray
Extract rowrowofmatrixas adouble[]. -
setSubMatrix
Copysourceintotargetstarting at the given (0-based) row/column position.
-