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 mono graph #448

Merged
merged 9 commits into from
Nov 20, 2023
Merged

Implement mono graph #448

merged 9 commits into from
Nov 20, 2023

Conversation

ielis
Copy link
Member

@ielis ielis commented Nov 1, 2023

The PR adds org.monarchinitiative.phenol.graph.csr.mono.CsrMonoOntologyGraph, an implementation of an OntologyGraph that stores just one edge type in a CSR-like structure. CsrMonoOntologyGraph becomes the default implementation used in Ontology and MinimalOntology that are loaded by phenol-io.

It fixes #444 since the graph only stores one edge type, which is what we need for most of our current work anyway.

Next, the PR sets up benchmarks using Java Mircrobenchmark Harness. The benchmark shows a significant performance improvement for getting parents and children of a term.

@julesjacobsen do you think you can skim CsrMonoOntologyGraph and the benchmark setup if they look reasonable? The biggest performance gain was actually achieved by using a Map to get index of a node instead of the binary search..
The performances of the ancestor/descendant traversals are not too impressive though. I am not sure if/how these can be improved, at least without a lot of work.

My overall aim is to wrap as many loose ends on Phenol as possible and make this, hopefully, also useful to you. So, if I will appreciate any comments if you have some time for this..

Thanks a lot!

@ielis ielis linked an issue Nov 1, 2023 that may be closed by this pull request
@ielis ielis marked this pull request as ready for review November 3, 2023 22:42
@ielis ielis linked an issue Nov 4, 2023 that may be closed by this pull request
@ielis ielis mentioned this pull request Nov 12, 2023
@ielis ielis changed the title Mono graph Implement mono graph Nov 20, 2023
@ielis ielis merged commit b424eac into develop Nov 20, 2023
3 checks passed
@ielis ielis deleted the mono-graph branch November 20, 2023 21:13
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.

JGraphT csr limitation
1 participant