-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The four simplest layouts were added: bipartite, circular, shell, and spiral. The layout functions return the new type Pos2DMapping Related to #280 * bipartite + circular * add shell and spiral layouts * tests * release note * release note newline * add api * resolve conflicts * clippy * flake8 * fix bipartite empty issue * fix api * fix bipartite doc issue * Update retworkx/__init__.py Co-authored-by: georgios-ts <45130028+georgios-ts@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: georgios-ts <45130028+georgios-ts@users.noreply.github.com> * handle index holes + minor fixes * rename layouts to layout * add hole tests * lints * resolve conflicts * black reformatted * add f64 type declaration * fix bipartite invalid dy * fix shell index holes Co-authored-by: georgios-ts <45130028+georgios-ts@users.noreply.github.com> * lint * add hole test cases that specify shells * lim range check * Update layout tests to use custom assertion method This commit adds a new custom assertion method for comparing layouts with a tolerance (fixed at 1e-6) ensuring that no layout differs from the expected in any coordinate by more than this. If there is a failure it will print a detailed message about which node differs from the expected. With this change locally 2 bipartite layout tests failed so this commit updates the expected values so it passes (the layouts still look like valid bipartite layouts just the center point was different). * Fix lint Co-authored-by: georgios-ts <45130028+georgios-ts@users.noreply.github.com> Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
- Loading branch information
1 parent
aad90f7
commit ab1f984
Showing
7 changed files
with
1,504 additions
and
5 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
features: | ||
- | | ||
Four simple layouts were added: :func:`~retworkx.bipartite_layout`, | ||
:func:`~retworkx.circular_layout`, :func:`~retworkx.shell_layout`, | ||
and :func:`~retworkx.spiral_layout`. |
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
Oops, something went wrong.