Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

ogdf::internal Namespace Reference

Namespaces

 gcm
 

Classes

class  EdgeArrayBase1
 RegisteredArray for edges of a graph. More...
 
class  EdgeArrayBase2
 RegisteredArray for edges of a graph, specialized for EdgeArray<edge>. More...
 
class  EdgeArrayBase2< edge, WithDefault >
 
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
 Public read-only interface for lists of graph objects. More...
 
class  GraphRegisteredArray
 RegisteredArray for nodes, edges and adjEntries of a graph. More...
 
class  GraphRegistry
 Registry for nodes, edges and adjEntries of a graph. More...
 
struct  is_iterator
 
struct  is_iterator< T, std::void_t< typename std::iterator_traits< T >::iterator_category > >
 
class  RegisteredArrayBase
 Abstract base class for registered arrays. More...
 
class  RegisteredArrayWithDefault
 Registered arrays with default values. More...
 
class  RegisteredArrayWithoutDefaultOrIndexAccess
 Registered arrays without default values or by-index access to values. More...
 
class  RegisteredArrayWithoutDefaultWithIndexAccess
 RegisteredArrayWithoutDefaultOrIndexAccess that also allows accessing its values directly by their index. More...
 
class  SimpleRange
 

Typedefs

template<typename T >
using AEA = AdjEntryArray< T, true >
 
template<typename T >
using EA = EdgeArray< T, true >
 
using GraphAdjRegistry = GraphRegistry< AdjElement, GraphAdjIterator, 2 >
 
template<class ArrayType >
using GraphArrayConstIterator = GraphArrayIteratorBase< ArrayType, true >
 
template<class ArrayType >
using GraphArrayIterator = GraphArrayIteratorBase< ArrayType, false >
 
using GraphEdgeRegistry = GraphRegistry< EdgeElement >
 
template<class GraphObjectPtr >
using GraphIterator = GraphIteratorBase< GraphObjectPtr, false, false >
 
using GraphNodeRegistry = GraphRegistry< NodeElement >
 
template<class GraphObjectPtr >
using GraphReverseIterator = GraphIteratorBase< GraphObjectPtr, true, false >
 
template<typename T >
using NA = NodeArray< T, true >
 
template<class Registry , class Value >
using RegisteredArrayWithoutDefault = typename std::conditional_t< std::is_integral_v< typename Registry::key_type >, RegisteredArrayWithoutDefaultOrIndexAccess< Registry, Value >, RegisteredArrayWithoutDefaultWithIndexAccess< Registry, Value > >
 Registered arrays without default values that automatically allows by-index access to values if Registry::key_type is not already integral. More...
 

Functions

node adjToNode (adjEntry adj)
 
node adjToNode (node n)
 
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. More...
 
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)
 
template<typename Iterator >
std::enable_if< is_iterator< Iterator >::value, typename std::iterator_traits< Iterator >::difference_type >::type guess_dist ([[maybe_unused]] Iterator begin, [[maybe_unused]] Iterator end)
 
template<typename Iterator >
std::enable_if<!is_iterator< Iterator >::value, size_t >::type guess_dist (Iterator, Iterator)
 

Typedef Documentation

◆ AEA

template<typename T >
using ogdf::internal::AEA = typedef AdjEntryArray<T, true>

Definition at line 44 of file GraphMultiArray.h.

◆ EA

template<typename T >
using ogdf::internal::EA = typedef EdgeArray<T, true>

Definition at line 42 of file GraphMultiArray.h.

◆ GraphAdjRegistry

Definition at line 632 of file Graph_d.h.

◆ GraphArrayConstIterator

template<class ArrayType >
using ogdf::internal::GraphArrayConstIterator = typedef GraphArrayIteratorBase<ArrayType, true>

Definition at line 114 of file graph_iterators.h.

◆ GraphArrayIterator

template<class ArrayType >
using ogdf::internal::GraphArrayIterator = typedef GraphArrayIteratorBase<ArrayType, false>

Definition at line 112 of file graph_iterators.h.

◆ GraphEdgeRegistry

Definition at line 631 of file Graph_d.h.

◆ GraphIterator

template<class GraphObjectPtr >
using ogdf::internal::GraphIterator = typedef GraphIteratorBase<GraphObjectPtr, false, false>

Definition at line 46 of file graph_iterators.h.

◆ GraphNodeRegistry

Definition at line 630 of file Graph_d.h.

◆ GraphReverseIterator

template<class GraphObjectPtr >
using ogdf::internal::GraphReverseIterator = typedef GraphIteratorBase<GraphObjectPtr, true, false>

Definition at line 48 of file graph_iterators.h.

◆ NA

template<typename T >
using ogdf::internal::NA = typedef NodeArray<T, true>

Definition at line 40 of file GraphMultiArray.h.

◆ RegisteredArrayWithoutDefault

template<class Registry , class Value >
using ogdf::internal::RegisteredArrayWithoutDefault = typedef typename std::conditional_t<std::is_integral_v<typename Registry::key_type>, RegisteredArrayWithoutDefaultOrIndexAccess<Registry, Value>, RegisteredArrayWithoutDefaultWithIndexAccess<Registry, Value> >

Registered arrays without default values that automatically allows by-index access to values if Registry::key_type is not already integral.

Definition at line 622 of file RegisteredArray.h.

Function Documentation

◆ adjToNode() [1/2]

node ogdf::internal::adjToNode ( adjEntry  adj)
inline

Definition at line 805 of file Graph_d.h.

◆ adjToNode() [2/2]

node ogdf::internal::adjToNode ( node  n)
inline

Definition at line 807 of file Graph_d.h.

◆ chooseIteratorByFastTest()

template<typename CONTAINER , typename TYPE , typename ITERATOR >
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()

template<typename CONTAINER , typename TYPE , typename ITERATOR >
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()

template<typename CONTAINER , typename TYPE , typename ITERATOR >
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 2091 of file Graph_d.h.

◆ getAllEdges() [2/2]

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

Definition at line 2083 of file Graph_d.h.

◆ getAllNodes() [1/2]

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

Definition at line 2074 of file Graph_d.h.

◆ getAllNodes() [2/2]

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

Definition at line 2066 of file Graph_d.h.

◆ guess_dist() [1/2]

template<typename Iterator >
std::enable_if<is_iterator<Iterator>::value, typename std::iterator_traits<Iterator>::difference_type>::type ogdf::internal::guess_dist ( [[maybe_unused] ] Iterator  begin,
[[maybe_unused] ] Iterator  end 
)

Definition at line 56 of file InducedSubgraph.h.

◆ guess_dist() [2/2]

template<typename Iterator >
std::enable_if<!is_iterator<Iterator>::value, size_t>::type ogdf::internal::guess_dist ( Iterator  ,
Iterator   
)

Definition at line 49 of file InducedSubgraph.h.