-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from MunchLab/Add-Embedded-Graph
Added Embedded graph
- Loading branch information
Showing
130 changed files
with
3,745 additions
and
2,873 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.