-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Bug fixes and improvements related to the coordinate system (#225)
* ✨ Added a specialisation for iteration over SiQAD coordinates * ✅ Added tests for coordinate iteration * 📝 Updated foreach coordinate documentation to clarify last coordinate exclusivity * 🎨 Updated print_charge_layout to use the new foreach_coordinate specialisation * 🎨 ClangFormat suggestions * 🎨 Implemented suggestions from PR conversations * 💚 Added a no-lint block to please Clang-Tidy (std namespace overloading) * ✨ Made siqad::coord_t compatible with fmt::format * ✅ Increased test coverage * 🎨 Reformatted file * 🎨 Rewrote test to make use of TEMPLATE_TEST_CASE * 📝 Split coordinate enumeration documentation into offset and cubic vs. SiQAD * 📝 Removed "Offset coordinates are required" from cartesian layouts docs * 🐛 Cartesian layouts based on SiQAD coordinates now always have full dimer rows * ✨ Added an abs function defined on arbitrary number types to math_utils * 🐛 Addition and subtraction on SiQAD coordinates is now defined properly * 🐛 Area computation is now dependent on the coordinate type * ✨ Added a clamping function to each coordinate type * 🐛 Coordinate iteration is now defined on out-of-bounds iterators * 🥅 Added static_asserts checking the absence of SiQAD coordinates * ✨ Made cropped charge layout printing opt-in optional * 🔥 Removed unnecessary import * 🐛 Converting a layout from fiction to SiQAD coordinates or vice versa now resizes the layout appropriately * 🎨 Applied ClangFormat to all files * ⚡ Made initialize_dimension const * 🎨 Made use of bounding_box_2d * 🔥 Removed debug output * ✅ Increased test coverage * 🐛 Avoided multiplication before casting to a higher type * 📝 Reinterpreted coordinate clamping to coordinate wrapping * ✅ Added test and newline at end of file * ✅ Addition/subtraction of cube coordinates now actually uses cube coordinates * ✅ Avoided equality test on floating point values * 🎨 Avoided double variable declaration * 🔥 Removed floating point support from new abs function (use std::fabs for this) * 🎨 Added `noexcept` to `math_utils` functions
- Loading branch information
Showing
12 changed files
with
591 additions
and
199 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
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.