Package cern.colt.matrix

Examples of cern.colt.matrix.DoubleMatrix1D.assign()


  cern.jet.math.Mult multFunction = cern.jet.math.Mult.mult(0);

  // Outer loop.
  for (int j = 0; j < n; j++) {
    // blocking (make copy of j-th column to localize references)
    LUcolj.assign(LU.viewColumn(j));
   
    // sparsity detection
    int maxCardinality = m/CUT_OFF; // == heuristic depending on speedup
    LUcolj.getNonZeros(nonZeroIndexes,null,maxCardinality);
    int cardinality = nonZeroIndexes.size();
View Full Code Here


  DoubleMatrix1D Browk = cern.colt.matrix.DoubleFactory1D.dense.make(nx); // blocked row k
 
  // Solve L*Y = B(piv,:)
  for (int k = 0; k < n; k++) {
    // blocking (make copy of k-th row to localize references)   
    Browk.assign(Brows[k]);
   
    // sparsity detection
    int maxCardinality = nx/CUT_OFF; // == heuristic depending on speedup
    Browk.getNonZeros(nonZeroIndexes,null,maxCardinality);
    int cardinality = nonZeroIndexes.size();
View Full Code Here

    div.multiplicator = 1 / LU.getQuick(k,k);
    Brows[k].assign(div);

    // blocking
    if (Browk==null) Browk = cern.colt.matrix.DoubleFactory1D.dense.make(B.columns());
    Browk.assign(Brows[k]);

    // sparsity detection
    int maxCardinality = nx/CUT_OFF; // == heuristic depending on speedup
    Browk.getNonZeros(nonZeroIndexes,null,maxCardinality);
    int cardinality = nonZeroIndexes.size();
View Full Code Here

  }
     
  DoubleMatrix1D b = x.like();
  DoubleMatrix1D y = x.like();
  if (isUnitTriangular) {
    y.assign(1);
  }
  else {
    for (int i = 0; i < size; i++) {
      y.setQuick(i, A.getQuick(i,i));
    }
View Full Code Here

 
  DoubleMatrix1D sorted = sort.sort(matrix,comp);
  System.out.println("sorted  :"+sorted);

  // check whether it is really sorted
  sorted.assign(cern.jet.math.Functions.sin);
  /*
  sorted.assign(
    new cern.colt.function.DoubleFunction() {
      public double apply(double arg) { return Math.sin(arg); }
    }
View Full Code Here

  DoubleMatrix1D sorted = sort.sort(matrix,comp);
  System.out.println("sorted  :"+sorted);

  // check whether it is really sorted
  sorted.assign(cern.jet.math.Functions.sin);
  /*
  sorted.assign(
    new cern.colt.function.DoubleFunction() {
      public double apply(double arg) { return Math.sin(arg); }
    }
View Full Code Here

  cern.jet.math.Mult multFunction = cern.jet.math.Mult.mult(0);

  // Outer loop.
  for (int j = 0; j < n; j++) {
    // blocking (make copy of j-th column to localize references)
    LUcolj.assign(LU.viewColumn(j));
   
    // sparsity detection
    int maxCardinality = m/CUT_OFF; // == heuristic depending on speedup
    LUcolj.getNonZeros(nonZeroIndexes,null,maxCardinality);
    int cardinality = nonZeroIndexes.size();
View Full Code Here

  DoubleMatrix1D Browk = cern.colt.matrix.DoubleFactory1D.dense.make(nx); // blocked row k

  // Solve L*Y = B(piv,:)
  for (int k = 0; k < n; k++) {
    // blocking (make copy of k-th row to localize references)
    Browk.assign(Brows[k]);

    // sparsity detection
    int maxCardinality = nx/CUT_OFF; // == heuristic depending on speedup
    Browk.getNonZeros(nonZeroIndexes,null,maxCardinality);
    int cardinality = nonZeroIndexes.size();
View Full Code Here

    div.multiplicator = 1 / LU.getQuick(k,k);
    Brows[k].assign(div);

    // blocking
    if (Browk==null) Browk = cern.colt.matrix.DoubleFactory1D.dense.make(B.columns());
    Browk.assign(Brows[k]);

    // sparsity detection
    int maxCardinality = nx/CUT_OFF; // == heuristic depending on speedup
    Browk.getNonZeros(nonZeroIndexes,null,maxCardinality);
    int cardinality = nonZeroIndexes.size();
View Full Code Here

    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));
      }
    }
  }
  return Q;
}
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.