本文整理汇总了Java中org.apache.commons.math3.linear.EigenDecomposition.getSquareRoot方法的典型用法代码示例。如果您正苦于以下问题:Java EigenDecomposition.getSquareRoot方法的具体用法?Java EigenDecomposition.getSquareRoot怎么用?Java EigenDecomposition.getSquareRoot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.math3.linear.EigenDecomposition
的用法示例。
在下文中一共展示了EigenDecomposition.getSquareRoot方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: squareRoot
import org.apache.commons.math3.linear.EigenDecomposition; //导入方法依赖的package包/类
/**
* Computes the square-root of the weight matrix.
*
* @param m Symmetric, positive-definite (weight) matrix.
* @return the square-root of the weight matrix.
*/
private static RealMatrix squareRoot(final RealMatrix m) {
if (m instanceof DiagonalMatrix) {
final int dim = m.getRowDimension();
final RealMatrix sqrtM = new DiagonalMatrix(dim);
for (int i = 0; i < dim; i++) {
sqrtM.setEntry(i, i, FastMath.sqrt(m.getEntry(i, i)));
}
return sqrtM;
} else {
final EigenDecomposition dec = new EigenDecomposition(m);
return dec.getSquareRoot();
}
}
开发者ID:biocompibens,项目名称:SME,代码行数:20,代码来源:LeastSquaresFactory.java示例2: squareRoot
import org.apache.commons.math3.linear.EigenDecomposition; //导入方法依赖的package包/类
/**
* Computes the square-root of the weight matrix.
*
* @param m Symmetric, positive-definite (weight) matrix.
* @return the square-root of the weight matrix.
*/
private RealMatrix squareRoot(RealMatrix m) {
if (m instanceof DiagonalMatrix) {
final int dim = m.getRowDimension();
final RealMatrix sqrtM = new DiagonalMatrix(dim);
for (int i = 0; i < dim; i++) {
sqrtM.setEntry(i, i, FastMath.sqrt(m.getEntry(i, i)));
}
return sqrtM;
} else {
final EigenDecomposition dec = new EigenDecomposition(m);
return dec.getSquareRoot();
}
}
开发者ID:biocompibens,项目名称:SME,代码行数:20,代码来源:AbstractLeastSquaresOptimizer.java示例3: squareRoot
import org.apache.commons.math3.linear.EigenDecomposition; //导入方法依赖的package包/类
/**
* Computes the square-root of the weight matrix.
*
* @param m Symmetric, positive-definite (weight) matrix.
* @return the square-root of the weight matrix.
*/
private RealMatrix squareRoot(RealMatrix m) {
if (m instanceof DiagonalMatrix) {
final int dim = m.getRowDimension();
final RealMatrix sqrtM = new DiagonalMatrix(dim);
for (int i = 0; i < dim; i++) {
sqrtM.setEntry(i, i, FastMath.sqrt(m.getEntry(i, i)));
}
return sqrtM;
} else {
final EigenDecomposition dec = new EigenDecomposition(m);
return dec.getSquareRoot();
}
}
开发者ID:biocompibens,项目名称:SME,代码行数:20,代码来源:AbstractLeastSquaresOptimizer.java本文标签属性:
示例:示例是什么意思
代码:代码转换器
java:java自行车
EigenDecomposition:EigenDecomposition
getSquareRoot:getSquareRoot