Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement topology utils methods #8

Closed

Conversation

guissalustiano
Copy link
Contributor

@guissalustiano guissalustiano commented Jan 17, 2024

As discussed here. This PR creates methods to analyze the graph.
This is the naive implementation based on the examples folder.
I didn't like this implementation because for this method you always need the run the paths_graph before, maybe we can create another type ValleyFreeTopology that has the guarantee that is a DAG, only been generated by the paths_graph and already having the source is inside of them, what do you think?
I also found a bug in the paths_graph implementation in the test for the other methods that I will solve here.

@guissalustiano guissalustiano force-pushed the feat/add_topology_methods branch from 12ef736 to 4cf0576 Compare January 17, 2024 11:50
@guissalustiano guissalustiano marked this pull request as ready for review January 17, 2024 22:12
Comment on lines +626 to +636
#[test]
#[ignore]
fn test_path_graph_never_generate_ciclic() {
let topo = Topology::from_caida(get_caida_data()).unwrap();

topo.all_asns().into_par_iter().for_each(|asn| {
let topo = topo.paths_graph(asn);
assert!(!is_cyclic_directed(&topo.graph));
});
}

Copy link
Contributor Author

@guissalustiano guissalustiano Jan 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a very heavy test, I ran this locally for 1hour and didn't find any cycle.
I'm not sure if it is working to keep this here, but maybe could be useful in the future

@guissalustiano
Copy link
Contributor Author

This PR are fixing and add a feature, I break this in two different PR to become easier to review
#9 #10

@digizeph
Copy link
Member

I see that you are still pushing new commits to the PRs. Let me know if they're ready for review. Thanks!

@guissalustiano
Copy link
Contributor Author

Hey @digizeph
It's ready now! Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants