diff options
| author | Kamen Mladenov <kamen@syndamia.com> | 2025-01-10 10:29:41 +0200 |
|---|---|---|
| committer | Kamen Mladenov <kamen@syndamia.com> | 2025-01-10 10:29:41 +0200 |
| commit | d4e489eafa93eb41cb2bfdc9bca56dd56fc9340a (patch) | |
| tree | e24a0a47c5178be4c9c35356b3b7450405b3ba3a /guests | |
| parent | c5cc00e84ab366b57c80ed7804c398ea7ecefc98 (diff) | |
| download | zkVMs-benchmarks-d4e489eafa93eb41cb2bfdc9bca56dd56fc9340a.tar zkVMs-benchmarks-d4e489eafa93eb41cb2bfdc9bca56dd56fc9340a.tar.gz zkVMs-benchmarks-d4e489eafa93eb41cb2bfdc9bca56dd56fc9340a.zip | |
feat(guests/graph_coloring): Make codebase more flexible
Diffstat (limited to 'guests')
| -rw-r--r-- | guests/graph_coloring/src/lib.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/guests/graph_coloring/src/lib.rs b/guests/graph_coloring/src/lib.rs index 2feef7f..691a127 100644 --- a/guests/graph_coloring/src/lib.rs +++ b/guests/graph_coloring/src/lib.rs @@ -1,7 +1,5 @@ -const VERTICES: usize = 010; - #[guests_macro::proving_entrypoint] -pub fn start( +pub fn main( graph: Vec<Vec<bool>>, colors: u32, coloring: Vec<Vec<u32>>, @@ -17,8 +15,8 @@ pub fn start( let mut ret = max_color + 1 == colors; // Is coloring correct? - for i in 0..VERTICES { - for j in 0..VERTICES { + for i in 0..graph.len() { + for j in 0..graph.len() { // graph[i][j] -> coloring[i] != coloring[j] ret = ret & (! graph[i][j] | (coloring[i][1] != coloring[j][1])); } |
