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

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

Introduction

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

Prototype

@Override
public double getEntry(final int row, final int column) throws OutOfRangeException 

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]));
    }//from www .j a va 2  s. co m
    RealMatrix ret = eigenA.getV().multiply(D.multiply(eigenA.getVT()));
    return ret;
}