Example usage for org.apache.commons.math3.linear DiagonalMatrix setEntry

List of usage examples for org.apache.commons.math3.linear DiagonalMatrix setEntry

Introduction

In this page you can find the example usage for org.apache.commons.math3.linear DiagonalMatrix setEntry.

Prototype

@Override
public void setEntry(final int row, final int column, final double value)
        throws OutOfRangeException, MathUnsupportedOperationException 

Source Link

Usage

From source file:org.rhwlab.dispim.nucleus.NucleusData.java

public RealMatrix adjustPrecision() {
    DiagonalMatrix D = new DiagonalMatrix(eigenA.getRealEigenvalues());
    for (int i = 0; i < R.length; ++i) {
        double lambda = D.getEntry(i, i);
        D.setEntry(i, i, lambda / (R[i] * R[i]));
    }/*w ww.j a va  2s . c om*/
    RealMatrix ret = eigenA.getV().multiply(D.multiply(eigenA.getVT()));
    return ret;
}