本文整理汇总了Java中no.uib.cipr.matrix.NotConvergedException.getMessage方法的典型用法代码示例。如果您正苦于以下问题:Java NotConvergedException.getMessage方法的具体用法?Java NotConvergedException.getMessage怎么用?Java NotConvergedException.getMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类no.uib.cipr.matrix.NotConvergedException
的用法示例。
在下文中一共展示了NotConvergedException.getMessage方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: logGeneralizedDeterminant
import no.uib.cipr.matrix.NotConvergedException; //导入方法依赖的package包/类
public static double logGeneralizedDeterminant(SymmTridiagMatrix X) {
//Set up the eigenvalue solver
SymmTridiagEVD eigen = new SymmTridiagEVD(X.numRows(), false);
//Solve for the eigenvalues
try {
eigen.factor(X);
} catch (NotConvergedException e) {
throw new RuntimeException("Not converged error in generalized determinate calculation.\n" + e.getMessage());
}
//Get the eigenvalues
double[] x = eigen.getEigenvalues();
double a = 0;
for (double d : x) {
if (d > 0.00001)
a += Math.log(d);
}
return a;
}
示例2: logGeneralizedDeterminant
import no.uib.cipr.matrix.NotConvergedException; //导入方法依赖的package包/类
public static double logGeneralizedDeterminant(SymmTridiagMatrix X) {
//Set up the eigenvalue solver
SymmTridiagEVD eigen = new SymmTridiagEVD(X.numRows(), false);
//Solve for the eigenvalues
try {
eigen.factor(X);
} catch (NotConvergedException e) {
throw new RuntimeException("Not converged error in generalized determinate calculation.\n" + e.getMessage());
}
//Get the eigenvalues
double[] x = eigen.getEigenvalues();
double a = 0;
for (double d : x) {
if (d > 0.00001)
a += Math.log(d);
}
return a;
}
示例3: estimate_internal
import no.uib.cipr.matrix.NotConvergedException; //导入方法依赖的package包/类
private void estimate_internal(Matrix y, Matrix x) {
try {
final no.uib.cipr.matrix.DenseMatrix mjtX = new no.uib.cipr.matrix.DenseMatrix(x.getArray());
no.uib.cipr.matrix.SVD svd;
svd = no.uib.cipr.matrix.SVD.factorize(mjtX);
final Matrix u = MatrixUtils.convert(svd.getU(), svd.getU().numRows(), svd.getS().length);
final Matrix v = MatrixUtils.convert(svd.getVt(), svd.getS().length, svd.getVt().numColumns()).transpose();
final Matrix d = MatrixUtils.diag(svd.getS());
weights = v.times(MatrixUtils.pseudoInverse(d)).times(u.transpose()).times(y);
} catch (final NotConvergedException e) {
throw new RuntimeException(e.getMessage());
}
}