Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

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,
70  NodeArray<node> &map2to1, 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, NodeMap &nodeInProduct);
108 
118 OGDF_EXPORT void tensorProduct(const Graph &G1, const Graph &G2, Graph &product, NodeMap &nodeInProduct);
119 
132 OGDF_EXPORT void lexicographicalProduct(const Graph &G1, const Graph &G2, Graph &product, NodeMap &nodeInProduct);
133 
147 OGDF_EXPORT void strongProduct(const Graph &G1, const Graph &G2, Graph &product, NodeMap &nodeInProduct);
148 
158 OGDF_EXPORT void coNormalProduct(const Graph &G1, const Graph &G2, Graph &product, NodeMap &nodeInProduct);
159 
171 OGDF_EXPORT void modularProduct(const Graph &G1, const Graph &G2, Graph &product, NodeMap &nodeInProduct);
172 
181 OGDF_EXPORT void rootedProduct(const Graph &G1, const Graph &G2, Graph &product, NodeMap &nodeInProduct, node rootInG2);
182 
184 
187 }
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:492
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
void insert(const Graph &G, NodeArray< node > &nodeMap)
Inserts Graph G as a subgraph into this Graph.
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 .
void graphUnion(Graph &G1, const Graph &G2)
Forms the disjoint union of G1 and G2.
Definition: operations.h:52
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.
Dynamic arrays indexed with nodes.
Definition: Graph_d.h:438
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 .
Class for the representation of nodes.
Definition: Graph_d.h:169
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 .
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.
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 ...
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 .
Includes declaration of graph class.
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 .
The namespace for all OGDF objects.