-
Notifications
You must be signed in to change notification settings - Fork 11
Issue #33 - Move existing planarity module and associated files into classic subpackage, and add full subpackage with extended API for EAPS graphLib
#35
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
2339605
Moved classic graphLib API into subpackage of planarity named classic.
wbkboyer 2457eff
Added initial version of the full graphLib API
wbkboyer d6040f6
Addressing TODOs, FIXMEs, and updating or removing NOTEs, plus beefin…
wbkboyer fd6e256
Addressing PR comments
wbkboyer 58d6f17
Changed location of gp_IsVertex() to reflect order present in graphSt…
wbkboyer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Empty file.
This file contains hidden or 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,7 +1,29 @@ | ||
| from .planarity import PGraph | ||
| from .planarity_functions import * | ||
| from .planarity_networkx import * | ||
| from .classic.planarity import PGraph | ||
| from .classic.planarity_functions import * | ||
| from .classic.planarity_networkx import * | ||
|
|
||
| from .full.g6IterationUtils import G6ReadIterator, G6WriteIterator | ||
| from .full.graph import ( | ||
| Graph, | ||
| OK, | ||
| NONEMBEDDABLE, | ||
| NOTOK, | ||
| NIL, | ||
| EMBEDFLAGS_PLANAR, | ||
| EMBEDFLAGS_DRAWPLANAR, | ||
| EMBEDFLAGS_OUTERPLANAR, | ||
| EMBEDFLAGS_SEARCHFORK23, | ||
| EMBEDFLAGS_SEARCHFORK33, | ||
| EMBEDFLAGS_SEARCHFORK4, | ||
| ) | ||
| from .full.planarity_app_utils import ( | ||
| PLANARITY_ALGORITHM_SPECIFIERS, | ||
| ENSURE_ARC_CAPACITY_SPECIFIERS, | ||
| attach_algorithm, | ||
| get_embed_flags, | ||
| max_num_edges_for_order, | ||
| ) | ||
|
|
||
| # NOTE: In the future, we could automatically generate the version number by | ||
| # configuring setuptools-scm, but presently this seems simpler. | ||
| __version__ = "0.7.8" | ||
| __version__ = "0.7.10" |
Empty file.
Empty file.
This file contains hidden or 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
1,214 changes: 607 additions & 607 deletions
1,214
planarity/planarity.c → planarity/classic/planarity.c
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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
8 changes: 7 additions & 1 deletion
8
planarity/planarity_functions.py → planarity/classic/planarity_functions.py
This file contains hidden or 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
8 changes: 6 additions & 2 deletions
8
planarity/planarity_networkx.py → planarity/classic/planarity_networkx.py
This file contains hidden or 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
Empty file.
Empty file.
This file contains hidden or 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,7 @@ | ||
| """C-level interface for the Edge Addition Planarity Suite Graph Library | ||
|
|
||
| Specifically exposes contents from appconst.h. | ||
| """ | ||
|
|
||
| cdef extern from "../c/graphLib/lowLevelUtils/appconst.h": | ||
| cdef int OK, NOTOK, NULL, NIL, NIL_CHAR |
This file contains hidden or 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,35 @@ | ||
| """C-level interface for the Edge Addition Planarity Suite Graph Library | ||
|
|
||
| Specifically provides definitions for functions and macros that are required | ||
| to interact with .g6 graph files. | ||
| """ | ||
|
|
||
| from planarity.full.cgraphLib cimport graphP | ||
|
|
||
|
|
||
| cdef extern from "../c/graphLib/io/g6-read-iterator.h": | ||
| ctypedef struct G6ReadIterator: | ||
| pass | ||
| ctypedef G6ReadIterator * G6ReadIteratorP | ||
|
|
||
| bint contentsExhausted(G6ReadIteratorP) | ||
|
|
||
| int allocateG6ReadIterator(G6ReadIteratorP *, graphP) | ||
| int beginG6ReadIterationFromG6FilePath(G6ReadIteratorP, char *) | ||
|
|
||
| int readGraphUsingG6ReadIterator(G6ReadIteratorP) | ||
| int endG6ReadIteration(G6ReadIteratorP) | ||
| int freeG6ReadIterator(G6ReadIteratorP *) | ||
|
|
||
|
|
||
| cdef extern from "../c/graphLib/io/g6-write-iterator.h": | ||
| ctypedef struct G6WriteIterator: | ||
| pass | ||
| ctypedef G6WriteIterator * G6WriteIteratorP | ||
|
|
||
| int allocateG6WriteIterator(G6WriteIteratorP *, graphP) | ||
| int beginG6WriteIterationToG6FilePath(G6WriteIteratorP, char *) | ||
|
|
||
| int writeGraphUsingG6WriteIterator(G6WriteIteratorP) | ||
| int endG6WriteIteration(G6WriteIteratorP) | ||
| int freeG6WriteIterator(G6WriteIteratorP *) |
This file contains hidden or 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,78 @@ | ||
| """C-level interface for the Edge Addition Planarity Suite Graph Library | ||
|
|
||
| Specifically provides definitions for functions and macros that are required | ||
| to interact with graphP structs. | ||
| """ | ||
|
|
||
| cdef extern from "../c/graphLib/graphStructures.h": | ||
| cdef int NONEMBEDDABLE | ||
|
|
||
| ctypedef struct baseGraphStructure: | ||
| pass | ||
| ctypedef baseGraphStructure * graphP | ||
|
|
||
| int gp_IsArc(int e) | ||
| int gp_GetFirstEdge(graphP theGraph) | ||
| int gp_EdgeInUse(graphP theGraph, int e) | ||
| int gp_EdgeIndexBound(graphP theGraph) | ||
| int gp_EdgeInUseIndexBound(graphP theGraph) | ||
| int gp_GetFirstArc(graphP theGraph, int v) | ||
| int gp_GetNextArc(graphP theGraph, int e) | ||
|
|
||
| int gp_GetNeighbor(graphP theGraph, int e) | ||
|
|
||
| int gp_IsVertex(int v) | ||
| int gp_GetFirstVertex(graphP theGraph) | ||
| int gp_GetLastVertex(graphP theGraph) | ||
| int gp_VertexInRange(graphP theGraph, int v) | ||
|
|
||
| int gp_getN(graphP theGraph) | ||
|
|
||
|
|
||
| cdef extern from "../c/graphLib/graph.h": | ||
| int EMBEDFLAGS_PLANAR, EMBEDFLAGS_DRAWPLANAR, EMBEDFLAGS_OUTERPLANAR | ||
| int EMBEDFLAGS_SEARCHFORK23, EMBEDFLAGS_SEARCHFORK33, EMBEDFLAGS_SEARCHFORK4 | ||
|
|
||
| cdef int WRITE_ADJLIST, WRITE_ADJMATRIX, WRITE_G6 | ||
|
|
||
| graphP gp_New() | ||
| int gp_InitGraph(graphP theGraph, int N) | ||
| void gp_ReinitializeGraph(graphP theGraph) | ||
| int gp_CopyGraph(graphP dstGraph, graphP srcGraph) | ||
| graphP gp_DupGraph(graphP theGraph); | ||
|
|
||
| void gp_Free(graphP *pGraph) | ||
|
|
||
| int gp_Read(graphP theGraph, char *FileName) | ||
| int gp_ReadFromString(graphP theGraph, char *inputStr) | ||
|
|
||
| int gp_Write(graphP theGraph, char *FileName, int Mode) | ||
| int gp_WriteToString(graphP theGraph, char **pOutputStr, int Mode) | ||
|
|
||
| int gp_GetNeighborEdgeRecord(graphP theGraph, int u, int v) | ||
| int gp_GetVertexDegree(graphP theGraph, int v) | ||
|
|
||
| int gp_GetArcCapacity(graphP theGraph) | ||
| int gp_EnsureArcCapacity(graphP theGraph, int requiredArcCapacity) | ||
|
|
||
| int gp_AddEdge(graphP theGraph, int u, int ulink, int v, int vlink) | ||
| int gp_DeleteEdge(graphP theGraph, int e, int nextLink) | ||
|
|
||
| int gp_Embed(graphP theGraph, int embedFlags) | ||
| int gp_TestEmbedResultIntegrity(graphP theGraph, graphP origGraph, int embedResult) | ||
|
|
||
|
|
||
| cdef extern from "../c/graphLib/planarityRelated/graphDrawPlanar.h": | ||
| int gp_AttachDrawPlanar(graphP theGraph) | ||
|
|
||
|
|
||
| cdef extern from "../c/graphLib/homeomorphSearch/graphK23Search.h": | ||
| int gp_AttachK23Search(graphP theGraph) | ||
|
|
||
|
|
||
| cdef extern from "../c/graphLib/homeomorphSearch/graphK33Search.h": | ||
| int gp_AttachK33Search(graphP theGraph) | ||
|
|
||
|
|
||
| cdef extern from "../c/graphLib/homeomorphSearch/graphK4Search.h": | ||
| int gp_AttachK4Search(graphP theGraph) | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.