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 
36 namespace ogdf {
37 
43 
52 inline void graphUnion(Graph& G1, const Graph& G2) { G1.insert(G2); }
53 
69 OGDF_EXPORT void graphUnion(Graph& G1, const Graph& G2, NodeArray<node>& map2to1,
70  bool parallelfree = false, bool directed = false);
71 
73 
88 OGDF_EXPORT void graphProduct(const Graph& G1, const Graph& G2, Graph& product,
89  NodeMap& nodeInProduct, const std::function<void(node, node)>& addEdges);
90 
107 OGDF_EXPORT void cartesianProduct(const Graph& G1, const Graph& G2, Graph& product,
108  NodeMap& nodeInProduct);
109 
119 OGDF_EXPORT void tensorProduct(const Graph& G1, const Graph& G2, Graph& product,
120  NodeMap& nodeInProduct);
121 
134 OGDF_EXPORT void lexicographicalProduct(const Graph& G1, const Graph& G2, Graph& product,
135  NodeMap& nodeInProduct);
136 
150 OGDF_EXPORT void strongProduct(const Graph& G1, const Graph& G2, Graph& product,
151  NodeMap& nodeInProduct);
152 
162 OGDF_EXPORT void coNormalProduct(const Graph& G1, const Graph& G2, Graph& product,
163  NodeMap& nodeInProduct);
164 
176 OGDF_EXPORT void modularProduct(const Graph& G1, const Graph& G2, Graph& product,
177  NodeMap& nodeInProduct);
178 
187 OGDF_EXPORT void rootedProduct(const Graph& G1, const Graph& G2, Graph& product,
188  NodeMap& nodeInProduct, node rootInG2);
189 
191 
194 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
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:52
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:651
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:862
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:93
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:233