Motr  M0
graph.c File Reference
#include "lib/assert.h"
#include "lib/misc.h"
#include "graph/graph.h"
#include "graph/graph_xc.h"
Include dependency graph for graph.c:

Go to the source code of this file.

Enumerations

enum  { VTYPE_MAX = 256 }
 

Functions

static struct m0_garcarc_get (const struct m0_gvertice *src, const struct m0_garc_type *atype)
 
static struct m0_gverticearc_try (const struct m0_gvertice *vertice, const struct m0_garc_type *atype)
 
static void graph_add (struct m0_graph *g, struct m0_gvertice *vertice)
 
static void graph_del (struct m0_graph *g, struct m0_gvertice *vertice)
 
static void vertice_init (struct m0_gvertice *vertice, const struct m0_gvertice_type *vt, const struct m0_fid *fid)
 
static bool has_arc (const struct m0_gvertice *vertice, const struct m0_garc_type *atype)
 
static const struct m0_gvertice_typevtype (const struct m0_gvertice *src)
 
void m0_gvertice_link (struct m0_gvertice *src, struct m0_gvertice *dst, const struct m0_garc_type *atype)
 
void m0_gvertice_unlink (struct m0_gvertice *src, struct m0_gvertice *dst, const struct m0_garc_type *atype)
 
bool m0_gvertice_linked (const struct m0_gvertice *src, const struct m0_gvertice *dst, const struct m0_garc_type *atype)
 
bool m0_gvertice_is_set (const struct m0_gvertice *vertice, const struct m0_garc_type *atype)
 
void m0_gvertice_init (struct m0_graph *g, struct m0_gvertice *vertice, const struct m0_gvertice_type *vt, const struct m0_fid *fid)
 
void m0_gvertice_fini (struct m0_graph *g, struct m0_gvertice *vertice)
 
bool m0_gvertice_invariant (const struct m0_gvertice *vertice)
 
bool m0_gvertice_type_invariant (const struct m0_gvertice_type *vt)
 
bool m0_garc_type_invariant (const struct m0_gvertice_type *vt, const struct m0_garc_type *atype)
 
bool m0_graph_invariant (const struct m0_graph *graph)
 
struct m0_gverticem0_garc_try (const struct m0_gvertice *vertice, const struct m0_garc_type *atype)
 
void m0_gvertice_type_register (struct m0_gvertice_type *vt)
 
void m0_garc_type_register (const struct m0_garc_type *atype)
 
void m0_garc_type_pair_register (struct m0_garc_type *direct, struct m0_garc_type *reverse)
 
void m0_garc_type_add (struct m0_gvertice_type *vt, const struct m0_garc_type *atype)
 
int m0_garc_follow (const struct m0_gvertice *vertice, const struct m0_garc_type *atype,...)
 
M0_INTERNAL int m0_graph_mod_init (void)
 
M0_INTERNAL void m0_graph_mod_fini (void)
 

Variables

static struct m0_garc_type GRAPH_PREV
 
static struct m0_garc_type GRAPH_NEXT
 
static const struct m0_gvertice_typevtypes [VTYPE_MAX]