57template<
typename TWeight>
72 std::string& error)
override {
82 std::unique_ptr<SpannerModule<TWeight>>
m_module;
94 int bestSize = std::numeric_limits<int>::max();
99 if (
bestSize == std::numeric_limits<int>::max()) {
116 if (
bestSize == std::numeric_limits<int>::max()) {
133 for (
node n : G.nodes) {
140 (*m_inSpanner)[
eOrig] =
true;
147 if (
bestSize == std::numeric_limits<int>::max()) {
Basic module for spanner algorithms.
Dynamic arrays indexed with edges.
void init()
Reinitializes the array. Associates the array with no graph.
Class for the representation of edges.
Stores additional attributes of a graph (like layout information).
const Graph & constGraph() const
Returns a reference to the associated graph.
Copies of graphs with mapping between nodes and edges.
edge newEdge(edge eOrig)
Creates a new edge in the graph copy with original edge eOrig.
node newNode(node vOrig)
Creates a new node in the graph copy with original node vOrig.
void createEmpty(const Graph &G)
Re-initializes the copy using G, but does not create any nodes or edges.
Data type for general directed graphs (adjacency list representation).
virtual void clear()
Removes all nodes and all edges from the graph.
ReturnType
The return type of a module.
Class for the representation of nodes.
A implementation-independed wrapper class to execute a spanner algorithm multiple times.
int getExecutedIterations()
virtual SpannerModule< TWeight >::ReturnType execute() override
Executes the core algorithm.
std::unique_ptr< SpannerModule< TWeight > > m_module
const int m_maxIterations
SpannerIteratedWrapper(SpannerModule< TWeight > *module, int maxIterations)
Initializes the wrapper.
virtual bool preconditionsOk(const GraphAttributes &GA, double stretch, std::string &error) override
Interface for spanner algorithms.
bool isTimelimitEnabled()
const GraphAttributes * m_GA
EdgeArray< bool > * m_inSpanner
GraphCopySimple * m_spanner
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.