Skip to content

Program hangs with a large (>2200) edge set #42

Open
@GeneL

Description

@GeneL

Your library works great for me when I use a set of edges with under 2200 records. When I try it with a larger set of edges the application hangs.. Is there a way to configure the app for a larger data set? Is there a different commands or function calls to use a larger data set?
Thank you in advance.

Below is my source code:

let mut input_graph = InputGraph::new();
let json = read_json_file("disc.json".to_string());
let mut cnt = 1;
for l1 in json.unwrap().len() {
if cnt < 2200 {
println!(" s: {:?} t: {:?}", l1["source"].as_u64().unwrap(), l1["target"].as_u64().unwrap());
input_graph.add_edge(l1["source"].as_u64().unwrap() as NodeId, l1["target"].as_u64().unwrap() as NodeId, 12);
}
cnt += 1;
}
input_graph.freeze();
let fast_graph = fast_paths::prepare(&input_graph);
let shortest_path = fast_paths::calc_path(&fast_graph, 388, 99);
println!("{:?}", shortest_path.clone().unwrap());

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions