Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickDeelen committed Jan 17, 2023
2 parents 783066c + 35bdd81 commit 75b906a
Showing 1 changed file with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -659,13 +659,13 @@ public static DoubleMatrixDataset<String, String>[] blockDiagonalEigenDecomposit
DoubleMatrix curMatrix = toJblasDoubleMatrix(provider.viewBlock(curIndex));
DoubleMatrix[] eigen = Eigen.symmetricEigenvectors(curMatrix);

for (int i = 0; i < curMatrix.rows; i++) {
eigenvalues.add(new IndexedDouble(eigen[1].get(i, i), masterIndex));
masterIndex++;
for (int j = 0; j < curMatrix.columns; j++) {
U.setElementQuick(curIndex[i], curIndex[j], eigen[0].get(i, j));
for (int j = 0; j < curMatrix.columns; j++) {
eigenvalues.add(new IndexedDouble(eigen[1].get(j, j), masterIndex));
for (int i = 0; i < curMatrix.rows; i++) {
U.setElementQuick(curIndex[i], masterIndex, eigen[0].get(i, j));
}
}
masterIndex++;
}
pb.step();
}

Expand All @@ -681,13 +681,13 @@ public static DoubleMatrixDataset<String, String>[] blockDiagonalEigenDecomposit
DoubleMatrix2D curMatrix = provider.viewBlock(curIndex);
DenseDoubleEigenvalueDecomposition eigen = new DenseDoubleEigenvalueDecomposition(curMatrix);

for (int i = 0; i < curMatrix.rows(); i++) {
eigenvalues.add(new IndexedDouble(eigen.getRealEigenvalues().get(i), masterIndex));
masterIndex++;
for (int j = 0; j < curMatrix.columns(); j++) {
U.setElementQuick(curIndex[i], curIndex[j], eigen.getV().getQuick(i, j));
}
}
for (int j = 0; j < curMatrix.columns(); j++) {
eigenvalues.add(new IndexedDouble(eigen.getRealEigenvalues().get(j), masterIndex));
for (int i = 0; i < curMatrix.rows(); i++) {
U.setElementQuick(curIndex[i], masterIndex, eigen.getV().getQuick(i, j));
}
masterIndex++;
}

pb.step();
}
Expand Down

0 comments on commit 75b906a

Please sign in to comment.