Examples of unsafeSet()


Examples of mikera.matrixx.Matrix.unsafeSet()

        int n = compact ? numSingular : numCols;

        Matrix S = Matrix.create(m,n);
       
        for( int i = 0; i < numSingular; i++ ) {
            S.unsafeSet(i,i, singularValues[i]);
        }

        return S;
    }
View Full Code Here

Examples of mikera.matrixx.impl.DiagonalMatrix.unsafeSet()

  public static ADiagonalMatrix createScaleMatrix(int dimensions,
      double factor) {
    DiagonalMatrix im = new DiagonalMatrix(dimensions);
    for (int i = 0; i < dimensions; i++) {
      im.unsafeSet(i, i, factor);
    }
    return im;
  }

 
View Full Code Here

Examples of mikera.matrixx.impl.DiagonalMatrix.unsafeSet()

   */
  public static DiagonalMatrix createScaleMatrix(double... scalingFactors) {
    int dimensions = scalingFactors.length;
    DiagonalMatrix im = new DiagonalMatrix(dimensions);
    for (int i = 0; i < dimensions; i++) {
      im.unsafeSet(i, i, scalingFactors[i]);
    }
    return im;
  }

  /**
 
View Full Code Here

Examples of mikera.vectorz.AVector.unsafeSet()

  @Override
  public void unsafeSet(int row, int column, double value) {
    AVector v=getColumn(column);
    if (v.isFullyMutable()) {
      v.unsafeSet(row,value);
    } else {
      v=v.mutable();
      replaceColumn(column,v);
      v.unsafeSet(row,value);
    }
View Full Code Here

Examples of mikera.vectorz.AVector.unsafeSet()

    if (v.isFullyMutable()) {
      v.unsafeSet(row,value);
    } else {
      v=v.mutable();
      replaceColumn(column,v);
      v.unsafeSet(row,value);
    }
  }
 
  @Override
  public void set(AMatrix a) {
View Full Code Here

Examples of mikera.vectorz.AVector.unsafeSet()

      return;
    } else {
      v = v.sparseClone();
    }
    unsafeSetVec(i, v);
    v.unsafeSet(j, value);
  }

  @Override
  public double unsafeGet(int row, int column) {
    return getRow(row).unsafeGet(column);
View Full Code Here

Examples of mikera.vectorz.AVector.unsafeSet()

  @Override
  public void unsafeSet(int row, int column, double value) {
    AVector v=getRow(row);
    if (v.isFullyMutable()) {
      v.unsafeSet(column,value);
    } else {
      v=v.mutable();
      replaceRow(row,v);
      v.unsafeSet(column,value);
    }
View Full Code Here

Examples of mikera.vectorz.AVector.unsafeSet()

    if (v.isFullyMutable()) {
      v.unsafeSet(column,value);
    } else {
      v=v.mutable();
      replaceRow(row,v);
      v.unsafeSet(column,value);
    }
  }
 
  @Override
  public void set(AMatrix a) {
View Full Code Here

Examples of mikera.vectorz.AVector.unsafeSet()

    AVector b = getRowView(j);
    int cc = columnCount();
    for (int k = 0; k < cc; k++) {
      double t = a.unsafeGet(k);
      a.unsafeSet(k, b.unsafeGet(k));
      b.unsafeSet(k, t);
    }
  }

  /**
   * Swaps two columns of the matrix in place
View Full Code Here

Examples of mikera.vectorz.AVector.unsafeSet()

    AVector b = getColumnView(j);
    int rc = rowCount();
    for (int k = 0; k < rc; k++) {
      double t = a.unsafeGet(k);
      a.unsafeSet(k, b.unsafeGet(k));
      b.unsafeSet(k, t);
    }
  }
 
  public void composeWith(AMatrix a) {
    AMatrix t=compose(a);
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.