Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
operations.h File Reference

Declaration of graph operations. More...

#include <ogdf/basic/Graph.h>

Go to the source code of this file.

Namespaces

namespace  ogdf
 The namespace for all OGDF objects.
 

Graph operations

void ogdf::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 \(E = \{(\langle v_1,w_1\rangle, \langle v_1,w_2\rangle) | (w_1,w_2) \in E_2\} \cup \{(\langle v_1,w_1\rangle, \langle v_2,w_1\rangle) | (v_1,v_2) \in E_1\} \).
 
void ogdf::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 \(E = \{(\langle v_1,w_1\rangle, \langle v_2,w_2\rangle) | (v_1,v_2) \in E_1 \lor (w_1,w_2) \in E_2\} \).
 
void ogdf::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.
 
void ogdf::graphUnion (Graph &G1, const Graph &G2)
 Forms the disjoint union of G1 and G2.
 
void ogdf::graphUnion (Graph &G1, const Graph &G2, NodeArray< node > &map2to1, bool parallelfree=false, bool directed=false)
 Forms the union of G1 and G2 while identifying nodes from G2 with nodes from G1.
 
void ogdf::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 \(E = \{(\langle v_1,w_1\rangle, \langle v_2,w_2\rangle) | (v_1,v_2) \in E_1\} \cup \{(\langle v_1,w_1\rangle, \langle v_1,w_2\rangle) | (w_1,w_2) \in E_2\} \).
 
void ogdf::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 \(E = \{(\langle v_1,w_1\rangle, \langle v_2,w_2\rangle) | (v_1,v_2) \in E_1 \land (w_1,w_2) \in E_2\} \cup \{(\langle v_1,w_1\rangle, \langle v_2,w_2\rangle) | (v_1,v_2) \not\in E_1 \land (w_1,w_2) \not\in E_2\} \).
 
using ogdf::NodeMap = NodeArray< NodeArray< node > >
 
void ogdf::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 ogdf::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 \(E = \{(\langle v_1,w_1\rangle, \langle v_1,w_2\rangle) | (w_1,w_2) \in E_2\} \cup \{(\langle v_1,w_1\rangle, \langle v_2,w_1\rangle) | (v_1,v_2) \in E_1\} \cup \{(\langle v_1,w_1\rangle, \langle v_2,w_2\rangle) | (v_1,v_2) \in E_1 \land (w_1,w_2) \in E_2\} \).
 
void ogdf::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 \(E = \{(\langle v_1,w_1\rangle, \langle v_2,w_2\rangle) | (v_1,v_2) \in E_1 \land (w_1,w_2) \in E_2\} \).
 

Detailed Description

Declaration of graph operations.

Author
Max Ilsen
License:
This file is part of the Open Graph Drawing Framework (OGDF).
Copyright (C)
See README.md in the OGDF root directory for details.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Version 2 or 3 as published by the Free Software Foundation; see the file LICENSE.txt included in the packaging of this file for details.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see http://www.gnu.org/copyleft/gpl.html

Definition in file operations.h.