Skip to content

Commit

Permalink
PageRank Args, is_self_loop on edge, remove all option<bool>, added b…
Browse files Browse the repository at this point in the history
…incode version on graph, fix all warns, (#1499)

* pagerank additions

* fix tests

* fix tests

* add is_self_loop to edge

* fmt

* add version to materialize

* remove all option<bools> for bool, add force param to loading, fix loading in all places, fix issue with bincode saving, fmt, clean all warnings,

* fixed one borked test, one left

* fixed all tests

* use bincode versino instead of raphtory version

* added bincode version with test

* fix issues with tests in windows, fix issues in python when binnning graphs between rust and python
  • Loading branch information
Haaroon authored Feb 22, 2024
1 parent 7f494b0 commit eb54c49
Show file tree
Hide file tree
Showing 33 changed files with 372 additions and 86 deletions.
178 changes: 161 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ fn main() {

// page rank with time
now = Instant::now();
let _page_rank = unweighted_page_rank(&g, 1000, None, None, true);
let _page_rank = unweighted_page_rank(&g, Some(1000), None, None, true, None);
println!("Page rank: {} seconds", now.elapsed().as_secs_f64());

// connected community_detection with time
Expand Down
4 changes: 2 additions & 2 deletions examples/rust/src/bin/bench/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ fn main() {
println!("Loading data");
let graph = if encoded_data_dir.exists() {
let now = Instant::now();
let g = Graph::load_from_file(encoded_data_dir.as_path())
let g = Graph::load_from_file(encoded_data_dir.as_path(), false)
.expect("Failed to load graph from encoded data files");

println!(
Expand Down Expand Up @@ -81,6 +81,6 @@ fn main() {
g
};
println!("Data loaded\nPageRanking");
unweighted_page_rank(&graph, 25, Some(8), None, true);
unweighted_page_rank(&graph, Some(25), Some(8), None, true, None);
println!("Done PR");
}
2 changes: 1 addition & 1 deletion examples/rust/src/bin/btc/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fn main() {

let graph = if encoded_data_dir.exists() {
let now = Instant::now();
let g = Graph::load_from_file(encoded_data_dir.as_path())
let g = Graph::load_from_file(encoded_data_dir.as_path(), false)
.expect("Failed to load graph from encoded data files");

println!(
Expand Down
Loading

0 comments on commit eb54c49

Please sign in to comment.