Changeset 2339 for trunk/test/Suite.h


Ignore:
Timestamp:
Oct 16, 2010, 4:17:30 PM (11 years ago)
Author:
Peter
Message:

refs #627 extending NeighborWeighting? concept to require defaulf constructor and assign operator. Added a archetype class in test.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/Suite.h

    r2338 r2339  
    2424*/
    2525
     26#include <yat/utility/VectorMutable.h>
     27#include <yat/classifier/Target.h>
     28
    2629#include <boost/concept_archetype.hpp>
    2730
    2831#include <iosfwd>
    2932#include <sstream>
     33#include <vector>
    3034
    3135namespace theplu {
     
    243247    distance_archetype(void);
    244248    distance_archetype& operator=(const distance_archetype&);
     249  };
     250
     251  /*
     252    class to test (at compile time) that a function (or class) works
     253    with a NeighborWeighting. Do not run any test using this class because
     254    the class is not really functional at run time.
     255
     256    \see boost/concept_archetype.hpp
     257   */
     258  class neighbor_weighting_archetype
     259  {
     260  public:
     261    neighbor_weighting_archetype(void) {}
     262    void operator()(const utility::VectorBase& distance,
     263                    const std::vector<size_t>& k_sorted,
     264                    const classifier::Target& target,
     265                    utility::VectorMutable& prediction) const {}
     266    neighbor_weighting_archetype& operator=(const neighbor_weighting_archetype&)
     267    { return *this; }
     268  private:
     269    neighbor_weighting_archetype(const neighbor_weighting_archetype&) {};
    245270  };
    246271
Note: See TracChangeset for help on using the changeset viewer.