annotate toolboxes/graph_visualisation/include/graphviz/pack.h @ 0:cc4b1211e677 tip

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
rev   line source
Daniel@0 1 /* $Id: pack.h,v 1.17 2009/08/11 21:23:23 erg Exp $ $Revision: 1.17 $ */
Daniel@0 2 /* vim:set shiftwidth=4 ts=8: */
Daniel@0 3
Daniel@0 4 /**********************************************************
Daniel@0 5 * This software is part of the graphviz package *
Daniel@0 6 * http://www.graphviz.org/ *
Daniel@0 7 * *
Daniel@0 8 * Copyright (c) 1994-2004 AT&T Corp. *
Daniel@0 9 * and is licensed under the *
Daniel@0 10 * Common Public License, Version 1.0 *
Daniel@0 11 * by AT&T Corp. *
Daniel@0 12 * *
Daniel@0 13 * Information and Software Systems Research *
Daniel@0 14 * AT&T Research, Florham Park NJ *
Daniel@0 15 **********************************************************/
Daniel@0 16
Daniel@0 17
Daniel@0 18
Daniel@0 19 #ifndef _PACK_H
Daniel@0 20 #define _PACK_H 1
Daniel@0 21
Daniel@0 22 #ifdef __cplusplus
Daniel@0 23 extern "C" {
Daniel@0 24 #endif
Daniel@0 25
Daniel@0 26 #include "types.h"
Daniel@0 27
Daniel@0 28 /* Type indicating granularity and method
Daniel@0 29 * l_undef - unspecified
Daniel@0 30 * l_node - polyomino using nodes and edges
Daniel@0 31 * l_clust - polyomino using nodes and edges and top-level clusters
Daniel@0 32 * (assumes ND_clust(n) unused by application)
Daniel@0 33 * l_graph - polyomino using computer graph bounding box
Daniel@0 34 * l_array - array based on graph bounding boxes
Daniel@0 35 * l_aspect - tiling based on graph bounding boxes preserving aspect ratio
Daniel@0 36 * l_hull - polyomino using convex hull (unimplemented)
Daniel@0 37 * l_tile - tiling using graph bounding box (unimplemented)
Daniel@0 38 * l_bisect - alternate bisection using graph bounding box (unimplemented)
Daniel@0 39 */
Daniel@0 40 typedef enum { l_undef, l_clust, l_node, l_graph, l_array, l_aspect } pack_mode;
Daniel@0 41
Daniel@0 42 #define PK_COL_MAJOR 1
Daniel@0 43 #define PK_USER_VALS 2
Daniel@0 44
Daniel@0 45 typedef unsigned char packval_t;
Daniel@0 46
Daniel@0 47 typedef struct {
Daniel@0 48 float aspect; /* desired aspect ratio */
Daniel@0 49 int sz; /* row/column size size */
Daniel@0 50 unsigned int margin; /* margin left around objects, in points */
Daniel@0 51 int doSplines; /* use splines in constructing graph shape */
Daniel@0 52 pack_mode mode; /* granularity and method */
Daniel@0 53 boolean *fixed; /* fixed[i] == true implies g[i] should not be moved */
Daniel@0 54 packval_t* vals; /* for arrays, sort numbers */
Daniel@0 55 int flags;
Daniel@0 56 } pack_info;
Daniel@0 57 #ifdef GVDLL
Daniel@0 58 #define extern __declspec(dllexport)
Daniel@0 59 #else
Daniel@0 60 #define extern
Daniel@0 61 #endif
Daniel@0 62
Daniel@0 63 /*visual studio*/
Daniel@0 64 #ifdef WIN32_DLL
Daniel@0 65 #ifndef GVC_EXPORTS
Daniel@0 66 #define extern __declspec(dllimport)
Daniel@0 67 #endif
Daniel@0 68 #endif
Daniel@0 69 /*end visual studio*/
Daniel@0 70
Daniel@0 71 extern point *putRects(int ng, boxf* bbs, pack_info* pinfo);
Daniel@0 72 extern int packRects(int ng, boxf* bbs, pack_info* pinfo);
Daniel@0 73
Daniel@0 74 extern point *putGraphs(int, Agraph_t **, Agraph_t *, pack_info *);
Daniel@0 75 extern int packGraphs(int, Agraph_t **, Agraph_t *, pack_info *);
Daniel@0 76 extern int packSubgraphs(int, Agraph_t **, Agraph_t *, pack_info *);
Daniel@0 77 extern int pack_graph(int ng, Agraph_t** gs, Agraph_t* root, boolean* fixed);
Daniel@0 78
Daniel@0 79 extern int shiftGraphs(int, Agraph_t**, point*, Agraph_t*, int);
Daniel@0 80
Daniel@0 81 extern pack_mode getPackMode(Agraph_t * g, pack_mode dflt);
Daniel@0 82 extern int getPack(Agraph_t *, int not_def, int dflt);
Daniel@0 83 extern pack_mode getPackInfo(Agraph_t * g, pack_mode dflt, int dfltMargin, pack_info*);
Daniel@0 84 extern pack_mode getPackModeInfo(Agraph_t * g, pack_mode dflt, pack_info*);
Daniel@0 85 extern pack_mode parsePackModeInfo(char* p, pack_mode dflt, pack_info* pinfo);
Daniel@0 86
Daniel@0 87 extern int isConnected(Agraph_t *);
Daniel@0 88 extern Agraph_t **ccomps(Agraph_t *, int *, char *);
Daniel@0 89 extern Agraph_t **pccomps(Agraph_t *, int *, char *, boolean *);
Daniel@0 90 extern int nodeInduce(Agraph_t *);
Daniel@0 91 #undef extern
Daniel@0 92 #ifdef __cplusplus
Daniel@0 93 }
Daniel@0 94 #endif
Daniel@0 95 #endif