annotate c/test_feature.cpp @ 190:36968a63efe1

Got the connected_components to finally work using a vecS for the vertex list in the adjacency list. In this case, the component map is simply a vector of ints (which is the type of UndirectedGraph::vextex_descriptor (=graph_traits<FeatureGraph>::vertex_descriptor) and probably UndirectedGraph::vertices_size_type). To use listS, I was told on the Boost mailing list: >> If you truly need listS, you will need to create a vertex index >> map, fill it in before you create the property map, and pass it to the >> vector_property_map constructor (and as a type argument to that class). It may be feasible with a component map like shared_array_property_map< graph_traits<FeatureGraph>::vertex_descriptor, property_map<FeatureGraph, vertex_index_t>::const_type > components(num_vertices(g), get(vertex_index, g));
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Wed, 07 Dec 2011 18:51:32 -0500
parents 61fd5aff418c
children aeab0b88c9b6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
162
61fd5aff418c added basics to run tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
1 #define BOOST_TEST_MODULE traffic intelligence
61fd5aff418c added basics to run tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
2
61fd5aff418c added basics to run tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
3 #include <boost/test/unit_test.hpp>
61fd5aff418c added basics to run tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
4 #include <boost/test/floating_point_comparison.hpp>
61fd5aff418c added basics to run tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
5
61fd5aff418c added basics to run tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
6 using namespace std;
61fd5aff418c added basics to run tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
7
61fd5aff418c added basics to run tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
8 BOOST_AUTO_TEST_SUITE(test_process)
61fd5aff418c added basics to run tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
9
61fd5aff418c added basics to run tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
10 BOOST_AUTO_TEST_CASE(feature_stationary) {
61fd5aff418c added basics to run tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
11 int i=5;
61fd5aff418c added basics to run tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
12 BOOST_CHECK_EQUAL(i, 5);
61fd5aff418c added basics to run tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
13 }
61fd5aff418c added basics to run tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
14
61fd5aff418c added basics to run tests
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
15 BOOST_AUTO_TEST_SUITE_END()