Package mikera.matrixx.impl

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


   */
  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

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.