Changeset 3538 for trunk/test/Suite.h


Ignore:
Timestamp:
Dec 22, 2016, 8:21:12 AM (6 years ago)
Author:
Peter
Message:

convenience classes for archetypes of data iterators

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/Suite.h

    r3459 r3538  
    4242
    4343#include <yat/utility/VectorMutable.h>
     44#include <yat/utility/WeightedIteratorArchetype.h>
    4445#include <yat/classifier/Target.h>
    4546
     
    731732
    732733
     734  // For convenience four classes that are typical data iterators for
     735  // combinations of const/mutable and weighted/unweighted. Traversal
     736  // is eccpected to be one of:
     737  // boost::incrementable_traversal_tag
     738  // boost::single_pass_traversal_tag
     739  // boost::forward_traversal_tag
     740  // boost::bidirectional_traversal_tag
     741  // boost::random_access_traversal_tag
     742  template<typename Traversal>
     743  class UnweightedConstDataIterator
     744    : public boost::iterator_archetype<
     745    double,
     746    boost::iterator_archetypes::readable_iterator_t,
     747    Traversal
     748    >
     749  {};
     750
     751
     752  template<typename Traversal>
     753  class UnweightedDataIterator
     754    : public boost::iterator_archetype<
     755    double,
     756    boost::iterator_archetypes::readable_writable_iterator_t,
     757    Traversal
     758    >
     759  {};
     760
     761  template<typename Traversal>
     762  class WeightedConstDataIterator
     763    : public utility::WeightedIteratorArchetype<
     764    boost::iterator_archetypes::readable_iterator_t,
     765    Traversal>
     766  {};
     767
     768  template<typename Traversal>
     769  class WeightedDataIterator
     770    : public utility::WeightedIteratorArchetype<
     771    boost::iterator_archetypes::readable_writable_iterator_t,
     772    Traversal>
     773  {};
     774
     775
    733776}}}
    734777
Note: See TracChangeset for help on using the changeset viewer.