Package org.encog.mathutil.matrices

Examples of org.encog.mathutil.matrices.Matrix


   *
   * @return Q
   */

  public Matrix getQ() {
    Matrix X = new Matrix(m, n);
    double[][] Q = X.getData();
    for (int k = n - 1; k >= 0; k--) {
      for (int i = 0; i < m; i++) {
        Q[i][k] = 0.0;
      }
      Q[k][k] = 1.0;
View Full Code Here


        for (int j = 0; j < nx; j++) {
          X[i][j] -= X[k][j] * QR[i][k];
        }
      }
    }
    return (new Matrix(X).getMatrix(0, n - 1, 0, nx - 1));
  }
View Full Code Here

   *
   * @return L
   */

  public final Matrix getL() {
    return new Matrix(l);
  }
View Full Code Here

        }
        x[k][j] /= l[k][k];
      }
    }

    return new Matrix(x);
  }
View Full Code Here

    for (int r = 0; r < n; r++)
      for (int c = 0; c < n; c++)
        for (int i = 0; i < n; i++)
          ic[r][c] += li[i][r] * li[i][c];
   
    return new Matrix(ic);
  }
View Full Code Here

   */
  public double[] createCoefficients() {
   
    final double[] result = new double[this.pointCount];

    final Matrix delts = new Matrix(this.pointCount, this.pointCount);
    final double[][] t = delts.getData();

    for (int j = 0; j < this.pointCount; j++) {
      final double delt = (j - this.center);
      double x = 1.0;

      for (int k = 0; k < this.pointCount; k++) {
        t[j][k] = x / EncogMath.factorial(k);
        x *= delt;
      }
    }

    final Matrix invMatrix = delts.inverse();
    final double f = EncogMath.factorial(this.pointCount);


      for (int k = 0; k < this.pointCount; k++) {
        result[k] = (Math
            .round(invMatrix.getData()[1][k]* f))/ f;
      }



    return result;
View Full Code Here

   *
   * @return U
   */

  public Matrix getU() {
    return new Matrix(U);
  }
View Full Code Here

   *
   * @return V
   */

  public Matrix getV() {
    return new Matrix(V);
  }
View Full Code Here

   *
   * @return S
   */

  public Matrix getS() {
    Matrix X = new Matrix(n, n);
    double[][] S = X.getData();
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        S[i][j] = 0.0;
      }
      S[i][i] = this.s[i];
View Full Code Here

   *
   * @return L
   */

  public Matrix getL() {
    Matrix X = new Matrix(m, n);
    double[][] L = X.getData();
    for (int i = 0; i < m; i++) {
      for (int j = 0; j < n; j++) {
        if (i > j) {
          L[i][j] = LU[i][j];
        } else if (i == j) {
View Full Code Here

TOP

Related Classes of org.encog.mathutil.matrices.Matrix

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.