Examples of viewColumn()


Examples of org.apache.mahout.math.Matrix.viewColumn()

    for (int m = low + 1; m <= high - 1; m++) {

      // Scale column.

      Vector hColumn = hessenBerg.viewColumn(m - 1).viewPart(m, high - m + 1);
      double scale = hColumn.norm(1);

      if (scale != 0.0) {
        // Compute Householder transformation.
View Full Code Here

Examples of org.apache.mahout.math.Matrix.viewColumn()

        // Apply Householder similarity transformation
        // H = (I-u*u'/h)*H*(I-u*u')/h)

        Vector ortPiece = ort.viewPart(m, high - m + 1);
        for (int j = m; j < n; j++) {
          double f = ortPiece.dot(hessenBerg.viewColumn(j).viewPart(m, high - m + 1)) / h;
          hessenBerg.viewColumn(j).viewPart(m, high - m + 1).assign(ortPiece, Functions.plusMult(-f));
        }

        for (int i = 0; i <= high; i++) {
          double f = ortPiece.dot(hessenBerg.viewRow(i).viewPart(m, high - m + 1)) / h;
View Full Code Here

Examples of org.apache.mahout.math.Matrix.viewColumn()

        // H = (I-u*u'/h)*H*(I-u*u')/h)

        Vector ortPiece = ort.viewPart(m, high - m + 1);
        for (int j = m; j < n; j++) {
          double f = ortPiece.dot(hessenBerg.viewColumn(j).viewPart(m, high - m + 1)) / h;
          hessenBerg.viewColumn(j).viewPart(m, high - m + 1).assign(ortPiece, Functions.plusMult(-f));
        }

        for (int i = 0; i <= high; i++) {
          double f = ortPiece.dot(hessenBerg.viewRow(i).viewPart(m, high - m + 1)) / h;
          hessenBerg.viewRow(i).viewPart(m, high - m + 1).assign(ortPiece, Functions.plusMult(-f));
View Full Code Here

Examples of org.apache.mahout.math.Matrix.viewColumn()

    v.assign(0);
    v.viewDiagonal().assign(1);

    for (int m = high - 1; m >= low + 1; m--) {
      if (hessenBerg.getQuick(m, m - 1) != 0.0) {
        ort.viewPart(m + 1, high - m).assign(hessenBerg.viewColumn(m - 1).viewPart(m + 1, high - m));
        for (int j = m; j <= high; j++) {
          double g = ort.viewPart(m, high - m + 1).dot(v.viewColumn(j).viewPart(m, high - m + 1));
          // Double division avoids possible underflow
          g = g / ort.getQuick(m) / hessenBerg.getQuick(m, m - 1);
          v.viewColumn(j).viewPart(m, high - m + 1).assign(ort.viewPart(m, high - m + 1), Functions.plusMult(g));
View Full Code Here

Examples of org.apache.mahout.math.Matrix.viewColumn()

    endTime(TimingSection.TRIDIAG_DECOMP);
    startTime(TimingSection.FINAL_EIGEN_CREATE);
    for (int row = 0; row < i; row++) {
      Vector realEigen = null;

      Vector ejCol = eigenVects.viewColumn(row);
      int size = Math.min(ejCol.size(), state.getBasisSize());
      for (int j = 0; j < size; j++) {
        double d = ejCol.get(j);
        Vector rowJ = state.getBasisVector(j);
        if (realEigen == null) {
View Full Code Here

Examples of org.apache.mahout.math.Matrix.viewColumn()

    for (int m = low + 1; m <= high - 1; m++) {

      // Scale column.

      final Vector hColumn = hessenBerg.viewColumn(m - 1).viewPart(m, high - m + 1);
      double scale = hColumn.norm(1);

      if (scale != 0.0) {
        // Compute Householder transformation.
View Full Code Here

Examples of org.apache.mahout.math.Matrix.viewColumn()

        // Apply Householder similarity transformation
        // H = (I-u*u'/h)*H*(I-u*u')/h)

        Vector ortPiece = ort.viewPart(m, high - m + 1);
        for (int j = m; j < n; j++) {
          double f = ortPiece.dot(hessenBerg.viewColumn(j).viewPart(m, high - m + 1)) / h;
          hessenBerg.viewColumn(j).viewPart(m, high - m + 1).assign(ortPiece, Functions.plusMult(-f));
        }

        for (int i = 0; i <= high; i++) {
          double f = ortPiece.dot(hessenBerg.viewRow(i).viewPart(m, high - m + 1)) / h;
View Full Code Here

Examples of org.apache.mahout.math.Matrix.viewColumn()

        // H = (I-u*u'/h)*H*(I-u*u')/h)

        Vector ortPiece = ort.viewPart(m, high - m + 1);
        for (int j = m; j < n; j++) {
          double f = ortPiece.dot(hessenBerg.viewColumn(j).viewPart(m, high - m + 1)) / h;
          hessenBerg.viewColumn(j).viewPart(m, high - m + 1).assign(ortPiece, Functions.plusMult(-f));
        }

        for (int i = 0; i <= high; i++) {
          double f = ortPiece.dot(hessenBerg.viewRow(i).viewPart(m, high - m + 1)) / h;
          hessenBerg.viewRow(i).viewPart(m, high - m + 1).assign(ortPiece, Functions.plusMult(-f));
View Full Code Here

Examples of org.apache.mahout.math.Matrix.viewColumn()

    v.assign(0);
    v.viewDiagonal().assign(1);

    for (int m = high - 1; m >= low + 1; m--) {
      if (hessenBerg.getQuick(m, m - 1) != 0.0) {
        ort.viewPart(m + 1, high - m).assign(hessenBerg.viewColumn(m - 1).viewPart(m + 1, high - m));
        for (int j = m; j <= high; j++) {
          double g = ort.viewPart(m, high - m + 1).dot(v.viewColumn(j).viewPart(m, high - m + 1));
          // Double division avoids possible underflow
          g = (g / ort.getQuick(m)) / hessenBerg.getQuick(m, m - 1);
          v.viewColumn(j).viewPart(m, high - m + 1).assign(ort.viewPart(m, high - m + 1), Functions.plusMult(g));
View Full Code Here

Examples of org.apache.mahout.math.Matrix.viewColumn()

    endTime(TimingSection.TRIDIAG_DECOMP);
    startTime(TimingSection.FINAL_EIGEN_CREATE);
    for (int row = 0; row < i; row++) {
      Vector realEigen = null;
      // the eigenvectors live as columns of V, in reverse order.  Weird but true.
      Vector ejCol = eigenVects.viewColumn(i - row - 1);
      int size = Math.min(ejCol.size(), state.getBasisSize());
      for (int j = 0; j < size; j++) {
        double d = ejCol.get(j);
        Vector rowJ = state.getBasisVector(j);
        if (realEigen == null) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.