-
Notifications
You must be signed in to change notification settings - Fork 1
Add support for matrices #58
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
Conversation
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
Signed-off-by: Andy Zhang <[email protected]>
- Removed imgui directory for switching to Python tkinter. - Add matrix support `mat2d.hpp` - [BREAKING] `Number` objects now round to 10 decimal places by default. - [BREAKING] Steppable public headers are now in `include/steppable`.
- Automatically rounds off numbers in matrix after `ref` operation. - `roundOff` now supports simplifying the zero polarity to always ensure positive zero. - Fix build issues.
- [BREAKING] `Number` does not support implicit conversions from now on.
- Added back `const` qualifier to Number::operator/ and Number::operator*.
- Changed localization behavior: when no translations are found, defaults to en-US - Allow value inspections to be specified - Change rounding behavior to pad numbers automatically
- [#56] Fix `isPowerOfTen` detection flaw - [WIP] Trying to address matrix rref issues.
- [#57] Fix `isPowerOfTen` handling flaw
- Address segmentation fault in util.cpp by adding empty checks - Fix incorrect rounding of negative decimals (like -2.99) to -1
- Unary operators are now supported for `Number` and `Fraction`. One can now use `+number` and `-number` to get the positive / negative instances of the number. - Python bindings now include the unary operators. - `*.pyi` files have been updated to include signatures of unary operators. - `Matrix` objects now support addition.
- Add `operator-`, `operator*`, `operator==` to `Matrix` - Add mat2d test targets - Add concepts to diffrentiate different types of objects (std::string, .present() methods and numeric) - Add support for assertIsEqual and assertIsNotEqual for other types of data
- Added bindings for `Matrix` to Python - Added support for implicit conversion between Python numerals and Steppable `Number` - Fix build errors by renaming `assert` to `_assertCondition` method in testing.cpp
- Add the `det` function. - [BREAKING] `ref` now refer to the `rref` function. The `ref` function now does row echelon form without reduction. - Add the bindings for `det` and `ref` to Python.
- Matrices can now be joined using the `<<` and `>>` operators - [BREAKING] Matrix indices are now standardized to be (row, column)
- Add `rank` method to `Matrix` - Add corresponding bindings - Add support for iterating through the matrix, in C++ and Python - Changed order of Matrix::zeros arguments - Add literal `_n` to specify a number
- Allow matrix powers - Allow matrix inverse by specifying -1 as power.
- Add parameters to Python - Add `diag` method to Python bindings.
- [BREAKING] Change stub file names to underscores to prevent accessing - Add documentation - Corrected typing annotations in stubs
- Not requiring too many GIthub Actions for pull requests
- Fixed return type of Matrix::diag.
This was
linked to
issues
Jun 26, 2025
Signed-off-by: Andy Zhang <[email protected]>
- Add documentation for C++ API functions. - Add matrix data sanity check to ensure uniform rows.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-Actions
Code - Pull requests that update Github Actions YAML files.
C-C++
Code - Pull requests that update C++ code.
C-CMake
Code - Pull requests that update CMake files.
C-Python
Code - Pull requests that update Python code
T-Bug
Type - Bug and unexpected behavior.
T-Feature
Type - New feature or request
T-Improvement
Type - Improvements to components.
T-OS Support
Type - Request support on another OS.
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.
This PR fixes issues #56 and #57.
Matrix::zeros
)Matrix::ones
)Matrix::diag
)Changelog
Fix accuracy issues for
exp
.Fix build errors
Add
#include
for<cstdint>
Upgrade Windows version
Signed-off-by: Andy Zhang [email protected]#
Using Python to show GUI
Trying to fix build issue on Windows
Fixed Windows build issues
Added support for 2D matrices
mat2d.hpp
Number
objects now round to 10 decimal places by default.include/steppable
.Small fixes to improve accuracy of
ref
result.ref
operation.roundOff
now supports simplifying the zero polarity to always ensure positive zero.Fix rounding issues
Allow building on ARM
Improve precision of
Number
operations.Number
does not support implicit conversions from now on.Fixed build issues with Nanobind.
const
qualifier to Number::operator/ and Number::operator*.Cleaned up configuration files
Enable special build hacks to be specified.
Fixed bugs in multiply
isPowerOfTen()
#56] FixisPowerOfTen
detection flawFixed bugs in multiply
multiply
when one of the inputs is a power of 10 #57] FixisPowerOfTen
handling flawFixed rounding errors
Reformat
Add matrix symbols and pretty-printing using better symbols
Added unary operator support to
Number
andFraction
Number
andFraction
. One can now use+number
and-number
to get thepositive / negative instances of the number.
*.pyi
files have been updated to include signatures of unary operators.Matrix
objects now support addition.Add operators for matrices
operator-
,operator*
,operator==
toMatrix
Moved out bindings to separate modules
Matrix
to PythonNumber
assert
to_assertCondition
method in testing.cppAdd determinant for matrices
det
function.ref
now refer to therref
function. Theref
function now does row echelon form without reduction.det
andref
to Python.Allow matrix joining laterally.
<<
and>>
operatorsAdd
rank
method for matrix.rank
method toMatrix
_n
to specify a numberAllow matrix powers
Fix build errors
diag
method to Python bindings.Add documentation to Python binding stubs
Add copyright headers
Fixed build errors