if (FALSE) {
# Check matrix suitability
check_result <- bdEigen_check_matrix("data.h5", "matrices", "my_matrix")
if (check_result$suitable_for_eigen) {
# Use appropriate solver based on recommendation
if (check_result$recommended_solver == "symmetric") {
result <- bdEigen_hdf5("data.h5", "matrices", "my_matrix", which = "LA")
} else {
result <- bdEigen_hdf5("data.h5", "matrices", "my_matrix", which = "LM")
}
} else {
cat("Matrix is not suitable for eigendecomposition\n")
}
}
Run the code above in your browser using DataLab