Skip to content

Commit 5a8beb6

Browse files
committed
WIP
1 parent 82232ef commit 5a8beb6

File tree

4 files changed

+30
-2
lines changed

4 files changed

+30
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,4 @@ output_*
8383
*.so
8484
.benchmarks/
8585
ci.yml
86+
src/main.rs

README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,33 @@ See the [docs](docs/README.md) for the latest documentation.
8585

8686
Check out the [docs.rs/graphina](https://docs.rs/graphina) for the latest API documentation.
8787

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+
88115
### Contributing
89116

90117
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
93120

94121
The mascot is named "Graphina the Dinosaur".
95122
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.
97124

98125
### Licensing
99126

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ pub mod centrality;
33
pub mod community;
44
pub mod core;
55
pub mod links;
6-
pub mod logging;
6+
mod settings;
File renamed without changes.

0 commit comments

Comments
 (0)