本文整理汇总了C++中arma::cube::print方法的典型用法代码示例。如果您正苦于以下问题:C++ cube::print方法的具体用法?C++ cube::print怎么用?C++ cube::print使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类arma::cube
的用法示例。
在下文中一共展示了cube::print方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: checkAllComponents
/** For debugging reasons*/
void checkAllComponents() {
arma::vec rowSumA = arma::sum(A_, 1);
rowSumA.print("rowSumA");
double sumPi = arma::sum(pi_);
std::cout << "sumPi: " << sumPi << std::endl;
arma::vec weights = arma::zeros((unsigned int)BModels_.size());
for (unsigned int i = 0; i < (unsigned int) BModels_.size(); ++i) {
weights(i) = arma::accu(BModels_[i].getWeights());
}
weights.print("bCumWeights");
arma::rowvec checksum = arma::sum(gamma_);
checksum.print("checksum");
arma::uvec checksumIndices = arma::find(checksum < 1.0 - 1E-2);
if (checksumIndices.n_elem >= 1) {
arma::rowvec checksumAlpha = arma::sum(alpha_);
checksumAlpha.print("checkAlpha");
//alpha_.print("alpha");
arma::rowvec checksumBeta = arma::sum(beta_);
checksumBeta.print("checkBeta");
//beta_.print("beta");
c_.print("c");
throw std::runtime_error("data going wonky");
}
if (!arma::is_finite(A_)) {
A_.print("A Fail");
throw std::runtime_error("A has invalid entries");
}
if (!arma::is_finite(pi_)) {
pi_.print("pi Fail");
throw std::runtime_error("pi has invalid entries");
}
if (!arma::is_finite(alpha_)) {
alpha_.print("alpha Fail");
throw std::runtime_error("alpha has invalid entries");
}
if (!arma::is_finite(beta_)) {
beta_.print("beta Fail");
throw std::runtime_error("beta has invalid entries");
}
if (!arma::is_finite(gamma_)) {
gamma_.print("gamma Fail");
throw std::runtime_error("gamma has invalid entries");
}
if (!arma::is_finite(xi_)) {
xi_.print("xi Fail");
throw std::runtime_error("xi has invalid entries");
}
}