@@ -85,6 +85,33 @@ See the [docs](docs/README.md) for the latest documentation.
85
85
86
86
Check out the [ docs.rs/graphina] ( https://docs.rs/graphina ) for the latest API documentation.
87
87
88
+ #### Simple Example
89
+
90
+ ``` rust
91
+ use graphina :: core :: types :: Graph ;
92
+
93
+ fn main () {
94
+ // Create a new directed graph
95
+ let mut graph = Graph :: new ();
96
+
97
+ // Add nodes and edges to the graph
98
+ let n0 = graph . add_node (0 );
99
+ let n1 = graph . add_node (1 );
100
+ let n2 = graph . add_node (2 );
101
+ let n3 = graph . add_node (3 );
102
+ graph . add_edge (n0 , n1 , 1.0 );
103
+ graph . add_edge (n1 , n2 , 1.0 );
104
+ graph . add_edge (n2 , n3 , 2.0 );
105
+
106
+ // Get the neighbors of node 1
107
+ for neighbor in graph . neighbors (n1 ) {
108
+ println! (" Node 1 has neighbor: {}" , neighbor . index ());
109
+ }
110
+ }
111
+ ```
112
+
113
+ See the [ test] ( tests/ ) directory for more usage examples.
114
+
88
115
### Contributing
89
116
90
117
See [ CONTRIBUTING.md] ( CONTRIBUTING.md ) for details on how to make a contribution.
@@ -93,7 +120,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to make a contribution
93
120
94
121
The mascot is named "Graphina the Dinosaur".
95
122
As the name implies, she's a dinosaur, however, she herself thinks she's a dragon.
96
- The logo was created using Gimp, ComfyUI, and a Flex Schnell v2 model.
123
+ The logo was created using Gimp, ComfyUI, and a Flux Schnell v2 model.
97
124
98
125
### Licensing
99
126
0 commit comments