+// -------------------------------------------------------------------------
+template< class _TIndices >
+void CTBronchi::Process::
+_Points(
+ _TIndices& a, unsigned int ca,
+ _TIndices& b, unsigned int cb,
+ _TIndices& c, unsigned int cc,
+ _TIndices& d
+ )
+{
+ std::random_device rd;
+ std::mt19937 gen( rd( ) );
+ d.clear( );
+ while( d.size( ) < ca )
+ {
+ std::uniform_int_distribution< > dis( 0, a.size( ) - 1 );
+ unsigned int N = dis( gen );
+ typename _TIndices::const_iterator it = a.begin( );
+ for( unsigned int i = 0; i < N; ++i, ++it );
+ d.insert( *it );
+
+ } // fi
+ while( d.size( ) < ca + cb )
+ {
+ std::uniform_int_distribution< > dis( 0, b.size( ) - 1 );
+ unsigned int N = dis( gen );
+ typename _TIndices::const_iterator it = b.begin( );
+ for( unsigned int i = 0; i < N; ++i, ++it );
+ d.insert( *it );
+
+ } // fi
+ while( d.size( ) < ca + cb + cc )
+ {
+ std::uniform_int_distribution< > dis( 0, c.size( ) - 1 );
+ unsigned int N = dis( gen );
+ typename _TIndices::const_iterator it = c.begin( );
+ for( unsigned int i = 0; i < N; ++i, ++it );
+ d.insert( *it );
+
+ } // fi
+}
+