当前位置: 首页>>代码示例>>Java>>正文


Java DenseMatrix64F.unsafe_get方法代码示例

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


在下文中一共展示了DenseMatrix64F.unsafe_get方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: gatherRowsAndColumns

import org.ejml.data.DenseMatrix64F; //导入方法依赖的package包/类
public static void gatherRowsAndColumns(final DenseMatrix64F source, final DenseMatrix64F destination,
                                                  final int[] rowIndices, final int[] colIndices) {

    final int rowLength = rowIndices.length;
    final int colLength = colIndices.length;
    final double[] out = destination.getData();

    int index = 0;
    for (int i = 0; i < rowLength; ++i) {
        final int rowIndex = rowIndices[i];
        for (int j = 0; j < colLength; ++j) {
            out[index] = source.unsafe_get(rowIndex, colIndices[j]);
            ++index;
        }
    }
}
 
开发者ID:beast-dev,项目名称:beast-mcmc,代码行数:17,代码来源:MissingOps.java

示例2: countFiniteDiagonals

import org.ejml.data.DenseMatrix64F; //导入方法依赖的package包/类
public static int countFiniteDiagonals(DenseMatrix64F source) {
    final int length = source.getNumCols();

    int count = 0;
    for (int i = 0; i < length; ++i) {
        final double d = source.unsafe_get(i, i);
        if (!Double.isInfinite(d)) {
            ++count;
        }
    }
    return count;
}
 
开发者ID:beast-dev,项目名称:beast-mcmc,代码行数:13,代码来源:MissingOps.java

示例3: countZeroDiagonals

import org.ejml.data.DenseMatrix64F; //导入方法依赖的package包/类
public static int countZeroDiagonals(DenseMatrix64F source) {
    final int length = source.getNumCols();

    int count = 0;
    for (int i = 0; i < length; ++i) {
        final double d = source.unsafe_get(i, i);
        if (d == 0.0) {
            ++count;
        }
    }
    return count;
}
 
开发者ID:beast-dev,项目名称:beast-mcmc,代码行数:13,代码来源:MissingOps.java

示例4: getFiniteDiagonalIndices

import org.ejml.data.DenseMatrix64F; //导入方法依赖的package包/类
public static void getFiniteDiagonalIndices(final DenseMatrix64F source, final int[] indices) {
    final int length = source.getNumCols();

    int index = 0;
    for (int i = 0; i < length; ++i) {
        final double d = source.unsafe_get(i, i);
        if (!Double.isInfinite(d)) {
            indices[index] = i;
            ++index;
        }
    }
}
 
开发者ID:beast-dev,项目名称:beast-mcmc,代码行数:13,代码来源:MissingOps.java

示例5: countFiniteNonZeroDiagonals

import org.ejml.data.DenseMatrix64F; //导入方法依赖的package包/类
public static int countFiniteNonZeroDiagonals(DenseMatrix64F source) {
    final int length = source.getNumCols();

    int count = 0;
    for (int i = 0; i < length; ++i) {
        final double d = source.unsafe_get(i, i);
        if (!Double.isInfinite(d) && d != 0.0) {
            ++count;
        }
    }
    return count;
}
 
开发者ID:beast-dev,项目名称:beast-mcmc,代码行数:13,代码来源:MissingOps.java

示例6: getFiniteNonZeroDiagonalIndices

import org.ejml.data.DenseMatrix64F; //导入方法依赖的package包/类
public static void getFiniteNonZeroDiagonalIndices(final DenseMatrix64F source, final int[] indices) {
    final int length = source.getNumCols();

    int index = 0;
    for (int i = 0; i < length; ++i) {
        final double d = source.unsafe_get(i, i);
        if (!Double.isInfinite(d) && d != 0.0) {
            indices[index] = i;
            ++index;
        }
    }
}
 
开发者ID:beast-dev,项目名称:beast-mcmc,代码行数:13,代码来源:MissingOps.java

示例7: computeFactorInnerProduct

import org.ejml.data.DenseMatrix64F; //导入方法依赖的package包/类
private double computeFactorInnerProduct(final WrappedVector mean, final DenseMatrix64F precision) {
    // Compute \mu_i^t P_i \mu^t
    double sum = 0;
    for (int row = 0; row < numFactors; ++row) {
        for (int col = 0; col < numFactors; ++col) {
            sum += mean.get(row) * precision.unsafe_get(row, col) * mean.get(col);
        }
    }
    return sum;
}
 
开发者ID:beast-dev,项目名称:beast-mcmc,代码行数:11,代码来源:IntegratedFactorAnalysisLikelihood.java


注:本文中的org.ejml.data.DenseMatrix64F.unsafe_get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。