| Crates.io | ttm-rs |
| lib.rs | ttm-rs |
| version | 0.1.0 |
| created_at | 2020-02-20 03:58:02.288375+00 |
| updated_at | 2020-02-20 03:58:02.288375+00 |
| description | CLI to turn tuples into adjacency matrices |
| homepage | https://github.com/nonnontrivial/ttm-rs |
| repository | https://github.com/nonnontrivial/ttm-rs.git |
| max_upload_size | |
| id | 210813 |
| size | 24,150 |
CLI to turn tuples into adjacency matrices
This is a hobby project in early development.
Tested on
cargo 1.42.0-nightly
.txt tuple input.md, and .json file inputstdin tuple inputGiven a source file containing a directed graph represented as source->target
2-tuples, ttm-rs creates an adjacency matrix where ij is 1 when i has
j as a target.
For example, digraph.txt
0 3
1 2
2 2
2 3
3 1
Run using newline as tuple delimiter (default)
cargo r -- -f ./digraph.txt
prints to stdout
[[0, 0, 0, 1],
[0, 0, 1, 0],
[0, 0, 1, 1],
[0, 1, 0, 0]]
cargo install ttm-rs