Skip to content

Commit

Permalink
Merge pull request #65 from MunchLab/Add-Embedded-Graph
Browse files Browse the repository at this point in the history
Added Embedded graph
  • Loading branch information
lizliz authored Aug 6, 2024
2 parents c97e8e8 + a0ee94d commit d372b56
Show file tree
Hide file tree
Showing 130 changed files with 3,745 additions and 2,873 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ Find the documentation for ceREEBerus [here](https://munchlab.github.io/ceREEBer

## Collaborators

The code is a compilation of work done by [Elizabeth Munch](http://www.elizabethmunch.com) with her research group and collaborators. The lead developer for this package is [Danielle Barnes](https://github.com/barnesd8), and other people who have contributed to ceREEBerus include:
The code is a compilation of work done by [Elizabeth Munch](http://www.elizabethmunch.com) with her research group and collaborators. People who have contributed to ceREEBerus include:

- [Danielle Barnes](https://github.com/barnesd8)
- [Elena Wang](https://https://elenaxwang.com)
- [Elena Wang](https://elenaxwang.com)
- [Ishika Ghsoh](https://www.ishikaghosh.com/)

## Contact Information
Expand Down
3 changes: 2 additions & 1 deletion cereeberus/cereeberus/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
__all__ = ['data', 'reeb', 'compute']

from .reeb.reebgraph import ReebGraph
from .reeb.merge import MergeTree
from .reeb.merge import MergeTree
from .reeb.embeddedgraph import EmbeddedGraph
33 changes: 33 additions & 0 deletions cereeberus/cereeberus/data/ex_embedgraphs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

# %--- Example usage of the EmbeddedGraph class ---%

from cereeberus import EmbeddedGraph

def exampleEmbeddedGraph(mean_centered=True):
"""
Function to create an example ``EmbeddedGraph`` object. Helpful for testing.
Returns:
EmbeddedGraph: An example ``EmbeddedGraph`` object.
"""
graph = EmbeddedGraph()

graph.add_node('A', 1, 2)
graph.add_node('B', 3, 4)
graph.add_node('C', 5, 7)
graph.add_node('D', 3, 6)
graph.add_node('E', 4, 3)
graph.add_node('F', 4, 5)

graph.add_edge('A', 'B')
graph.add_edge('B', 'C')
graph.add_edge('B', 'D')
graph.add_edge('B', 'E')
graph.add_edge('C', 'D')
graph.add_edge('E', 'F')

if mean_centered:
graph.set_mean_centered_coordinates()

return graph
Loading

0 comments on commit d372b56

Please sign in to comment.