Changeset 3543 for trunk/test/Suite.h


Ignore:
Timestamp:
Dec 23, 2016, 8:04:15 AM (6 years ago)
Author:
Peter
Message:

refs #803. use boost iterator categories in normalizer::Spearman

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/Suite.h

    r3539 r3543  
    732732
    733733
    734   // For convenience four classes that are typical data iterators for
    735   // combinations of const/mutable and weighted/unweighted. Traversal
     734  // For convenience to create data iterator. This class typedefs four
     735  // classes that can be conveniently constructed in tests
     736  // (const/mutable and weighted/unweighted. Traversal
    736737  // is expected to be one of:
    737   // boost::incrementable_traversal_tag
    738   // boost::single_pass_traversal_tag
     738  //// boost::incrementable_traversal_tag (problematic with unweighted)
     739  // boost::single_pass_traversal_tag (problematic with unweighted)
    739740  // boost::forward_traversal_tag
    740741  // boost::bidirectional_traversal_tag
    741742  // boost::random_access_traversal_tag
    742   //
    743   // Note, is problematic to construct with
    744   // incrementable_traversal_tag or single_pass_traversal_tag
    745743  template<typename Traversal>
    746   class UnweightedConstDataIterator
    747     : public boost::iterator_archetype<
    748     double,
    749     boost::iterator_archetypes::readable_iterator_t,
    750     Traversal
    751     >
    752   {};
    753 
    754 
    755   template<typename Traversal>
    756   class UnweightedDataIterator
    757     : public boost::iterator_archetype<
    758     double,
    759     boost::iterator_archetypes::readable_writable_iterator_t,
    760     Traversal
    761     >
    762   {};
    763 
    764   template<typename Traversal>
    765   class WeightedConstDataIterator
    766     : public utility::WeightedIteratorArchetype<
    767     boost::iterator_archetypes::readable_iterator_t,
    768     Traversal>
    769   {};
    770 
    771   template<typename Traversal>
    772   class WeightedDataIterator
    773     : public utility::WeightedIteratorArchetype<
    774     boost::iterator_archetypes::readable_writable_iterator_t,
    775     Traversal>
    776   {};
    777 
    778 
     744  struct DataIterator
     745  {
     746    typedef boost::iterator_archetype<
     747      double,
     748      boost::iterator_archetypes::readable_iterator_t,
     749      Traversal
     750      > unweighted_const_iterator;
     751
     752    typedef boost::iterator_archetype<
     753      double,
     754      boost::iterator_archetypes::readable_writable_iterator_t,
     755      Traversal
     756      > unweighted_iterator;
     757
     758
     759    typedef utility::WeightedIteratorArchetype<
     760      boost::iterator_archetypes::readable_iterator_t, Traversal
     761      >
     762    weighted_const_iterator;
     763
     764    typedef utility::WeightedIteratorArchetype<
     765      boost::iterator_archetypes::readable_writable_iterator_t,
     766      Traversal
     767      >
     768    weighted_iterator;
     769  };
    779770}}}
    780771
Note: See TracChangeset for help on using the changeset viewer.