Exemplo n.º 1
0
 /**
  * <p>
  * Performs the following operation:<br>
  * <br>
  * c = c + &alpha; * a * b<br>
  * c<sub>ij</sub> = c<sub>ij</sub> +  &alpha; * &sum;<sub>k=1:n</sub> { a<sub>ik</sub> * b<sub>kj</sub>}
  * </p>
  *
  * @param realAlpha real component of scaling factor.
  * @param imgAlpha imaginary component of scaling factor.
  * @param a The left matrix in the multiplication operation. Not modified.
  * @param b The right matrix in the multiplication operation. Not modified.
  * @param c Where the results of the operation are stored. Modified.
  */
 public static void multAdd(float realAlpha, float imgAlpha, CMatrixRMaj a, CMatrixRMaj b, CMatrixRMaj c)
 {
     if (b.numCols >= EjmlParameters.CMULT_COLUMN_SWITCH)
     {
         MatrixMatrixMult_CDRM.multAdd_reorder(realAlpha, imgAlpha, a, b, c);
     }
     else
     {
         MatrixMatrixMult_CDRM.multAdd_small(realAlpha, imgAlpha, a, b, c);
     }
 }
Exemplo n.º 2
0
 /**
  * <p>
  * Performs the following operation:<br>
  * <br>
  * c = c + a<sup>H</sup> * b<sup>H</sup><br>
  * c<sub>ij</sub> = c<sub>ij</sub> + &sum;<sub>k=1:n</sub> { a<sub>ki</sub> * b<sub>jk</sub>}
  * </p>
  *
  * @param a The left matrix in the multiplication operation. Not Modified.
  * @param b The right matrix in the multiplication operation. Not Modified.
  * @param c Where the results of the operation are stored. Modified.
  */
 public static void multAddTransAB(CMatrixRMaj a, CMatrixRMaj b, CMatrixRMaj c)
 {
     if (a.numCols >= EjmlParameters.CMULT_TRANAB_COLUMN_SWITCH)
     {
         MatrixMatrixMult_CDRM.multAddTransAB_aux(a, b, c, null);
     }
     else
     {
         MatrixMatrixMult_CDRM.multAddTransAB(a, b, c);
     }
 }
Exemplo n.º 3
0
 /**
  * <p>
  * Performs the following operation:<br>
  * <br>
  * c = c + a * b<br>
  * c<sub>ij</sub> = c<sub>ij</sub> + &sum;<sub>k=1:n</sub> { a<sub>ik</sub> * b<sub>kj</sub>}
  * </p>
  *
  * @param a The left matrix in the multiplication operation. Not modified.
  * @param b The right matrix in the multiplication operation. Not modified.
  * @param c Where the results of the operation are stored. Modified.
  */
 public static void multAdd(CMatrixRMaj a, CMatrixRMaj b, CMatrixRMaj c)
 {
     if (b.numCols >= EjmlParameters.MULT_COLUMN_SWITCH)
     {
         MatrixMatrixMult_CDRM.multAdd_reorder(a, b, c);
     }
     else
     {
         MatrixMatrixMult_CDRM.multAdd_small(a, b, c);
     }
 }
Exemplo n.º 4
0
 /**
  * <p>
  * Performs the following operation:<br>
  * <br>
  * c = c + &alpha; * a<sup>H</sup> * b<sup>H</sup><br>
  * c<sub>ij</sub> = c<sub>ij</sub> + &alpha; * &sum;<sub>k=1:n</sub> { a<sub>ki</sub> * b<sub>jk</sub>}
  * </p>
  *
  * @param realAlpha Real component of scaling factor.
  * @param imagAlpha Imaginary component of scaling factor.
  * @param a The left matrix in the multiplication operation. Not Modified.
  * @param b The right matrix in the multiplication operation. Not Modified.
  * @param c Where the results of the operation are stored. Modified.
  */
 public static void multAddTransAB(float realAlpha, float imagAlpha, CMatrixRMaj a, CMatrixRMaj b, CMatrixRMaj c)
 {
     // TODO add a matrix vectory multiply here
     if (a.numCols >= EjmlParameters.CMULT_TRANAB_COLUMN_SWITCH)
     {
         MatrixMatrixMult_CDRM.multAddTransAB_aux(realAlpha, imagAlpha, a, b, c, null);
     }
     else
     {
         MatrixMatrixMult_CDRM.multAddTransAB(realAlpha, imagAlpha, a, b, c);
     }
 }
Exemplo n.º 5
0
 /**
  * <p>Performs the following operation:<br>
  * <br>
  * c = a<sup>H</sup> * b <br>
  * <br>
  * c<sub>ij</sub> = &sum;<sub>k=1:n</sub> { a<sub>ki</sub> * b<sub>kj</sub>}
  * </p>
  *
  * @param a The left matrix in the multiplication operation. Not modified.
  * @param b The right matrix in the multiplication operation. Not modified.
  * @param c Where the results of the operation are stored. Modified.
  */
 public static void multTransA(CMatrixRMaj a, CMatrixRMaj b, CMatrixRMaj c)
 {
     if (a.numCols >= EjmlParameters.CMULT_COLUMN_SWITCH ||
         b.numCols >= EjmlParameters.CMULT_COLUMN_SWITCH)
     {
         MatrixMatrixMult_CDRM.multTransA_reorder(a, b, c);
     }
     else
     {
         MatrixMatrixMult_CDRM.multTransA_small(a, b, c);
     }
 }
Exemplo n.º 6
0
 /**
  * <p>
  * Performs the following operation:<br>
  * <br>
  * c = c + &alpha; * a<sup>H</sup> * b<br>
  * c<sub>ij</sub> =c<sub>ij</sub> +  &alpha; * &sum;<sub>k=1:n</sub> { a<sub>ki</sub> * b<sub>kj</sub>}
  * </p>
  *
  * @param realAlpha Real component of scaling factor.
  * @param imagAlpha Imaginary component of scaling factor.
  * @param a The left matrix in the multiplication operation. Not modified.
  * @param b The right matrix in the multiplication operation. Not modified.
  * @param c Where the results of the operation are stored. Modified.
  */
 public static void multAddTransA(float realAlpha, float imagAlpha, CMatrixRMaj a, CMatrixRMaj b, CMatrixRMaj c)
 {
     // TODO add a matrix vectory multiply here
     if (a.numCols >= EjmlParameters.CMULT_COLUMN_SWITCH ||
         b.numCols >= EjmlParameters.CMULT_COLUMN_SWITCH)
     {
         MatrixMatrixMult_CDRM.multAddTransA_reorder(realAlpha, imagAlpha, a, b, c);
     }
     else
     {
         MatrixMatrixMult_CDRM.multAddTransA_small(realAlpha, imagAlpha, a, b, c);
     }
 }
Exemplo n.º 7
0
 /**
  * <p>
  * Performs the following operation:<br>
  * <br>
  * c = c + &alpha; * a * b<sup>H</sup><br>
  * c<sub>ij</sub> = c<sub>ij</sub> + &alpha; * &sum;<sub>k=1:n</sub> { a<sub>ik</sub> * b<sub>jk</sub>}
  * </p>
  *
  * @param realAlpha Real component of scaling factor.
  * @param imagAlpha Imaginary component of scaling factor.
  * @param a The left matrix in the multiplication operation. Not modified.
  * @param b The right matrix in the multiplication operation. Not modified.
  * @param c Where the results of the operation are stored. Modified.
  */
 public static void multAddTransB(float realAlpha, float imagAlpha, CMatrixRMaj a, CMatrixRMaj b, CMatrixRMaj c)
 {
     // TODO add a matrix vectory multiply here
     MatrixMatrixMult_CDRM.multAddTransB(realAlpha, imagAlpha, a, b, c);
 }
Exemplo n.º 8
0
 /**
  * <p>
  * Performs the following operation:<br>
  * <br>
  * c = c + a * b<sup>H</sup> <br>
  * c<sub>ij</sub> = c<sub>ij</sub> + &sum;<sub>k=1:n</sub> { a<sub>ik</sub> * b<sub>jk</sub>}
  * </p>
  *
  * @param a The left matrix in the multiplication operation. Not modified.
  * @param b The right matrix in the multiplication operation. Not modified.
  * @param c Where the results of the operation are stored. Modified.
  */
 public static void multAddTransB(CMatrixRMaj a, CMatrixRMaj b, CMatrixRMaj c)
 {
     MatrixMatrixMult_CDRM.multAddTransB(a, b, c);
 }