Open
Graph Drawing
Framework

 v.2007.11
 

ogdf::CrossingMinimizationModule Class Reference

Interface for crossing minimization algorithms. More...

#include <CrossingMinimizationModule.h>

Inheritance diagram for ogdf::CrossingMinimizationModule:

ogdf::Module ogdf::Timeouter ogdf::SubgraphPlanarizer

List of all members.

Public Member Functions

 CrossingMinimizationModule ()
 Initializes a crossing minimization module.
virtual ~CrossingMinimizationModule ()
ReturnType call (PlanRep &PG, int cc, int &crossingNumber, const EdgeArray< int > *cost=0, const EdgeArray< bool > *forbid=0, const EdgeArray< unsigned int > *subgraphs=0)
 Computes a planarized representation of the input graph.
ReturnType operator() (PlanRep &PG, int cc, int &crossingNumber, const EdgeArray< int > *cost=0, const EdgeArray< bool > *forbid=0, const EdgeArray< unsigned int > *const subgraphs=0)
 Computes a planarized representation of the input graph (shorthand for call).
bool useCost () const
 Returns true iff edge costs are given.
bool useForbid () const
 Returns true iff forbidden edges are given.
bool useSubgraphs () const
void * operator new (size_t nBytes)
void * operator new (size_t, void *p)
void operator delete (void *p)

Protected Member Functions

virtual ReturnType doCall (PlanRep &PG, int cc, const EdgeArray< int > &cost, const EdgeArray< bool > &forbid, const EdgeArray< unsigned int > &subgraphs, int &crossingNumber)=0
 Actual algorithm call that needs to be implemented by derived classed.

Private Attributes

bool m_useCost
 True iff edge costs are given.
bool m_useForbid
 True iff forbidden edges are given.
bool m_useSubgraphs


Detailed Description

Interface for crossing minimization algorithms.

Definition at line 69 of file CrossingMinimizationModule.h.


Constructor & Destructor Documentation

ogdf::CrossingMinimizationModule::CrossingMinimizationModule (  )  [inline]

Initializes a crossing minimization module.

Definition at line 73 of file CrossingMinimizationModule.h.

virtual ogdf::CrossingMinimizationModule::~CrossingMinimizationModule (  )  [inline, virtual]

Definition at line 76 of file CrossingMinimizationModule.h.


Member Function Documentation

ReturnType ogdf::CrossingMinimizationModule::call ( PlanRep PG,
int  cc,
int &  crossingNumber,
const EdgeArray< int > *  cost = 0,
const EdgeArray< bool > *  forbid = 0,
const EdgeArray< unsigned int > *  subgraphs = 0 
) [inline]

Computes a planarized representation of the input graph.

Parameters:
PG represents the input graph as well as the computed planarized representation after the call. PG has to be initialzed as a PlanRep of the input graph and is modified to obatain the planarized representation (crossings are replaced by dummy vertices with degree four.
cc is the number of the connected component in PG that is considered.
crossingNumber is assigned the number of crossings.
forbid points to an edge array indicating which edges are not allowed to be crossed, i.e., (*forbid)[e] = true. If forbid = 0, no edges are forbidden.
cost points to an edge array that gives the cost of each edge. If cost = 0, all edges have cost 1.
subgraphs 
Returns:
the status of the result.

Definition at line 96 of file CrossingMinimizationModule.h.

ReturnType ogdf::CrossingMinimizationModule::operator() ( PlanRep PG,
int  cc,
int &  crossingNumber,
const EdgeArray< int > *  cost = 0,
const EdgeArray< bool > *  forbid = 0,
const EdgeArray< unsigned int > *const   subgraphs = 0 
) [inline]

Computes a planarized representation of the input graph (shorthand for call).

Definition at line 120 of file CrossingMinimizationModule.h.

bool ogdf::CrossingMinimizationModule::useCost (  )  const [inline]

Returns true iff edge costs are given.

Definition at line 130 of file CrossingMinimizationModule.h.

bool ogdf::CrossingMinimizationModule::useForbid (  )  const [inline]

Returns true iff forbidden edges are given.

Definition at line 133 of file CrossingMinimizationModule.h.

bool ogdf::CrossingMinimizationModule::useSubgraphs (  )  const [inline]

Definition at line 135 of file CrossingMinimizationModule.h.

virtual ReturnType ogdf::CrossingMinimizationModule::doCall ( PlanRep PG,
int  cc,
const EdgeArray< int > &  cost,
const EdgeArray< bool > &  forbid,
const EdgeArray< unsigned int > &  subgraphs,
int &  crossingNumber 
) [protected, pure virtual]

Actual algorithm call that needs to be implemented by derived classed.

Parameters:
PG represents the input graph as well as the computed planarized representation after the call. PG is initialzed as a PlanRep of the input graph and has to be modified so that it represents the planarized representation (crossings are replaced by dummy vertices with degree four).
cc is the number of the connected component in PG that is considered.
crossingNumber is assigned the number of crossings.
forbid points to an edge array indicating which edges are not allowed to be crossed, i.e., (*forbid)[e] = true.
cost points to an edge array that gives the cost of each edge.
subgraphs 
Returns:
the status of the result.

Implemented in ogdf::SubgraphPlanarizer.

void* ogdf::CrossingMinimizationModule::operator new ( size_t  nBytes  )  [inline]

Definition at line 161 of file CrossingMinimizationModule.h.

void* ogdf::CrossingMinimizationModule::operator new ( size_t  ,
void *  p 
) [inline]

Definition at line 161 of file CrossingMinimizationModule.h.

void ogdf::CrossingMinimizationModule::operator delete ( void *  p  )  [inline]

Definition at line 161 of file CrossingMinimizationModule.h.


Member Data Documentation

bool ogdf::CrossingMinimizationModule::m_useCost [private]

True iff edge costs are given.

Definition at line 164 of file CrossingMinimizationModule.h.

bool ogdf::CrossingMinimizationModule::m_useForbid [private]

True iff forbidden edges are given.

Definition at line 165 of file CrossingMinimizationModule.h.

bool ogdf::CrossingMinimizationModule::m_useSubgraphs [private]

Definition at line 166 of file CrossingMinimizationModule.h.


The documentation for this class was generated from the following file:

© 1999-2007 by oreas GmbH, © 2005-2007 by University Dortmund and University Cologne.

Generated on Thu Nov 22 19:40:12 2007 by doxygen 1.5.4.