|
NetOptim 1.2.6
|
Alternative test case generators with edge IDs. More...
#include <boost/graph/adjacency_list.hpp>#include <boost/graph/graph_traits.hpp>#include <boost/graph/properties.hpp>#include <boost/property_map/property_map.hpp>#include <py2cpp/nx2bgl.hpp>#include <utility>Go to the source code of this file.
Namespaces | |
| namespace | boost |
Typedefs | |
| using | graph_t = boost::adjacency_list< boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property< boost::edge_id_tag_t, size_t > > |
| Type alias for Boost adjacency list with custom edge ID properties. | |
| using | Vertex = typename boost::graph_traits< graph_t >::vertex_descriptor |
| Type alias for vertex descriptor. | |
| using | edge_t = typename boost::graph_traits< graph_t >::edge_iterator |
| Type alias for edge iterator. | |
Enumerations | |
| enum | boost::edge_id_tag_t { boost::id_tag } |
| Custom edge tag for storing unique edge identifiers. More... | |
Functions | |
| boost::BOOST_INSTALL_PROPERTY (edge, id_tag) | |
| Install the custom edge property. | |
| template<typename Mapping > | |
| auto | create_test_case1 (const Mapping &weights) -> py::GraphAdaptor< graph_t > |
| Create a simple 5-node cycle test graph with edge IDs. | |
| template<typename Mapping > | |
| auto | create_test_case_timing (const Mapping &weights) -> py::GraphAdaptor< graph_t > |
| Create a 3-node timing test graph with parallel edges and edge IDs. | |
Alternative test case generators with edge IDs.
This module provides test case generators similar to test_cases_boost.hpp but with additional edge ID properties. The edge IDs are useful for algorithms that need to uniquely identify edges beyond just their endpoints.
This version uses custom edge properties to store unique identifiers, which can be helpful for debugging, tracking, and algorithm implementation.
| using graph_t = boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property<boost::edge_id_tag_t, size_t> > |
Type alias for Boost adjacency list with custom edge ID properties.
Type alias for vertex descriptor.
|
inline |
Create a simple 5-node cycle test graph with edge IDs.
This function creates the same 5-node cycle as in test_cases_boost.hpp but with additional edge ID properties. The graph structure is: A -> B -> C -> D -> E -> A
The edge IDs are automatically assigned during graph construction and can be used to uniquely identify edges in algorithms.
| Mapping | Type of weight mapping (edge -> weight) |
| [in] | weights | weights for the edges in order of creation |
|
inline |
Create a 3-node timing test graph with parallel edges and edge IDs.
This function creates the same complex 3-node graph as in test_cases_boost.hpp but with additional edge ID properties. The graph includes multiple parallel edges and bidirectional connections.
The edge IDs are particularly useful here since there are multiple edges between the same pair of vertices, making endpoint-based identification ambiguous.
| Mapping | Type of weight mapping (edge -> weight) |
| [in] | weights | weights for the edges in order of creation |