Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

operations.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/Graph.h>
35 #include <ogdf/basic/basic.h>
36 
37 #include <functional>
38 
39 namespace ogdf {
40 
46 
55 inline void graphUnion(Graph& G1, const Graph& G2) { G1.insert(G2); }
56 
72 OGDF_EXPORT void graphUnion(Graph& G1, const Graph& G2, NodeArray<node>& map2to1,
73  bool parallelfree = false, bool directed = false);
74 
76 
91 OGDF_EXPORT void graphProduct(const Graph& G1, const Graph& G2, Graph& product,
92  NodeMap& nodeInProduct, const std::function<void(node, node)>& addEdges);
93 
110 OGDF_EXPORT void cartesianProduct(const Graph& G1, const Graph& G2, Graph& product,
111  NodeMap& nodeInProduct);
112 
122 OGDF_EXPORT void tensorProduct(const Graph& G1, const Graph& G2, Graph& product,
123  NodeMap& nodeInProduct);
124 
137 OGDF_EXPORT void lexicographicalProduct(const Graph& G1, const Graph& G2, Graph& product,
138  NodeMap& nodeInProduct);
139 
153 OGDF_EXPORT void strongProduct(const Graph& G1, const Graph& G2, Graph& product,
154  NodeMap& nodeInProduct);
155 
165 OGDF_EXPORT void coNormalProduct(const Graph& G1, const Graph& G2, Graph& product,
166  NodeMap& nodeInProduct);
167 
179 OGDF_EXPORT void modularProduct(const Graph& G1, const Graph& G2, Graph& product,
180  NodeMap& nodeInProduct);
181 
190 OGDF_EXPORT void rootedProduct(const Graph& G1, const Graph& G2, Graph& product,
191  NodeMap& nodeInProduct, node rootInG2);
192 
194 
197 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
Graph.h
Includes declaration of graph class.
ogdf::graphUnion
void graphUnion(Graph &G1, const Graph &G2)
Forms the disjoint union of G1 and G2.
Definition: operations.h:55
ogdf::tensorProduct
void tensorProduct(const Graph &G1, const Graph &G2, Graph &product, NodeMap &nodeInProduct)
Computes the tensor product of G1 and G2 and assigns it to product, with .
ogdf::modularProduct
void modularProduct(const Graph &G1, const Graph &G2, Graph &product, NodeMap &nodeInProduct)
Computes the modular product of G1 and G2 and assigns it to product, with .
ogdf::cartesianProduct
void cartesianProduct(const Graph &G1, const Graph &G2, Graph &product, NodeMap &nodeInProduct)
Computes the Cartesian product of G1 and G2 and assigns it to product, with .
ogdf::internal::GraphRegisteredArray
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition: Graph_d.h:658
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:869
ogdf::coNormalProduct
void coNormalProduct(const Graph &G1, const Graph &G2, Graph &product, NodeMap &nodeInProduct)
Computes the co-normal product of G1 and G2 and assigns it to product, with .
ogdf::Graph::insert
std::pair< int, int > insert(const NI &nodesBegin, const NI &nodesEnd, const EI &edgesBegin, const EI &edgesEnd, NodeArray< node > &nodeMap, EdgeArray< edge > &edgeMap)
Inserts a copy of a given subgraph into this graph.
Definition: InducedSubgraph.h:102
basic.h
Basic declarations, included by all source files.
ogdf::graphProduct
void graphProduct(const Graph &G1, const Graph &G2, Graph &product, NodeMap &nodeInProduct, const std::function< void(node, node)> &addEdges)
Computes the graph product of G1 and G2, using a given function to add edges.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::rootedProduct
void rootedProduct(const Graph &G1, const Graph &G2, Graph &product, NodeMap &nodeInProduct, node rootInG2)
Computes the rooted product of G1 and G2, rooted in rootInG2, and assigns it to product.
ogdf::lexicographicalProduct
void lexicographicalProduct(const Graph &G1, const Graph &G2, Graph &product, NodeMap &nodeInProduct)
Computes the lexicographical product of G1 and G2 and assigns it to product, with .
ogdf::strongProduct
void strongProduct(const Graph &G1, const Graph &G2, Graph &product, NodeMap &nodeInProduct)
Computes the strong product of G1 and G2 and assigns it to product, with .
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:240