Class VectorOps_FDRB


  • public class VectorOps_FDRB
    extends java.lang.Object

    Math operations for inner vectors (row and column) inside of block matrices:

    scale: bi = α*ai
    div: i = ai
    add: ci = α*ai + βBi
    dot: c = sum ai*bi

    All submatrices must be block aligned. All offsets and end indexes are relative to the beginning of each submatrix.

    • Constructor Summary

      Constructors 
      Constructor Description
      VectorOps_FDRB()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void add_row​(int blockLength, org.ejml.data.FSubmatrixD1 A, int rowA, float alpha, org.ejml.data.FSubmatrixD1 B, int rowB, float beta, org.ejml.data.FSubmatrixD1 C, int rowC, int offset, int end)
      Row vector add:
      add: ci = α*ai + βBi
      where 'a', 'b', and 'c' are row vectors within the row block vectors of A, B, and C respectively.
      static void div_row​(int blockLength, org.ejml.data.FSubmatrixD1 A, int rowA, float alpha, org.ejml.data.FSubmatrixD1 B, int rowB, int offset, int end)
      Row vector divide:
      div: bi = ai
      where 'a' and 'b' are row vectors within the row block vector A and B.
      static float dot_row​(int blockLength, org.ejml.data.FSubmatrixD1 A, int rowA, org.ejml.data.FSubmatrixD1 B, int rowB, int offset, int end)
      Row vector dot/inner product:
      dot: c = sum ai*bi
      where 'a' and 'b' are row vectors within the row block vector A and B, and 'c' is a scalar.
      static float dot_row_col​(int blockLength, org.ejml.data.FSubmatrixD1 A, int rowA, org.ejml.data.FSubmatrixD1 B, int colB, int offset, int end)
      vector dot/inner product from one row vector and one column vector:
      dot: c = sum ai*bi
      where 'a' is a row vector 'b' is a column vectors within the row block vector A and B, and 'c' is a scalar.
      static void scale_row​(int blockLength, org.ejml.data.FSubmatrixD1 A, int rowA, float alpha, org.ejml.data.FSubmatrixD1 B, int rowB, int offset, int end)
      Row vector scale:
      scale: bi = α*ai
      where 'a' and 'b' are row vectors within the row block vector A and B.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VectorOps_FDRB

        public VectorOps_FDRB()
    • Method Detail

      • scale_row

        public static void scale_row​(int blockLength,
                                     org.ejml.data.FSubmatrixD1 A,
                                     int rowA,
                                     float alpha,
                                     org.ejml.data.FSubmatrixD1 B,
                                     int rowB,
                                     int offset,
                                     int end)

        Row vector scale:
        scale: bi = α*ai
        where 'a' and 'b' are row vectors within the row block vector A and B.

        Parameters:
        A - submatrix. Not modified.
        rowA - which row in A the vector is contained in.
        alpha - scale factor.
        B - submatrix that the results are written to. Modified.
        offset - Index at which the vectors start at.
        end - Index at which the vectors end at.
      • div_row

        public static void div_row​(int blockLength,
                                   org.ejml.data.FSubmatrixD1 A,
                                   int rowA,
                                   float alpha,
                                   org.ejml.data.FSubmatrixD1 B,
                                   int rowB,
                                   int offset,
                                   int end)

        Row vector divide:
        div: bi = ai
        where 'a' and 'b' are row vectors within the row block vector A and B.

        Parameters:
        A - submatrix. Not modified.
        rowA - which row in A the vector is contained in.
        alpha - scale factor.
        B - submatrix that the results are written to. Modified.
        offset - Index at which the vectors start at.
        end - Index at which the vectors end at.
      • add_row

        public static void add_row​(int blockLength,
                                   org.ejml.data.FSubmatrixD1 A,
                                   int rowA,
                                   float alpha,
                                   org.ejml.data.FSubmatrixD1 B,
                                   int rowB,
                                   float beta,
                                   org.ejml.data.FSubmatrixD1 C,
                                   int rowC,
                                   int offset,
                                   int end)

        Row vector add:
        add: ci = α*ai + βBi
        where 'a', 'b', and 'c' are row vectors within the row block vectors of A, B, and C respectively.

        Parameters:
        blockLength - Length of each inner matrix block.
        A - submatrix. Not modified.
        rowA - which row in A the vector is contained in.
        alpha - scale factor of A
        B - submatrix. Not modified.
        rowB - which row in B the vector is contained in.
        beta - scale factor of B
        C - submatrix where the results are written to. Modified.
        rowC - which row in C is the vector contained.
        offset - Index at which the vectors start at.
        end - Index at which the vectors end at.
      • dot_row

        public static float dot_row​(int blockLength,
                                    org.ejml.data.FSubmatrixD1 A,
                                    int rowA,
                                    org.ejml.data.FSubmatrixD1 B,
                                    int rowB,
                                    int offset,
                                    int end)

        Row vector dot/inner product:
        dot: c = sum ai*bi
        where 'a' and 'b' are row vectors within the row block vector A and B, and 'c' is a scalar.

        Parameters:
        A - submatrix. Not modified.
        rowA - which row in A the vector is contained in.
        B - submatrix. Not modified.
        rowB - which row in B the vector is contained in.
        offset - Index at which the vectors start at.
        end - Index at which the vectors end at.
        Returns:
        Results of the dot product.
      • dot_row_col

        public static float dot_row_col​(int blockLength,
                                        org.ejml.data.FSubmatrixD1 A,
                                        int rowA,
                                        org.ejml.data.FSubmatrixD1 B,
                                        int colB,
                                        int offset,
                                        int end)

        vector dot/inner product from one row vector and one column vector:
        dot: c = sum ai*bi
        where 'a' is a row vector 'b' is a column vectors within the row block vector A and B, and 'c' is a scalar.

        Parameters:
        A - block row vector. Not modified.
        rowA - which row in A the vector is contained in.
        B - block column vector. Not modified.
        colB - which column in B is the vector contained in.
        offset - Index at which the vectors start at.
        end - Index at which the vectors end at.
        Returns:
        Results of the dot product.