本文整理汇总了C++中Pyramid::get_links方法的典型用法代码示例。如果您正苦于以下问题:C++ Pyramid::get_links方法的具体用法?C++ Pyramid::get_links怎么用?C++ Pyramid::get_links使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pyramid
的用法示例。
在下文中一共展示了Pyramid::get_links方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: acc
Stats<floating_t> stats_downward_links(const Pyramid& p, const Node& node)
{
using accumulators::extract::sum;
using accumulators::stat_acc;
namespace tag = accumulators::tag;
using accumulators::left;
auto acc = stat_acc<floating_t>{tag::tail<left>::cache_size = 16};
for (const auto& desc : common::descs(node)) {
acc(p.get_links()(node, desc));
}
return Stats<floating_t>{"down links", node.level, acc};
}
示例2: print_stats
void print_stats(const Pyramid& p, level_t lv)
{
using namespace stats;
if (lv > 0) {
std::cout << std::endl << analyse_weights(p.get_links(), lv);
}
std::cout << std::endl << detail::analyse("area", p.get_area()[lv]);
std::cout << std::endl << detail::analyse("looks", p.get_looks()[lv]);
std::cout << std::endl << detail::analyse("var", p.get_var()[lv]);
std::cout << std::endl << detail::analyse("v1_00", p.get_value1()[lv], 0);
std::cout << std::endl << detail::analyse("v1_11", p.get_value1()[lv], 1);
std::cout << std::endl << detail::analyse("v1_22", p.get_value1()[lv], 2);
std::cout << std::endl << detail::analyse("v2_00", p.get_value2()[lv], 0);
std::cout << std::endl << detail::analyse("v2_11", p.get_value2()[lv], 1);
std::cout << std::endl << detail::analyse("v2_22", p.get_value2()[lv], 2);
std::cout << std::endl;
}
示例3: smooth_helper
void smooth_helper(Pyramid& p, smooth_level_fun smooth, const size_t top_level)
{
using boost::irange;
using boost::adaptors::reversed;
using namespace std;
auto cnt = 0;
auto v_copy = ImagePyramid{p.get_value2()};
auto w_copy = LinkPyramid{p.get_links()};
auto levels = irange(0ul, top_level + 1);
for (const auto lv : levels | reversed) {
cout << "Smoothing Level " << lv << " ... ";
cnt += smooth(v_copy, w_copy, lv);
cout << endl;
}
p.set_result(v_copy.bottom());
cout << "Done." << endl;
cout << "Number of Segments: " << cnt << endl;
}