COIN-OR::LEMON - Graph Library

Changeset 2032:18c08f9129e4 in lemon-0.x for test


Ignore:
Timestamp:
04/03/06 18:03:37 (14 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2671
Message:

Writeable extension of some maps

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/maps_test.cc

    r1956 r2032  
    1717 */
    1818
     19#include <deque>
     20#include <set>
     21
    1922#include <lemon/concept_check.h>
    2023#include <lemon/concept/maps.h>
     
    2730
    2831struct A {};
     32inline bool operator<(A, A) { return true; }
    2933struct B {};
    3034
     
    4246
    4347typedef ReadMap<A,double> DoubleMap;
     48typedef ReadWriteMap<A, double> WriteDoubleMap;
     49
     50typedef ReadMap<A,bool> BoolMap;
     51typedef ReadWriteMap<A, bool> BoolWriteMap;
    4452
    4553int main()
     
    5664  checkConcept<ReadMap<A,double>, DivMap<DoubleMap,DoubleMap> >();
    5765  checkConcept<ReadMap<A,double>, NegMap<DoubleMap> >();
     66  checkConcept<ReadWriteMap<A,double>, NegWriteMap<WriteDoubleMap> >();
    5867  checkConcept<ReadMap<A,double>, AbsMap<DoubleMap> >();
    5968  checkConcept<ReadMap<A,double>, ShiftMap<DoubleMap> >();
     69  checkConcept<ReadWriteMap<A,double>, ShiftWriteMap<WriteDoubleMap> >();
    6070  checkConcept<ReadMap<A,double>, ScaleMap<DoubleMap> >();
     71  checkConcept<ReadWriteMap<A,double>, ScaleWriteMap<WriteDoubleMap> >();
     72  checkConcept<ReadMap<A,double>, ForkMap<DoubleMap, DoubleMap> >();
     73  checkConcept<ReadWriteMap<A,double>,
     74    ForkWriteMap<WriteDoubleMap, WriteDoubleMap> >();
    6175 
    6276  checkConcept<ReadMap<B,double>, ComposeMap<DoubleMap,ReadMap<B,A> > >();
    6377
    6478  checkConcept<ReadMap<A,B>, FunctorMap<F, A, B> >();
     79
     80  checkConcept<ReadMap<A, bool>, NotMap<BoolMap> >();
     81  checkConcept<ReadWriteMap<A, bool>, NotWriteMap<BoolWriteMap> >();
     82
     83  checkConcept<WriteMap<A, bool>, StoreBoolMap<A*> >();
     84  checkConcept<WriteMap<A, bool>, BackInserterBoolMap<std::deque<A> > >();
     85  checkConcept<WriteMap<A, bool>, FrontInserterBoolMap<std::deque<A> > >();
     86  checkConcept<WriteMap<A, bool>, InserterBoolMap<std::set<A> > >();
     87  checkConcept<WriteMap<A, bool>, FillBoolMap<WriteMap<A, B> > >();
     88  checkConcept<WriteMap<A, bool>, SettingOrderBoolMap<WriteMap<A, int> > >();
    6589
    6690  int a;
Note: See TracChangeset for help on using the changeset viewer.