|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
134 : m_id(id), m_size(0), m_pEmbedding(pEmbedding), entries(adjFirst) { }
151 int size()
const {
return m_size; }
162 return (adj != entries.
m_adjFirst) ? adj :
nullptr;
180 template<
class Value,
bool WithDefault>
191 #define OGDF_DECL_REG_ARRAY_TYPE(v, c) FaceArrayBase<v, c>
193 #undef OGDF_DECL_REG_ARRAY_TYPE
252 bool valid()
const {
return m_cpGraph !=
nullptr; }
264 operator const Graph&()
const {
return getGraph(); }
297 std::function<
bool(
face)> includeFace = [](
face) {
return true; },
298 bool isFastTest =
true)
const;
301 face maximalFace()
const;
332 void consistencyCheck()
const;
339 if (key ==
nullptr) {
344 OGDF_ASSERT(keyToIndex(key) < this->getArraySize());
373 return findCommonFace(v, w, adj, left);
448 operator const Graph&()
const {
return getGraph(); }
450 operator Graph&() {
return getGraph(); }
518 node contract(
edge e,
bool keepSelfLoops =
false);
569 void reverseEdge(
edge e);
575 void removeDeg1(
node v);
Abstract base class for registries.
The namespace for all OGDF objects.
bool valid() const
Returns whether the embedding is associated with a graph.
Dynamic arrays indexed with arbitrary keys.
#define OGDF_DECL_REG_ARRAY(NAME)
int size() const
Returns the size of the list.
Includes declaration of graph class.
FaceAdjIterator(adjEntry adjFirst, adjEntry adj)
Container for the adjacency entries in a face.
GraphObject * tail() const
Returns the last element in the list.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
const ConstCombinatorialEmbedding * embeddingOf() const
int m_size
The size of the face.
adjEntry findCommonFace(const node v, const node w, bool left=true) const
Identifies a common face of two nodes and returns the respective adjacency entry.
typename std::conditional< WithDefault, internal::RegisteredArrayWithDefault< ConstCombinatorialEmbedding, Value >, internal::RegisteredArrayWithoutDefault< ConstCombinatorialEmbedding, Value > >::type RA
The base class for objects used by (hyper)graphs.
face leftFace(adjEntry adj) const
Returns the face to the left of adj, i.e., the face containing the twin of adj.
int m_faceIdCount
The index assigned to the next created face.
#define OGDF_AUGMENT_COMPARER(type)
Add this macro to your class to turn it into a full comparer.
ConstCombinatorialEmbedding * embeddingOf() const
Returns a pointer to the associated combinatorial embedding.
internal::FaceAdjContainer entries
Container maintaining the adjacency entries in the face.
std::pair< node, node > split(Graph &G, sync_plan::PipeBij &bij, const EdgeArray< edge > *new_edges=nullptr, const EdgeArray< bool > *reverse_edges=nullptr, node src=nullptr, node tgt=nullptr)
face rightFace(adjEntry adj) const
Returns the face to the right of adj, i.e., the face containing adj.
FaceAdjIterator & operator++()
int numberOfFaces() const
Returns the number of faces.
Copies of graphs supporting edge splitting.
face lastFace() const
Returns the last face in the list of all faces.
face_iterator end() const
FaceAdjIterator(adjEntry adj)
Public read-only interface for lists of graph objects.
int maxFaceIndex() const
Returns the largest used face index.
adjEntry twin() const
Returns the corresponding adjacency element associated with the same edge.
#define OGDF_NEW_DELETE
Makes the class use OGDF's memory allocator.
face_iterator begin() const
Class for adjacency list elements.
adjEntry firstAdj() const
Returns the first adjacency element in the face.
void setExternalFace(face f)
Sets the external face to f.
RegistryBase< face, ConstCombinatorialEmbedding, internal::GraphIterator< face > > CombinatorialEmbeddingRegistry
static int compare(const FaceElement &x, const FaceElement &y)
Standard Comparer.
adjEntry operator*() const
internal::GraphObjectContainer< FaceElement > faces
The container containing all face objects.
bool isKeyAssociated(face key) const
void init(Graph &G)
Initializes the embedding for graph G.
static int keyToIndex(face key)
Decralation of GraphElement and GraphList classes.
int calculateTableSize(int actualCount)
The default growth function for registered arrays.
AdjEntryArray< face > m_rightFace
The face to which an adjacency entry belongs.
int m_id
The index of the face.
std::ostream & operator<<(std::ostream &os, const ogdf::Array< E, INDEX > &a)
Prints array a to output stream os.
const Graph * m_cpGraph
The associated graph.
const Graph & getGraph() const
Returns the associated graph of the combinatorial embedding.
RegisteredArray for nodes, edges and adjEntries of a graph.
adjEntry adjSource() const
Returns the corresponding adjacancy entry at source node.
Data type for general directed graphs (adjacency list representation).
RegisteredArray for labeling the faces of a CombinatorialEmbedding.
Lists of graph objects (like nodes, edges, etc.).
face firstFace() const
Returns the first face in the list of all faces.
Graph * m_pGraph
The associated graph.
int size() const
Returns the size of the face, i.e., the number of edges in the face.
Decralation of graph iterators.
Forward iterator for adjacency entries in a face.
face externalFace() const
Returns the external face.
Combinatorial embeddings of planar graphs.
face pred() const
Returns the predecessor in the list of all faces.
int index() const
Returns the index of the face.
adjEntry adjTarget() const
Returns the corresponding adjacancy entry at target node.
iterator begin() const
Returns an iterator to the first element in the container.
GraphObject * head() const
Returns the first element in the list.
FaceAdjContainer(adjEntry adjFirst)
Basic declarations, included by all source files.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
iterator end() const
Returns an iterator to the one-past-last element in the container.
Combinatorial embeddings of planar graphs with modification functionality.
adjEntry faceCycleSucc() const
Returns the cyclic successor in face.
Class for the representation of edges.
const Graph & getGraph() const
Returns the associated graph.
bool isBridge(edge e) const
int calculateArraySize(int add) const
bool operator!=(const FaceAdjIterator &other) const
FaceAdjIterator & operator=(const FaceAdjIterator &)=default
adjEntry nextFaceEdge(adjEntry adj) const
Returns the successor of adj in the list of all adjacency elements in the face.
bool operator==(const FaceAdjIterator &other) const
Declarations for Comparer objects.
Class for the representation of nodes.
const ConstCombinatorialEmbedding * m_pEmbedding
Declaration of memory manager for allocating small pieces of memory.
CombinatorialEmbedding(Graph &G)
Creates a combinatorial embedding of graph G.
Faces in a combinatorial embedding.
face succ() const
Returns the successor in the list of all faces.
CombinatorialEmbedding()
Creates a combinatorial embedding associated with no graph.