diff --git a/src/routing4SITA b/src/routing4SITA new file mode 100755 index 0000000..95e560b Binary files /dev/null and b/src/routing4SITA differ diff --git a/src/routing4SITA.c b/src/routing4SITA.c new file mode 100644 index 0000000..7b6069a --- /dev/null +++ b/src/routing4SITA.c @@ -0,0 +1,79 @@ + +#include + +#include "routing4SITA.h" + +int main() { + printf("hello world!\n"); + + NODE_t end; + end.id = 8; + end.nodescount = 0; + + NODE_t g; + g.id = 7; + g.nodescount = 0; + + NODE_t f; + f.id = 6; + f.nodescount = 1; + f.nodesnext[0] = &end; + f.nodescost[0] = 7; + + NODE_t e; + e.id = 5; + e.nodescount = 0; + + NODE_t d; + d.id = 4; + d.nodescount = 0; + + NODE_t c; + c.id = 3; + c.nodescount = 1; + c.nodesnext[0] = &end; + c.nodescost[0] = 3; + + NODE_t b; + b.id = 2; + b.nodescount = 3; + b.nodesnext[0] = &e; + b.nodescost[0] = 11; + b.nodesnext[1] = &f; + b.nodescost[1] = 42; + b.nodesnext[2] = &g; + b.nodescost[2] = 8; + + NODE_t a; + b.id = 1; + b.nodescount = 2; + b.nodesnext[0] = &c; + b.nodescost[0] = 15; + b.nodesnext[1] = &d; + b.nodescost[1] = 27; + + NODE_t start; + b.id = 0; + b.nodescount = 2; + b.nodesnext[0] = &a; + b.nodescost[0] = 72; + b.nodesnext[1] = &b; + b.nodescost[1] = 32; + + + + + + + + + + + + + + + + + return 0; +} diff --git a/src/routing4SITA.h b/src/routing4SITA.h new file mode 100644 index 0000000..7f8fdec --- /dev/null +++ b/src/routing4SITA.h @@ -0,0 +1,31 @@ +#ifndef ROUTING4SITA_H +#define ROUTING4SITA_H + + +#define MAX_CHILDREN 3 + + +typedef struct node NODE_t; + +struct node { + int id; + int nodescount; + NODE_t* nodesnext[MAX_CHILDREN]; + int nodescost[MAX_CHILDREN]; +}; + + + + + + + + + + + + + + + +#endif /* ROUTING4SITA_H */