Class Moment_tensortrans

java.lang.Object
jline.api.moment.Moment_tensortrans

public final class Moment_tensortrans extends Object
Mode product of a joint moment array with a conversion matrix.

Applies a conversion matrix along one dimension of a joint moment array: every fibre of the array along that dimension is replaced by T times that fibre. Applying it once per dimension realises the Kronecker product of the univariate conversions, which is the structure of every separable edge of the house of moments.

Joint moment arrays are held flattened in ROW-MAJOR order, the last dimension varying fastest, with dims[j] = n_j+1 the extent of dimension j. The MATLAB counterpart uses native N-D arrays and therefore a column-major layout; only the linearisation differs, never the value at a multi-index.

Reference: A. Heindl and A. van de Liefvoort. Moment conversions for discrete distributions. PMCCS, 2003.

Since:
LINE 3.0
  • Method Details

    • moment_tensortrans

      public static double[] moment_tensortrans(double[] a, int[] dims, Matrix T, int mode)
      Applies a conversion matrix along one dimension of a joint moment array.
      Parameters:
      a - flattened joint moment array in row-major order
      dims - extents of the array, dims[j] = n_j+1
      T - (dims[mode])x(dims[mode]) conversion matrix
      mode - zero-based dimension to transform
      Returns:
      flattened array of the same extent, same layout