Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
ogdf::internal Namespace Reference

Namespaces

namespace  gcm
 

Classes

class  FaceAdjContainer
 Container for the adjacency entries in a face. More...
 
class  FaceAdjIterator
 Forward iterator for adjacency entries in a face. More...
 
class  GraphArrayIteratorBase
 
class  GraphElement
 The base class for objects used by (hyper)graphs. More...
 
class  GraphIteratorBase
 
class  GraphList
 Lists of graph objects (like nodes, edges, etc.). More...
 
class  GraphListBase
 Base class for GraphElement lists. More...
 
class  GraphObjectContainer
 

Typedefs

template<class ArrayType >
using GraphArrayConstIterator = GraphArrayIteratorBase< ArrayType, true >
 
template<class ArrayType >
using GraphArrayIterator = GraphArrayIteratorBase< ArrayType, false >
 
template<class GraphObjectPtr >
using GraphIterator = GraphIteratorBase< GraphObjectPtr, false >
 
template<class GraphObjectPtr >
using GraphReverseIterator = GraphIteratorBase< GraphObjectPtr, true >
 

Functions

template<typename CONTAINER , typename TYPE , typename ITERATOR >
ITERATOR chooseIteratorByFastTest (CONTAINER &container, std::function< bool(const TYPE &)> includeElement)
 
template<typename CONTAINER , typename TYPE , typename ITERATOR >
ITERATOR chooseIteratorBySlowTest (CONTAINER &container, std::function< bool(const TYPE &)> includeElement, int size)
 
template<typename CONTAINER , typename TYPE , typename ITERATOR >
ITERATOR chooseIteratorFrom (CONTAINER &container, std::function< bool(const TYPE &)> includeElement, bool isFastTest)
 Returns an iterator to a random element in the container.
 
template<>
void getAllEdges (const Graph &G, Array< edge > &edges)
 
template<typename CONTAINER >
void getAllEdges (const Graph &G, CONTAINER &edges)
 
template<>
void getAllNodes (const Graph &G, Array< node > &nodes)
 
template<typename CONTAINER >
void getAllNodes (const Graph &G, CONTAINER &nodes)
 

Typedef Documentation

◆ GraphArrayConstIterator

◆ GraphArrayIterator

◆ GraphIterator

◆ GraphReverseIterator

Function Documentation

◆ chooseIteratorByFastTest()

ITERATOR ogdf::internal::chooseIteratorByFastTest ( CONTAINER container,
std::function< bool(const TYPE &)>  includeElement 
)
See also
chooseIteratorFrom

Don't allocate additional space but count the number of feasible elements instead.

Definition at line 109 of file list_templates.h.

◆ chooseIteratorBySlowTest()

ITERATOR ogdf::internal::chooseIteratorBySlowTest ( CONTAINER container,
std::function< bool(const TYPE &)>  includeElement,
int  size 
)
See also
chooseIteratorFrom

Store elements in permuted order and call includeElement at most once per element.

Definition at line 143 of file list_templates.h.

◆ chooseIteratorFrom()

ITERATOR ogdf::internal::chooseIteratorFrom ( CONTAINER container,
std::function< bool(const TYPE &)>  includeElement,
bool  isFastTest 
)

Returns an iterator to a random element in the container.

Takes linear time (given that includeElement runs in constant time). An invalid iterator is returned iff no feasible element exists. When includeElement has a non-constant runtime it is recommended to set isFastTest to false.

Template Parameters
CONTAINERType of the container. Any iterable container that implements size() is applicable.
TYPEType of elements returned by the iterator of the container.
Parameters
containerThe container that we want to pick an element from.
includeElementSpecifies for each element whether it is feasible to be chosen. Defaults to all elements being feasible. Must return the same value when called twice with the same element.
isFastTestShould be set to false to prevent querying the same element multiple times for feasibility. Note that this will result in additional space allocated linear in the size of the container.
Returns
An iterator to the picked element or an invalid iterator if no such element exists.

Definition at line 186 of file list_templates.h.

◆ getAllEdges() [1/2]

template<>
void ogdf::internal::getAllEdges ( const Graph G,
Array< edge > &  edges 
)
inline

Definition at line 1476 of file Graph_d.h.

◆ getAllEdges() [2/2]

template<typename CONTAINER >
void ogdf::internal::getAllEdges ( const Graph G,
CONTAINER edges 
)
inline

Definition at line 1468 of file Graph_d.h.

◆ getAllNodes() [1/2]

template<>
void ogdf::internal::getAllNodes ( const Graph G,
Array< node > &  nodes 
)
inline

Definition at line 1459 of file Graph_d.h.

◆ getAllNodes() [2/2]

template<typename CONTAINER >
void ogdf::internal::getAllNodes ( const Graph G,
CONTAINER nodes 
)
inline

Definition at line 1451 of file Graph_d.h.