Package org.apache.commons.math.linear

Examples of org.apache.commons.math.linear.Array2DRowRealMatrix


            final double[] msI = multistep[i];
            for (int j = 0; j < first.length; ++j) {
                msI[j] -= first[j];
            }
        }
        return initialization.multiply(new Array2DRowRealMatrix(multistep, false));
    }
View Full Code Here


  private final double[][] uHat;

  public EigenSolverWrapper(double[][] bbt) {
    int dim = bbt.length;
    EigenDecomposition evd2 = new EigenDecompositionImpl(
        new Array2DRowRealMatrix(bbt), 0);
    eigenvalues = evd2.getRealEigenvalues();
    RealMatrix uHatrm = evd2.getV();
    uHat = new double[dim][];
    for (int i = 0; i < dim; i++) {
      uHat[i] = uHatrm.getRow(i);
View Full Code Here

   * @param x An OG 2-D matrix of doubles, not null
   * @return A Commons matrix
   */
  public static RealMatrix wrap(final DoubleMatrix2D x) {
    Validate.notNull(x);
    return new Array2DRowRealMatrix(x.getData());
  }
View Full Code Here

    final int n = x.getNumberOfElements();
    final double[][] y = new double[n][1];
    for (int i = 0; i < n; i++) {
      y[i][0] = x.getEntry(i);
    }
    return new Array2DRowRealMatrix(x.getData());
  }
View Full Code Here

        d[i][i] = Math.pow(rEigenValues[i], p);
        if (iEigenValues[i] != 0.0) {
          throw new NotImplementedException("Cannot handle complex eigenvalues in getPower");
        }
      }
      final RealMatrix res = eigen.getV().multiply((new Array2DRowRealMatrix(d)).multiply(eigen.getVT()));
      return CommonsMathWrapper.unwrap(res);
    }
    throw new IllegalArgumentException("Can only find pow of DoubleMatrix2D; have " + m.getClass());
  }
View Full Code Here

TOP

Related Classes of org.apache.commons.math.linear.Array2DRowRealMatrix

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.