Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
generate_spanning_tree_picture.H
Go to the documentation of this file.
1
2/*
3 Aleph_w
4
5 Data structures & Algorithms
6 version 2.0.0b
7 https://github.com/lrleon/Aleph-w
8
9 This file is part of Aleph-w library
10
11 Copyright (c) 2002-2026 Leandro Rabindranath Leon
12
13 Permission is hereby granted, free of charge, to any person obtaining a copy
14 of this software and associated documentation files (the "Software"), to deal
15 in the Software without restriction, including without limitation the rights
16 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17 copies of the Software, and to permit persons to whom the Software is
18 furnished to do so, subject to the following conditions:
19
20 The above copyright notice and this permission notice shall be included in all
21 copies or substantial portions of the Software.
22
23 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29 SOFTWARE.
30*/
31
32
62#ifndef GENERATE_SPANNING_TREE_PICTURE_H
63#define GENERATE_SPANNING_TREE_PICTURE_H
64
65# include <ah-graph-concepts.H>
66
67#include <generate_graph.H>
68
76template <AlephGraph GT>
78{
79 std::string operator () (typename GT::Node * p) const
80 {
81 return NODE_COOKIE(p) == nullptr ? "" : "SHADOW-NODE";
82 }
83};
84
94template <AlephGraph GT>
96{
97 std::string operator () (typename GT::Arc * a) const
98 {
99 return ARC_COOKIE(a) == nullptr ? "ARC" : "SHADOW-ARC";
100 }
101};
102
123template <AlephGraph GT, class Write_Node, class Write_Arc, ArcFilter<GT> SA>
125 const size_t & nodes_by_level,
126 const double & xdist,
127 const double & ydist,
128 std::ofstream & output)
129{
133}
134
137template <AlephGraph GT, class Write_Node, class Write_Arc>
139 const size_t & nodes_by_level,
140 const double & xdist,
141 const double & ydist,
142 std::ofstream & output)
143{
144 using DSA = Dft_Show_Arc<GT>;
147}
148
169template <AlephGraph GT, class Write_Node, class Write_Arc, ArcFilter<GT> SA>
171 const size_t & nodes_by_level,
172 const double & xdist,
173 const double & ydist,
174 std::ofstream & output)
175{
179}
180
183template <AlephGraph GT, class Write_Node, class Write_Arc>
185 const size_t & nodes_by_level,
186 const double & xdist,
187 const double & ydist,
188 std::ofstream & output)
189{
190 using DSA = Dft_Show_Arc<GT>;
193}
194
195#endif // GENERATE_SPANNING_TREE_PICTURE_H
C++20 concepts for the protocol shared by graph algorithms.
List_Graph< Graph_Node< Node_Info >, Graph_Arc< Arc_Info > > GT
Graph visualization and output generation utilities.
void generate_net_spanning_tree(GT &g, const size_t &nodes_by_level, const double &xdist, const double &ydist, std::ofstream &output)
Generate a net-layout visualization of a spanning tree.
#define ARC_COOKIE(p)
Return the arc cookie
void generate_cross_spanning_tree(GT &g, const size_t &nodes_by_level, const double &xdist, const double &ydist, std::ofstream &output)
Generate a cross-layout visualization of a spanning tree.
#define NODE_COOKIE(p)
Return the node cookie
size_t blossom_maximum_cardinality_matching(const GT &g, DynDlist< typename GT::Arc * > &matching, SA sa=SA())
Alias of compute_maximum_cardinality_general_matching().
Definition Blossom.H:466
void generate_cross_graph(GT &g, const size_t &nodes_by_level, const double &xdist, const double &ydist, std::ostream &out)
Generate a cross-graph layout specification for graphpic.
void generate_net_graph(GT &g, const size_t &nodes_by_level, const double &xdist, const double &ydist, std::ostream &out)
Generate a net-graph layout specification for graphpic.
Default filter for filtered iterators on arcs.
Definition tpl_graph.H:1001
Shading functor for spanning tree arcs.
std::string operator()(typename GT::Arc *a) const
Shading functor for spanning tree nodes.
std::string operator()(typename GT::Node *p) const
Writer that outputs only the node key.
ofstream output
Definition writeHeap.C:215