Java EigenDecomposition.getSquareRoot方法代码示例(javaeigendecomposition.getsquareroot方法的典型用法代码示例)

本文整理汇总了Java中org.apache.commons.math3.linear.EigenDecomposition.getSquareRoot方法的典型用法代码示例。如果您正苦于以下问题:Java EigenDecomposition.getSquareRoot方法的具体用法?Java EigenDecomposition.getSquareRoot怎么用?Java EigenDecomposition.getSquareRoot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.commons.math3.linear.EigenDecomposition的用法示例。


Java EigenDecomposition.getSquareRoot方法代码示例(javaeigendecomposition.getsquareroot方法的典型用法代码示例)

在下文中一共展示了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

上一篇:Java FTPClient.changeWorkingDirectory方法代码示例(javaftpclient.changeworkdirectory方法的典型用法代码示例)
下一篇:拐卖的解释拐卖的解释是什么(拐卖是什么意思)

为您推荐