NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.52">Synopsis
#include <gts.h>
#define GTS_GNODE_CLASS (klass)
#define GTS_GNODE (obj)
#define GTS_IS_GNODE (obj)
#define GTS_GNODE_NEIGHBOR (n,e)
struct GtsGNodeClass ;
struct GtsGNode ;
GtsGNodeClass * gts_gnode_class (void);
GtsGNode * gts_gnode_new (GtsGNodeClass *klass);
guint gts_gnode_degree (GtsGNode *n,
GtsGraph *g);
void gts_gnode_foreach_edge (GtsGNode *n,
GtsGraph *g,
GtsFunc func,
gpointer data);
void gts_gnode_foreach_neighbor (GtsGNode *n,
GtsGraph *g,
GtsFunc func,
gpointer data);
gfloat gts_gnode_weight (GtsGNode *n);
gfloat gts_gnode_move_cost (GtsGNode *n,
GtsGraph *src,
GtsGraph *dst);
#define GTS_GEDGE_CLASS (klass)
#define GTS_GEDGE (obj)
#define GTS_IS_GEDGE (obj)
struct GtsGEdgeClass ;
struct GtsGEdge ;
GtsGEdgeClass * gts_gedge_class (void);
GtsGEdge * gts_gedge_new (GtsGEdgeClass *klass,
GtsGNode *n1,
GtsGNode *n2);
gfloat gts_gedge_weight (GtsGEdge *e);
#define gts_gedge_connects (e, a1, a2)
#define GTS_GRAPH_CLASS (klass)
#define GTS_GRAPH (obj)
#define GTS_IS_GRAPH (obj)
struct GtsGraphClass ;
struct GtsGraph ;
GtsGraphClass * gts_graph_class (void);
GtsGraph * gts_graph_new (GtsGraphClass *klass,
GtsGNodeClass *node_class,
GtsGEdgeClass *edge_class);
guint gts_graph_read (GtsGraph *g,
GtsFile *fp);
guint gts_graph_read_jostle (GtsGraph *g,
GtsFile *fp);
void gts_graph_write (GtsGraph *g,
FILE *fp);
void gts_graph_write_dot (GtsGraph *g,
FILE *fp);
void gts_graph_print_stats (GtsGraph *g,
FILE *fp);
void gts_graph_foreach_edge (GtsGraph *g,
GtsFunc func,
gpointer data);
struct GtsGraphTraverse ;
enum GtsTraverseType ;
GtsGraphTraverse * gts_graph_traverse_new (GtsGraph *g,
GtsGNode *n,
GtsTraverseType type,
gboolean reinit);
GtsGNode * gts_graph_traverse_next (GtsGraphTraverse *t);
GtsGNode * gts_graph_traverse_what_next (GtsGraphTraverse *t);
void gts_graph_traverse_destroy (GtsGraphTraverse *t);
guint gts_graph_edges_cut (GtsGraph *g);
gfloat gts_graph_edges_cut_weight (GtsGraph *g);
guint gts_graph_distance_sum (GtsGraph *g,
GtsGNode *center);
GtsGNode * gts_graph_farthest (GtsGraph *g,
GSList *gnodes);
gfloat gts_graph_weight (GtsGraph *g);
#define GTS_FNODE_CLASS (klass)
#define GTS_FNODE (obj)
#define GTS_IS_FNODE (obj)
struct GtsFNode ;
struct GtsFNodeClass ;
GtsFNodeClass * gts_fnode_class (void);
GtsFNode * gts_fnode_new (GtsFNodeClass *klass,
GtsFace *f);
GtsGraph * gts_surface_graph_new (GtsGraphClass *klass,
GtsSurface *s);
GtsSurface * gts_surface_graph_surface (GtsGraph *surface_graph,
GtsSurface *s);
GtsGraph * gts_segments_graph_new (GtsGraphClass *klass,
GSList *segments);
Details GTS_GNODE_CLASS()#define GTS_GNODE_CLASS(klass)
GTS_IS_GNODE()#define GTS_IS_GNODE(obj)
GTS_GNODE_NEIGHBOR()#define GTS_GNODE_NEIGHBOR(n,e) (GTS_GEDGE (e)->n1 == n ? GTS_GEDGE (e)->n2 : GTS_GEDGE (e)->n2 == n ? GTS_GEDGE (e)->n1 : NULL)
struct GtsGNodestruct GtsGNode {
GtsSListContainer container;
guint level;
};
gts_gnode_foreach_edge ()Calls func for each GtsGEdge connecting n to another GtsGNode
(belonging to g if g is not NULL .
gts_gnode_foreach_neighbor ()Calls func for each neighbor GtsGNode of n (belonging to g if
g is not NULL .
GTS_GEDGE_CLASS()#define GTS_GEDGE_CLASS(klass)
GTS_IS_GEDGE()#define GTS_IS_GEDGE(obj)
struct GtsGEdgestruct GtsGEdge {
GtsContainee containee;
GtsGNode * n1;
GtsGNode * n2;
};
gts_gedge_connects()#define gts_gedge_connects(e, a1, a2)
GTS_GRAPH_CLASS()#define GTS_GRAPH_CLASS(klass)
GTS_IS_GRAPH()#define GTS_IS_GRAPH(obj)
struct GtsGraphstruct GtsGraph {
GtsHashContainer object;
GtsGNodeClass * node_class;
GtsGEdgeClass * edge_class;
};
gts_graph_read ()Adds to g the data read from fp . The format of the file pointed
to by fp is as described in gts_graph_write ().
gts_graph_read_jostle ()Adds to g the nodes and edges defined in the file pointed to by
fp . This file must use the Jostle "graph" ASCII format.
The nodes created are of type GtsNGNode and their identities are the
line number at which they appear in fp .
gts_graph_write ()void gts_graph_write (GtsGraph *g,
FILE *fp);
Writes in the file fp an ASCII representation of g . The file
format is as follows.
All the lines beginning with GTS_COMMENTS are ignored. The first line
contains two unsigned integers separated by spaces. The first
integer is the number of nodes, nn, the second is the number of
edges, ne.
Follows nn lines containing node description.
Follows ne lines containing the two indices (starting
from one) of the nodes of each edge.
The format described above is the least common denominator to all
GTS files. Consistent with an object-oriented approach, the GTS
file format is extensible. Each of the lines of the file can be
extended with user-specific attributes accessible through the
read () and write () virtual methods of each of the objects written
(graph, nodes or edges). When read with different object classes,
these extra attributes are just ignored.
gts_graph_write_dot ()void gts_graph_write_dot (GtsGraph *g,
FILE *fp);
Writes in the file fp an ASCII representation of g in the dot format of
AT&T Bell Labs.
gts_graph_print_stats ()void gts_graph_print_stats (GtsGraph *g,
FILE *fp);
Writes to fp a summary of the properties of g .
gts_graph_foreach_edge ()Calls func for each GtsEdge of g .
enum GtsTraverseTypetypedef enum { GTS_BREADTH_FIRST
} GtsTraverseType;
gts_graph_traverse_new ()
gts_graph_traverse_next ()
gts_graph_traverse_what_next ()
gts_graph_traverse_destroy ()Frees all the memory allocated for t .
gts_graph_edges_cut ()guint gts_graph_edges_cut (GtsGraph *g);
gts_graph_edges_cut_weight ()gfloat gts_graph_edges_cut_weight (GtsGraph *g);
gts_graph_distance_sum ()
GTS_FNODE_CLASS()#define GTS_FNODE_CLASS(klass)
GTS_IS_FNODE()#define GTS_IS_FNODE(obj)
struct GtsFNodestruct GtsFNode {
GtsGNode node;
GtsFace * f;
};
gts_surface_graph_surface ()
gts_segments_graph_new ()