Weighted graph

Name

Weighted graph -- 

Synopsis


#include <gts.h>


#define     GTS_WGEDGE_CLASS                (klass)
#define     GTS_WGEDGE                      (obj)
#define     GTS_IS_WGEDGE                   (obj)
struct      GtsWGEdgeClass;
struct      GtsWGEdge;

GtsWGEdgeClass* gts_wgedge_class            (void);
GtsWGEdge*  gts_wgedge_new                  (GtsWGEdgeClass *klass,
                                             GtsGNode *n1,
                                             GtsGNode *n2,
                                             gfloat weight);

#define     GTS_WGNODE_CLASS                (klass)
#define     GTS_WGNODE                      (obj)
#define     GTS_IS_WGNODE                   (obj)
struct      GtsWGNodeClass;
struct      GtsWGNode;

GtsWGNodeClass* gts_wgnode_class            (void);
GtsWGNode*  gts_wgnode_new                  (GtsWGNodeClass *klass,
                                             gfloat weight);

#define     GTS_WGRAPH_CLASS                (klass)
#define     GTS_WGRAPH                      (obj)
#define     GTS_IS_WGRAPH                   (obj)
struct      GtsWGraphClass;
struct      GtsWGraph;

GtsWGraphClass* gts_wgraph_class            (void);
gfloat      gts_wgraph_weight_max           (GtsWGraph *wg);

Description

Details

GTS_WGEDGE_CLASS()

#define     GTS_WGEDGE_CLASS(klass)

klass :


GTS_WGEDGE()

#define     GTS_WGEDGE(obj)

obj :


GTS_IS_WGEDGE()

#define     GTS_IS_WGEDGE(obj)

obj :


struct GtsWGEdgeClass

struct GtsWGEdgeClass {

  GtsGEdgeClass parent_class;
};


struct GtsWGEdge

struct GtsWGEdge {

  GtsGEdge gedge;

  gfloat weight;
};


gts_wgedge_class ()

GtsWGEdgeClass* gts_wgedge_class            (void);

Returns :

the GtsWGEdgeClass.


gts_wgedge_new ()

GtsWGEdge*  gts_wgedge_new                  (GtsWGEdgeClass *klass,
                                             GtsGNode *n1,
                                             GtsGNode *n2,
                                             gfloat weight);

klass :

a GtsWGEdgeClass.

n1 :

a GtsGNode.

n2 :

another GtsGNode.

weight :

the weight of the new edge.

Returns :

a new GtsWGEdge of weight weight linking n1 and n2.


GTS_WGNODE_CLASS()

#define     GTS_WGNODE_CLASS(klass)

klass :


GTS_WGNODE()

#define     GTS_WGNODE(obj)

obj :


GTS_IS_WGNODE()

#define     GTS_IS_WGNODE(obj)

obj :


struct GtsWGNodeClass

struct GtsWGNodeClass {

  GtsGNodeClass parent_class;
};


struct GtsWGNode

struct GtsWGNode {

  GtsGNode node;
  
  gfloat weight;
};


gts_wgnode_class ()

GtsWGNodeClass* gts_wgnode_class            (void);

Returns :

the GtsWGNodeClass.


gts_wgnode_new ()

GtsWGNode*  gts_wgnode_new                  (GtsWGNodeClass *klass,
                                             gfloat weight);

klass :

a GtsWGNodeClass.

weight :

the weight of the GtsWGNode to create.

Returns :

a new GtsWGNode of weight weight.


GTS_WGRAPH_CLASS()

#define     GTS_WGRAPH_CLASS(klass)

klass :


GTS_WGRAPH()

#define     GTS_WGRAPH(obj)

obj :


GTS_IS_WGRAPH()

#define     GTS_IS_WGRAPH(obj)

obj :


struct GtsWGraphClass

struct GtsWGraphClass {

  GtsGraphClass parent_class;
};


struct GtsWGraph

struct GtsWGraph {

  GtsGraph graph;

  gfloat weight;
};


gts_wgraph_class ()

GtsWGraphClass* gts_wgraph_class            (void);

Returns :

the GtsWGraphClass.


gts_wgraph_weight_max ()

gfloat      gts_wgraph_weight_max           (GtsWGraph *wg);

wg :

a GtsWGraph.

Returns :

the maximum weight of any vertices belonging to g.