Package cern.colt.matrix

Examples of cern.colt.matrix.DoubleMatrix2D.viewColumn()


 
  for (int c = columnIndexes.length; --c >= 0; ) {
    int column = columnIndexes[c];
    if (column < 0 || column >= columns)
      throw new IndexOutOfBoundsException("Illegal Index");
    sub.viewColumn(c).assign(A.viewColumn(column));
  }
  return sub;
}
/**
Constructs and returns a new <i>sub-range view</i> which is the sub matrix <tt>A[fromRow..toRow,fromColumn..toColumn]</tt>.
View Full Code Here


  for (int k = n-1; k >= 0; k--) {
    DoubleMatrix1D QRcolk = QR.viewColumn(k).viewPart(k,m-k);
    Q.setQuick(k,k, 1);
    for (int j = k; j < n; j++) {
      if (QR.getQuick(k,k) != 0) {
        DoubleMatrix1D Qcolj = Q.viewColumn(j).viewPart(k,m-k);
        double s = QRcolk.zDotProduct(Qcolj);
        s = -s / QR.getQuick(k,k);
        Qcolj.assign(QRcolk, F.plusMult(s));
      }
    }
View Full Code Here

  for (int c = columnIndexes.length; --c >= 0; ) {
    int column = columnIndexes[c];
    if (column < 0 || column >= columns)
      throw new IndexOutOfBoundsException("Illegal Index");
    sub.viewColumn(c).assign(A.viewColumn(column));
  }
  return sub;
}
/**
Constructs and returns a new <i>sub-range view</i> which is the sub matrix <tt>A[fromRow..toRow,fromColumn..toColumn]</tt>.
View Full Code Here

      DoubleMatrix2D coltN = DoubleFactory2D.dense.make(N);
      DoubleMatrix2D coltD = DoubleFactory2D.dense.make(D);
      DoubleMatrix2D coltP;
      coltP = Algebra.ZERO.solve(coltN, coltD);

      return new BSpline(coltP.viewColumn(0).toArray(), coltP.viewColumn(1).toArray(), U);
   }


   /**
    * Returns a B-spline curve of degree <TT>degree</TT> smoothing
View Full Code Here

      DoubleMatrix2D coltN = DoubleFactory2D.dense.make(N);
      DoubleMatrix2D coltD = DoubleFactory2D.dense.make(D);
      DoubleMatrix2D coltP;
      coltP = Algebra.ZERO.solve(coltN, coltD);

      return new BSpline(coltP.viewColumn(0).toArray(), coltP.viewColumn(1).toArray(), U);
   }


   /**
    * Returns a B-spline curve of degree <TT>degree</TT> smoothing
View Full Code Here

      DoubleMatrix2D coltQ = DoubleFactory2D.dense.make(Q);
      DoubleMatrix2D coltN = Algebra.ZERO.subMatrix(DoubleFactory2D.dense.make(N), 1, x.length-1, 1, h-1).copy();
      DoubleMatrix2D coltM = Algebra.ZERO.mult(Algebra.ZERO.transpose(coltN), coltN);
      DoubleMatrix2D coltP;
      coltP = Algebra.ZERO.solve(coltM, coltQ);
      double[] pxTemp = coltP.viewColumn(0).toArray();
      double[] pyTemp = coltP.viewColumn(1).toArray();
      double[] px = new double[h+1];
      double[] py = new double[h+1];
      px[0] = D[0][0];
      py[0] = D[0][1];
View Full Code Here

      DoubleMatrix2D coltN = Algebra.ZERO.subMatrix(DoubleFactory2D.dense.make(N), 1, x.length-1, 1, h-1).copy();
      DoubleMatrix2D coltM = Algebra.ZERO.mult(Algebra.ZERO.transpose(coltN), coltN);
      DoubleMatrix2D coltP;
      coltP = Algebra.ZERO.solve(coltM, coltQ);
      double[] pxTemp = coltP.viewColumn(0).toArray();
      double[] pyTemp = coltP.viewColumn(1).toArray();
      double[] px = new double[h+1];
      double[] py = new double[h+1];
      px[0] = D[0][0];
      py[0] = D[0][1];
      px[h] = D[D.length-1][0];
View Full Code Here

            u.setQuick (i, j, v);
            v *= x[i];
         }
      }
      final DoubleMatrix2D yMat = new DenseDoubleMatrix2D (x.length, 1);
      yMat.viewColumn (0).assign (y);
      final DoubleMatrix2D bMat = alg.solve (u, yMat);
      return bMat.viewColumn (0).toArray ();
   }


View Full Code Here

         }
      }
      final DoubleMatrix2D yMat = new DenseDoubleMatrix2D (x.length, 1);
      yMat.viewColumn (0).assign (y);
      final DoubleMatrix2D bMat = alg.solve (u, yMat);
      return bMat.viewColumn (0).toArray ();
   }


   /**
    * Returns the <SPAN CLASS="MATH"><I>x</I></SPAN> coordinates of the interpolated points.
View Full Code Here

            A.setQuick (i, j, xSums[d]);
         }
         B.setQuick (i, 0, xySums[i]);
      }
      final DoubleMatrix2D aVec = alg.solve (A, B);
      return aVec.viewColumn (0).toArray ();
   }


   /**
    * Returns the <SPAN CLASS="MATH"><I>x</I></SPAN> coordinates of the fitted points.
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.