本文整理汇总了C++中Space::join方法的典型用法代码示例。如果您正苦于以下问题:C++ Space::join方法的具体用法?C++ Space::join怎么用?C++ Space::join使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Space
的用法示例。
在下文中一共展示了Space::join方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mtmetis
mtmetis( const Space& base, const Family& tau )
: base_( base ), tau_( tau ), nvtxs_( base_.size() )
{
xadj_ = new int[ nvtxs_ + 1 ];
std::vector< Space > adjs;
int offset = 0;
xadj_[ 0 ] = 0;
for ( typename Space::const_iterator it = base_.begin()
; it != base_.end(); ++it
)
{ // Be care of retreaving diagonals.
const Space& s = tau_( CPoint( it ).element );
Space p; p.join( CPoint( it ).element );
adjs.push_back( s / p );
xadj_[ CPoint( it ).index + 1 ] = adjs[ offset++ ].size();
}
for ( int i = 0; i < nvtxs_; ++i ) xadj_[ i + 1 ] += xadj_[ i ];
adjy_ = new int[ xadj_[ nvtxs_ ] ];
offset = 0;
for ( typename Space::const_iterator it = base_.begin()
; it != base_.end(); ++it
)
{
const Space& adj = adjs[ offset++ ];
int i = CPoint( it ).index;
int k = 0;
for ( typename Space::const_iterator jt = adj.begin()
; jt != adj.end(); ++jt
)
{
int j = base_.index( CPoint( jt ).element );
adjy_[ xadj_[ i ] + k ] = j;
++k;
}
}
perm_ = new int[ nvtxs_ ];
iperm_ = new int[ nvtxs_ ];
reorder();
}
示例2: u
generator( const Matrix& A ) : A_( A )
{
const int c = 0;
const int *ind = A_.ind(), *col = A_.col();
for ( int i = 0; i < A_.m(); ++i ) base_.join( Element( i, c ) );
for ( int i = 0; i < A_.m(); ++i )
{
Neighbour u( i, c );
for ( int k = ind[ i ]; k < ind[ i + 1 ]; ++k )
{
int j = col[ k ];
u.join( j, c );
}
topo_.join( u );
}
}