45 template <
typename Domain>
57 template <
typename Domain>
61 : myDomain( d ), myVector()
69 template <
typename Domain>
82 template <
typename Domain>
88 ASSERT( ( myDomain.lowerBound() <= other.
myDomain.lowerBound() )
89 && ( myDomain.upperBound() >= other.
myDomain.upperBound() )
90 &&
"This domain should include the domain of the other set in case of assignment." );
99 template <
typename Domain>
113 template <
typename Domain>
118 return (
unsigned int)myVector.size();
124 template <
typename Domain>
129 return myVector.empty();
138 template <
typename Domain>
146 myVector.push_back( p );
157 template <
typename Domain>
158 template <
typename Po
intInputIterator>
162 ( PointInputIterator first, PointInputIterator last )
164 for ( ; first != last; ++first )
178 template <
typename Domain>
184 ASSERT_ALL_PRE( find( p ) == end() );
185 myVector.push_back( p );
202 template <
typename Domain>
203 template <
typename Po
intInputIterator>
207 ( PointInputIterator first, PointInputIterator last )
209 while ( first != last )
210 myVector.push_back( *first++ );
221 template <
typename Domain>
242 template <
typename Domain>
247 *it = myVector.back();
258 template <
typename Domain>
263 while ( ( last != end() )
264 && ( first != last ) )
266 *first++ = myVector.back();
270 while ( first != end() )
278 template <
typename Domain>
290 template <
typename Domain>
297 if ( p == *it )
return it;
305 template <
typename Domain>
311 for (
Iterator it = begin(); it != it_end; ++it )
312 if ( p == *it )
return it;
320 template <
typename Domain>
325 return myVector.begin();
331 template <
typename Domain>
336 return myVector.end();
343 template <
typename Domain>
348 return myVector.begin();
355 template <
typename Domain>
360 return myVector.end();
367 template <
typename Domain>
375 std::vector<Point> other( aSet.
myVector );
376 std::stable_sort( other.begin(), other.end() );
377 std::stable_sort( begin(), end() );
378 std::vector<Point> new_vector;
379 new_vector.reserve( size() + other.size() );
380 std::set_union( begin(), end(), other.begin(), other.end(),
381 std::back_insert_iterator< std::vector<Point> >
383 myVector.swap( new_vector );
393 template <
typename Domain>
394 template <
typename TOutputIterator>
399 typename Domain::ConstIterator itPoint = myDomain.begin();
400 typename Domain::ConstIterator itEnd = myDomain.end();
401 while ( itPoint != itEnd ) {
402 if ( std::find( begin(), end(), *itPoint ) == end() ) {
415 template <
typename Domain>
422 typename Domain::ConstIterator itPoint = myDomain.begin();
423 typename Domain::ConstIterator itEnd = myDomain.end();
424 while ( itPoint != itEnd ) {
425 if ( std::find( other_set.
begin(),
427 *itPoint ) == other_set.
end() ) {
442 template <
typename Domain>
448 if ( begin() != end() )
453 for ( ; it != it_end; ++it )
454 if ( it->isLower( lower ) ) lower = *it;
455 else if ( it->isUpper( upper ) ) upper = *it;
459 lower = myDomain.upperBound();
460 upper = myDomain.lowerBound();
472 template <
typename Domain>
477 out <<
"[DigitalSetBySTLVector]" <<
" size=" << size();
484 template <
typename Domain>
500 template<
typename Domain>
505 return "DigitalSetBySTLVector";
511 template <
typename Domain>
517 object.selfDisplay( out );