33 #include "DGtal/helpers/StdDefs.h"
35 #include "DGtal/base/Common.h"
36 #include "DGtal/graph/CVertexMap.h"
37 #include "DGtal/graph/STLMapToVertexMapAdapter.h"
44 using namespace DGtal;
57 bool testMapToVertexMap()
62 typedef map<Vertex, Value> Map;
66 myMap.setValue(Point(1,1), 10);
67 myMap.setValue(Point(2,3), 2);
69 return (myMap(Point(1,1)) == 10 && myMap(Point(2,3)) == 2);
77 int main(
int ,
char** )
81 bool res = testMapToVertexMap();
82 trace.
emphase() << ( res ?
"Passed." :
"Error." ) << endl;
void beginBlock(const std::string &keyword="")
Aim: Gathers several functions useful for concept checks.
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: This class adapts any map of the STL to match with the CVertexMap concept.
Aim: models of CVertexMap concept implement mapping between graph vertices and values.