Audit a directed graph export
Duplicated edge rows and loops change degree in a multigraph. Surface those counts before downstream graph analysis. A duplicate edge inflates degree and a self-loop contributes to both directions. The simple-graph flag records either condition.
Run the framework with your own input
Install Blyx 0.2.1 and a Rust toolchain with a host linker, then run the versioned project. Each positional argument is a number or a comma-separated numerical vector. The CLI accepts up to 16 entries per vector. The imported module accepts longer inputs.
git clone --depth 1 --branch v0.1.0 https://github.com/Rahulchaube1/blyx-tanager.git
cd blyx-tanager
blyxc native-run project.blyx -- "1,1,2" "2,2,2" 2API and return values
Returns [incoming, outgoing, graph-wide duplicate edges, graph-wide loops, simple graph flag]. Duplicate detection uses quadratic time for short edge lists. Invalid input returns an empty vector.
| Argument | Accepted input |
|---|---|
| starts | Vector of: exact signed integer |
| ends | Vector of: exact signed integer |
| node | exact signed integer |
Use the libraries independently
The framework vendors the same library source published in these two repositories. Each module has its own package page, input contract and regression suite.
Try the program
Expected output
3 1 1 1 0
Practice
Change starts = [1, 2], ends = [2, 1], node = 1.0. Predict the result, then run the program.
Hint
Returns [incoming, outgoing, graph-wide duplicate edges, graph-wide loops, simple graph flag]. Duplicate detection uses quadratic time for short edge lists.
Worked solution
The result vector is [1, 1, 0, 0, 1]. Compare its fields with the return layout in the API section.
Find
let starts = [1, 1, 2];Replace with
let starts = [1, 2];Find
let ends = [2, 2, 2];Replace with
let ends = [2, 1];Find
let node = 2.0;Replace with
let node = 1.0;Output after the change
1 1 0 0 1
