Class FjCodesUtilsKt

java.lang.Object
jline.lib.fjcodes.FjCodesUtilsKt

public final class FjCodesUtilsKt extends Object
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 Type
    Method
    Description
    static Matrix
    build_index(int m, int cr)
    Build combinatorial index patterns: enumerate all ways to distribute cr items into m bins.
    static double[]
    getRowAsArray(Matrix matrix, int row)
    Extract row row of matrix as a double[].
    static Matrix
    Compute Kronecker sum of two matrices: A xor B = A x I + I x B.
    static void
    setSubMatrix(Matrix target, int startRow, int startCol, Matrix source)
    Copy source into target starting at the given (0-based) row/column position.
    static int
    vectmatch(double[] row, Matrix matrix)
    Find the 1-based index of the row in matrix that matches row elementwise (within 1e-10), or -1 if no row matches.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • kronsum

      public static Matrix kronsum(Matrix A, Matrix B)
      Compute Kronecker sum of two matrices: A xor B = A x I + I x B.
    • vectmatch

      public static int vectmatch(double[] row, Matrix matrix)
      Find the 1-based index of the row in matrix that matches row elementwise (within 1e-10), or -1 if no row matches.
    • build_index

      public static Matrix build_index(int m, int cr)
      Build combinatorial index patterns: enumerate all ways to distribute cr items into m bins. Each row of the returned matrix is one distribution pattern.
    • getRowAsArray

      public static double[] getRowAsArray(Matrix matrix, int row)
      Extract row row of matrix as a double[].
    • setSubMatrix

      public static void setSubMatrix(Matrix target, int startRow, int startCol, Matrix source)
      Copy source into target starting at the given (0-based) row/column position.