smntc
an in-memory multimodal graph database
Loading...
Searching...
No Matches
Graph.h
Go to the documentation of this file.
1#ifndef __GRAPH_HEADER__
2#define __GRAPH_HEADER__
3
4struct Graph;
5
8 unsigned int length,
9 int *error
10);
11
13struct Graph *Graph_destruct(
14 struct Graph *this
15);
16
18unsigned int Graph_addVertex(
19 struct Graph *this,
20 int *error
21);
22
25 const struct Graph *this,
26 unsigned int source,
27 unsigned int target,
28 int *error
29);
30
32void Graph_addEdge(
33 struct Graph *this,
34 unsigned int source,
35 unsigned int target,
36 int *error
37);
38
40unsigned int Graph_countSources(
41 const struct Graph *this,
42 unsigned int target,
43 int *error
44);
45
47unsigned int Graph_countTargets(
48 const struct Graph *this,
49 unsigned int source,
50 int *error
51);
52
55 const struct Graph *this,
56 unsigned int target,
57 unsigned int length,
58 unsigned int *sources,
59 int *error
60);
61
64 const struct Graph *this,
65 unsigned int source,
66 unsigned int length,
67 unsigned int *targets,
68 int *error
69);
70
76unsigned int Graph_readLastSource(
77 const struct Graph *this,
78 unsigned int target,
79 int *error
80);
81
87unsigned int Graph_readLastTarget(
88 const struct Graph *this,
89 unsigned int source,
90 int *error
91);
92
94 struct Graph *this,
95 unsigned int length,
96 unsigned int *vertices,
97 int *error
98);
99
101 const struct Graph *this,
102 unsigned int predecessor,
103 unsigned int length,
104 unsigned int *vertices,
105 int *error
106);
107
108unsigned int Graph_protrudeCluster(
109 struct Graph *this,
110 unsigned int predecessor,
111 int *error
112);
113
114unsigned int Graph_getLength(
115 const struct Graph *this
116);
117
118void Graph_import(
119 struct Graph *this,
120 unsigned int index,
121 unsigned int one,
122 unsigned int two,
123 unsigned int three,
124 unsigned int four,
125 unsigned int five,
126 unsigned int six,
127 int *error
128);
129
130void Graph_export(
131 struct Graph *this,
132 unsigned int index,
133 unsigned int *one,
134 unsigned int *two,
135 unsigned int *three,
136 unsigned int *four,
137 unsigned int *five,
138 unsigned int *six,
139 int *error
140);
141
142#endif
void Graph_import(struct Graph *this, unsigned int index, unsigned int one, unsigned int two, unsigned int three, unsigned int four, unsigned int five, unsigned int six, int *error)
Definition Graph.c:902
int Graph_hasEdge(const struct Graph *this, unsigned int source, unsigned int target, int *error)
It checks if a graph storage has a directed edge between two vertices.
Definition Graph.c:179
void Graph_readSources(const struct Graph *this, unsigned int target, unsigned int length, unsigned int *sources, int *error)
It reads all source vertices that have an edge leading to a particular target vertex.
Definition Graph.c:526
unsigned int Graph_countTargets(const struct Graph *this, unsigned int source, int *error)
It counts all target vertices that have an edge leading from a particular source vertex.
Definition Graph.c:504
struct Graph * Graph_construct(unsigned int length, int *error)
It constructs a graph storage.
Definition Graph.c:29
unsigned int Graph_getLength(const struct Graph *this)
Definition Graph.c:897
unsigned int Graph_countSources(const struct Graph *this, unsigned int target, int *error)
It counts all source vertices that have an edge leading to a particular target vertex.
Definition Graph.c:482
void Graph_addEdge(struct Graph *this, unsigned int source, unsigned int target, int *error)
It adds a directed edge from a source vertex to a target vertex.
Definition Graph.c:298
unsigned int Graph_protrudeCluster(struct Graph *this, unsigned int predecessor, int *error)
Definition Graph.c:824
unsigned int Graph_readLastTarget(const struct Graph *this, unsigned int source, int *error)
It reads the last target vertex of a source vertex, if it exists.
Definition Graph.c:712
void Graph_export(struct Graph *this, unsigned int index, unsigned int *one, unsigned int *two, unsigned int *three, unsigned int *four, unsigned int *five, unsigned int *six, int *error)
Definition Graph.c:937
unsigned int Graph_readLastSource(const struct Graph *this, unsigned int target, int *error)
It reads the last source vertex of a target vertex, if it exists.
Definition Graph.c:680
struct Graph * Graph_destruct(struct Graph *this)
It destructs a graph storage.
Definition Graph.c:121
void Graph_readCluster(const struct Graph *this, unsigned int predecessor, unsigned int length, unsigned int *vertices, int *error)
Definition Graph.c:776
void Graph_readTargets(const struct Graph *this, unsigned int source, unsigned int length, unsigned int *targets, int *error)
It reads all target vertices that have an edge leading from a particular source vertex.
Definition Graph.c:603
unsigned int Graph_addVertex(struct Graph *this, int *error)
It adds a vertex into a graph storage.
Definition Graph.c:136
void Graph_addCluster(struct Graph *this, unsigned int length, unsigned int *vertices, int *error)
Definition Graph.c:744
Definition Graph.c:20
struct Inventory * three
Definition Graph.c:23
struct Inventory * two
Definition Graph.c:22
struct Inventory * one
Definition Graph.c:21
struct Inventory * six
Definition Graph.c:26
struct Inventory * five
Definition Graph.c:25
struct Inventory * four
Definition Graph.c:24