Graphviz 13.0.0~dev.20250121.0651
|
merge and pack disjoint graphs More...
#include "config.h"
#include <getopt.h>
#include <algorithm>
#include <cassert>
#include <gvc/gvc.h>
#include <cgraph/ingraphs.h>
#include <common/render.h>
#include <common/utils.h>
#include <neatogen/neatoprocs.h>
#include <iostream>
#include <limits>
#include <map>
#include <optional>
#include <pack/pack.h>
#include <set>
#include <stddef.h>
#include <string>
#include <utility>
#include <util/alloc.h>
#include <util/exit.h>
#include <vector>
#include "openFile.h"
Go to the source code of this file.
Data Structures | |
struct | attr_t |
Macros | |
#define | NEWNODE(n) ((node_t*)ND_alg(n)) |
#define | MARK(e) (ED_alg(e) = e) |
#define | MARKED(e) (ED_alg(e)) |
#define | SETCLUST(g, h) (GD_alg(g) = h) |
#define | GETCLUST(g) ((Agraph_t*)GD_alg(g)) |
Typedefs | |
using | attr_map_t = std::map< std::string, AttributeValue > |
attribute name → value collection of those we have seen | |
using | used_t = std::multiset< std::string > |
names that have already been used during generation | |
Functions | |
static void | usage (int v) |
static int | setNameValue (char *arg) |
static int | setUInt (unsigned int *v, char *arg) |
static Agsym_t * | agraphattr (Agraph_t *g, char *name, const char *value) |
static Agsym_t * | agnodeattr (Agraph_t *g, char *name, const char *value) |
static Agsym_t * | agedgeattr (Agraph_t *g, char *name, const char *value) |
static void | init (int argc, char *argv[], pack_info *pinfo) |
static void | init_node_edge (Agraph_t *g) |
static void | init_graph (Agraph_t *g, bool fill, GVC_t *gvc) |
static void | cloneDfltAttrs (Agraph_t *old, Agraph_t *new_graph, int attr_kind) |
static void | cloneAttrs (void *old, void *new_graph) |
static void | cloneEdge (Agedge_t *old, Agedge_t *new_edge) |
static void | cloneNode (Agnode_t *old, Agnode_t *new_node) |
static void | cloneCluster (Agraph_t *old, Agraph_t *new_cluster) |
static void | fillDict (attr_map_t &newdict, Agraph_t *g, int attr_kind) |
static void | fillGraph (Agraph_t *g, const attr_map_t &d, Agsym_t *(*setf)(Agraph_t *, char *, const char *), size_t cnt) |
static void | initAttrs (Agraph_t *root, std::vector< Agraph_t * > &gs) |
static void | cloneGraphAttr (Agraph_t *g, Agraph_t *ng) |
static std::string | xName (used_t &names, char *oldname) |
static void | cloneSubg (Agraph_t *g, Agraph_t *ng, Agsym_t *G_bb, used_t &gnames) |
static void | cloneClusterTree (Agraph_t *g, Agraph_t *ng) |
static Agraph_t * | cloneGraph (std::vector< Agraph_t * > &gs, GVC_t *gvc, Agdesc_t kind) |
static std::vector< Agraph_t * > | readGraphs (GVC_t *gvc, std::optional< Agdesc_t > &kind) |
static boxf | compBB (std::vector< Agraph_t * > &gs) |
int | main (int argc, char *argv[]) |
Variables | |
gvplugin_library_t | gvplugin_neato_layout_LTX_library |
lt_symlist_t | lt_preloaded_symbols [] |
static int | verbose = 0 |
static char ** | myFiles = 0 |
static FILE * | outfp |
static std::vector< attr_t > | G_args |
static bool | doPack |
static char * | gname = const_cast<char*>("root") |
static const char | useString [] |
Definition at line 459 of file gvpack.cpp.
#define MARK | ( | e | ) | (ED_alg(e) = e) |
Definition at line 456 of file gvpack.cpp.
#define MARKED | ( | e | ) | (ED_alg(e)) |
Definition at line 457 of file gvpack.cpp.
Definition at line 84 of file gvpack.cpp.
#define SETCLUST | ( | g, | |
h | |||
) | (GD_alg(g) = h) |
Definition at line 458 of file gvpack.cpp.
using attr_map_t = std::map<std::string, AttributeValue> |
Definition at line 370 of file gvpack.cpp.
using used_t = std::multiset<std::string> |
Definition at line 438 of file gvpack.cpp.
Definition at line 149 of file gvpack.cpp.
References agattr(), and AGEDGE.
Referenced by initAttrs().
Definition at line 145 of file gvpack.cpp.
References agattr(), and AGNODE.
Definition at line 141 of file gvpack.cpp.
References agattr(), and AGRAPH.
|
static |
Definition at line 306 of file gvpack.cpp.
References aghtmlstr(), agnxtattr(), agroot(), agset(), agstrdup_html(), agstrfree(), AGTYPE, agxget(), and Agsym_s::name.
Referenced by cloneEdge(), cloneGraphAttr(), and cloneNode().
Definition at line 355 of file gvpack.cpp.
References GD_bb, and GD_label.
Referenced by cloneClusterTree().
Definition at line 520 of file gvpack.cpp.
References cloneCluster(), cloneClusterTree(), GD_clust, GD_n_cluster, GETCLUST, and gv_calloc().
Referenced by cloneClusterTree(), and cloneGraph().
Definition at line 295 of file gvpack.cpp.
References agattr(), agattr_html(), aghtmlstr(), agnxtattr(), Agsym_s::defval, and Agsym_s::name.
Referenced by cloneGraphAttr().
Definition at line 331 of file gvpack.cpp.
References cloneAttrs(), ED_edge_type, ED_head_label, ED_label, ED_spl, ED_tail_label, and ED_xlabel.
Referenced by cloneSubg().
Definition at line 541 of file gvpack.cpp.
References agattr(), agbindrec(), AgDefaultDisc, agfindgraphattr, agfindnode, agfstnode(), agnameof(), agnode(), agnxtnode(), agopen(), AGRAPH, agsubg(), agxset(), cloneClusterTree(), cloneNode(), cloneSubg(), doPack, G_args, GD_clust, GD_has_labels, GD_n_cluster, GETCLUST, gname, gv_calloc(), gvc, GVSPLINES, init_graph(), initAttrs(), ND_alg, State, verbose, and xName().
Referenced by main(), and mTestgvpr().
Definition at line 430 of file gvpack.cpp.
References AGEDGE, AGNODE, cloneAttrs(), and cloneDfltAttrs().
Referenced by cloneSubg().
Definition at line 341 of file gvpack.cpp.
References cloneAttrs(), ND_coord, ND_height, ND_ht, ND_lw, ND_pos, ND_rw, ND_shape, ND_shape_info, ND_width, ND_xlabel, and POINTS.
Referenced by cloneGraph().
Definition at line 466 of file gvpack.cpp.
References agbindrec(), agedge(), agfstnode(), agfstout(), agfstsubg(), aghead, agnameof(), agnxtnode(), agnxtout(), agnxtsubg(), agsubg(), agsubnode(), agtail, agxset(), cloneEdge(), cloneGraphAttr(), cloneSubg(), doPack, is_a_cluster(), MARK, MARKED, NEWNODE, SETCLUST, and xName().
Referenced by cloneGraph(), and cloneSubg().
Definition at line 664 of file gvpack.cpp.
References GD_bb, boxf::LL, boxf::UR, pointf_s::x, and pointf_s::y.
Referenced by main().
|
static |
Definition at line 377 of file gvpack.cpp.
References agnxtattr().
Referenced by initAttrs().
|
static |
Definition at line 396 of file gvpack.cpp.
References cnt().
Referenced by initAttrs().
|
static |
Definition at line 153 of file gvpack.cpp.
References agnodeattr, CL_OFFSET, pack_info::doSplines, pack_info::fixed, gname, l_clust, l_undef, pack_info::margin, pack_info::mode, myFiles, NODENAME_ESC, openFile(), outfp, parsePackModeInfo(), setNameValue(), setUInt(), pack_info::sz, usage, Verbose, and verbose.
Referenced by main().
Definition at line 254 of file gvpack.cpp.
References AGEDGE, agfindgraphattr, agfstnode(), agfstout(), aginit(), agnameof(), AGNODE, agnxtnode(), agnxtout(), AGRAPH, Concentrate, ED_edge_type, ED_spl, GD_gvc, GD_ndim, graph_init(), graphviz_exit(), gvc, IGNORED, init_node_edge(), init_nop(), late_int(), and Ndim.
Referenced by cloneGraph(), and readGraphs().
|
static |
Definition at line 231 of file gvpack.cpp.
References agfindnodeattr, agfstnode(), agfstout(), agnnodes(), agnxtnode(), agnxtout(), common_init_edge(), N_pos, neato_init_node(), and user_pos().
Referenced by init_graph().
Definition at line 414 of file gvpack.cpp.
References AGEDGE, agedgeattr(), AGNODE, agnodeattr, AGRAPH, agraphattr, fillDict(), and fillGraph().
Referenced by cloneGraph().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 706 of file gvpack.cpp.
References lt_symlist_t::address, agwrite(), attach_attrs(), cloneGraph(), compBB(), doPack, dotneato_postprocess(), GD_bb, graphviz_exit(), gvc, gvContextPlugins(), gvplugin_neato_layout_LTX_library, init(), l_undef, lt_preloaded_symbols, pack_info::mode, outfp, packGraphs(), and readGraphs().
|
static |
Definition at line 628 of file gvpack.cpp.
References agisstrict(), agnameof(), agnnodes(), Agraph_s::desc, Agdesc_s::directed, doPack, graphviz_exit(), gvc, init_graph(), myFiles, newIngraph(), nextGraph(), Nop, POINTS_PER_INCH, PSinputscale, and verbose.
Referenced by main().
|
static |
Definition at line 110 of file gvpack.cpp.
References G_args.
Referenced by init().
|
static |
Definition at line 127 of file gvpack.cpp.
Referenced by init().
|
static |
Definition at line 100 of file gvpack.cpp.
References graphviz_exit(), and useString.
|
static |
Definition at line 447 of file gvpack.cpp.
Referenced by cloneGraph(), and cloneSubg().
|
static |
Definition at line 81 of file gvpack.cpp.
Referenced by cloneGraph(), cloneSubg(), main(), and readGraphs().
|
static |
Definition at line 80 of file gvpack.cpp.
Referenced by cloneGraph(), and setNameValue().
|
static |
Definition at line 82 of file gvpack.cpp.
Referenced by cloneGraph(), and init().
|
extern |
Definition at line 29 of file gvplugin_neato_layout.c.
Referenced by main().
lt_symlist_t lt_preloaded_symbols[] |
Definition at line 54 of file gvpack.cpp.
Referenced by main().
|
static |
Definition at line 78 of file gvpack.cpp.
Referenced by init(), and readGraphs().
|
static |
Definition at line 79 of file gvpack.cpp.
|
static |
Definition at line 86 of file gvpack.cpp.
Referenced by usage().
|
static |
Definition at line 77 of file gvpack.cpp.
Referenced by cloneGraph(), init(), and readGraphs().