本文整理汇总了C++中Simplex::dimension方法的典型用法代码示例。如果您正苦于以下问题:C++ Simplex::dimension方法的具体用法?C++ Simplex::dimension怎么用?C++ Simplex::dimension使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Simplex
的用法示例。
在下文中一共展示了Simplex::dimension方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
bool operator()(const Simplex& s1, const Simplex& s2) const
{
if (s1.dimension() == s2.dimension())
return s1.get_value() < s2.get_value();
else
return s1.dimension() < s2.dimension();
}
示例2: add_cofaces
void add_cofaces (const Graph& graph, Simplex& tau,
const Neighbors& neighbors,
Complex& complex, const std::size_t dimension) {
typedef typename Neighbors::const_iterator Neighbor_iterator;
complex.insert_open_cell(tau);
if(tau.dimension() >= dimension) { return; }
Neighbors lower_neighbors;
Neighbors final_neighbors;
for(Neighbor_iterator i = neighbors.begin(); i != neighbors.end(); ++i){
lower_neighbors.clear();
Simplex sigma( tau);
sigma.insert( *i);
get_lower_neighbors(graph, *i, lower_neighbors);
final_neighbors.clear();
set_intersection(lower_neighbors.begin(),lower_neighbors.end(),
neighbors.begin(),neighbors.end(),
back_inserter(final_neighbors));
add_cofaces(graph, sigma, final_neighbors, complex, dimension);
}
}