Wrapper around SpannerBerman: For each component of the graph, the algorithm will be called. More...
#include <ogdf/graphalg/SpannerBermanDisconnected.h>
Public Member Functions | |
virtual bool | preconditionsOk (const GraphAttributes &GA, double stretch, std::string &error) override |
![]() | |
SpannerModule () | |
Initializes a spanner module. More... | |
virtual | ~SpannerModule () |
virtual ReturnType | call (const GraphAttributes &GA, double stretch, GraphCopySimple &spanner, EdgeArray< bool > &inSpanner) |
Executes the algorithm. More... | |
int64_t | getTimeNeeded () |
void | setTimelimit (int64_t milliseconds) |
Sets the timelimit for the algorithm in milliseconds. More... | |
![]() | |
Module () | |
Initializes a module. More... | |
virtual | ~Module () |
Private Member Functions | |
virtual SpannerModule< TWeight >::ReturnType | execute () override |
Executes the core algorithm. More... | |
Additional Inherited Members | |
![]() | |
enum | ReturnType { ReturnType::Feasible, ReturnType::Optimal, ReturnType::NoFeasibleSolution, ReturnType::TimeoutFeasible, ReturnType::TimeoutInfeasible, ReturnType::Error } |
The return type of a module. More... | |
![]() | |
static void | apspSpanner (const GraphAttributes &GA, const GraphCopySimple &spanner, NodeArray< NodeArray< TWeight >> &shortestPathMatrix) |
Calculates an all-pair shortest-path on spanner with the weights given by GA . More... | |
static bool | isMultiplicativeSpanner (const GraphAttributes &GA, const GraphCopySimple &spanner, double stretch) |
Validates a spanner. More... | |
![]() | |
static bool | isSolution (ReturnType ret) |
Returns true iff ret indicates that the module returned a feasible solution. More... | |
![]() | |
void | assertTimeLeft () |
Assert, that time is left. More... | |
int64_t | getTimeLeft () |
int | getWeight (const GraphAttributes &GA, edge e) |
double | getWeight (const GraphAttributes &GA, edge e) |
virtual void | init (const GraphAttributes &GA, double stretch, GraphCopySimple &spanner, EdgeArray< bool > &inSpanner) |
Initializes members and create an empty spanner. More... | |
bool | isTimelimitEnabled () |
![]() | |
static TWeight | getWeight (const GraphAttributes &GA, edge e) |
![]() | |
const GraphAttributes * | m_GA |
EdgeArray< bool > * | m_inSpanner |
GraphCopySimple * | m_spanner |
double | m_stretch |
Wrapper around SpannerBerman: For each component of the graph, the algorithm will be called.
This allows to use the algorithm on graphs with more than one component.
Definition at line 56 of file SpannerBermanDisconnected.h.
|
inlineoverrideprivatevirtual |
Executes the core algorithm.
Called after initialization. This method is used for the timelimit, so do not forget to call assertTimeLeft from time to time.
Implements ogdf::SpannerModule< TWeight >.
Definition at line 74 of file SpannerBermanDisconnected.h.
|
inlineoverridevirtual |
GA
and stretch
are valid for a specific algorithm. If not, an error message is provided via error
Implements ogdf::SpannerModule< TWeight >.
Definition at line 59 of file SpannerBermanDisconnected.h.