|
Last change
on this file since fae93a40 was 7640ff5, checked in by Alvin Zhang <alvin.zhang@…>, 3 months ago |
|
add graph example for modules proposal
|
-
Property mode
set to
100644
|
|
File size:
619 bytes
|
| Line | |
|---|
| 1 | #pragma once
|
|---|
| 2 |
|
|---|
| 3 | #include "graph__tshell.h"
|
|---|
| 4 |
|
|---|
| 5 | #include "graph/node__tshell.h"
|
|---|
| 6 | #include "graph/edge__tshell.h"
|
|---|
| 7 |
|
|---|
| 8 | #include <stdlib__tshell.h>
|
|---|
| 9 |
|
|---|
| 10 | struct graph$$Graph {
|
|---|
| 11 | struct graph$node$$Node$$shell *nodes;
|
|---|
| 12 | struct graph$edge$$Edge$$shell *edges;
|
|---|
| 13 | int num_nodes;
|
|---|
| 14 | int num_edges;
|
|---|
| 15 | };
|
|---|
| 16 |
|
|---|
| 17 | struct graph$$Graph$$shell graph$$create_rand_graph(int num_nodes, int num_edges);
|
|---|
| 18 |
|
|---|
| 19 | struct graph$node$$Node$$shell *graph$$grab_random_node(struct graph$$Graph$$shell *g);
|
|---|
| 20 |
|
|---|
| 21 | int graph$$path_found(struct graph$node$$Node$$shell *first, struct graph$node$$Node$$shell *second);
|
|---|
| 22 |
|
|---|
| 23 | int graph$$destroy_graph(struct graph$$Graph$$shell *g);
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.