Library

maths 3.3

Version3.3
Stars★ 12
Released2026-11-24

C++ modules for scalar, vector and complex math. And maths.

Release notes

With this release, *sebsjames/maths* now depends *only* on the C++ standard library! This makes it much cleaner to use this repository as a library of modules - there is no additional linking or submoduling required.

The JSON and HDF related code has been moved into companion repositories: *sebsjames/maths_hdf* and *sebsjames/maths_config*. When I need to read configuration information from a JSON file, I'll use *maths_config*, which provides `sm::config`, which has the dependency on *nlohmann::json*. When I want to save data structures into Hierarchical Data Format, I can similarly use *maths_hdf*, which brings a linking dependency on libhdf.

The release adds a number of enhancements to `sm::hexgrid` including the ability to gracefully deal with data that contains infinities. `sm::scale` now ignores infinities when calculating transformations.  You can also 'down-size' your hexgrids with `algo::hexgrid::reduced_hexgrid`.

The release also adds a bugfix in `sm::winder` and fast multiply/accumulate methods in `vec` and `vvec`.

Finally, the library now has a more extensive dynamically resizable matrix library in `sm::vmat`. This doesn't incorporate all of the code in `sm::mat`, but it has enough to allow us to compute the Eigenvectors of a matrix in aid of cublic spline fitting and the matrix operations in Bezier curve fitting. 

Note that `sm::mat` has one breaking change in this release, which is that a default-constructed `mat` is now *always* null-initialized (before, a square `mat` would initialize as the identity matrix).

## What's Changed
* Adds function to conveniently obtain the real part of the inverse. by @sebsjames in https://github.com/sebsjames/maths/pull/186
* Geometry needs mat and adds missing geometry polyhedra. by @sebsjames in https://github.com/sebsjames/maths/pull/187
* Removes sm::config (to its own repo sebsjames/maths_config) by @sebsjames in https://github.com/sebsjames/maths/pull/188
* Fixes a couple of typos/omissions by @sebsjames in https://github.com/sebsjames/maths/pull/189
* Better handling of hexgrid transforms by @sebsjames in https://github.com/sebsjames/maths/pull/190
* Removes a now-redundant stanza from CMakeLists.txt by @sebsjames in https://github.com/sebsjames/maths/pull/191
* No need to compile this target in debug mode;  it was just an example by @sebsjames in https://github.com/sebsjames/maths/pull/192
* Adds a has_neighbour overload for hexgrid by @sebsjames in https://github.com/sebsjames/maths/pull/193
* Reduced hexgrids by @sebsjames in https://github.com/sebsjames/maths/pull/194
* Adds comparison operators for sm::flags by @sebsjames in https://github.com/sebsjames/maths/pull/195
* Avoid a situation where you may divide by zero by using rescale() by @sebsjames in https://github.com/sebsjames/maths/pull/196
* Adds SM_PCA_MODULES by @sebsjames in https://github.com/sebsjames/maths/pull/197
* Fix hashing of vecs  by @sebsjames in https://github.com/sebsjames/maths/pull/198
* (v)vec.all_elements_equal() by @sebsjames in https://github.com/sebsjames/maths/pull/199
* all/any_of (const I&) by @sebsjames in https://github.com/sebsjames/maths/pull/200
* Dev/hexgrid ellipse indices winder filling by @sebsjames in https://github.com/sebsjames/maths/pull/202
* Adds a hexgrid algo to draw an ellipse shape on a hexgrid by @sebsjames in https://github.com/sebsjames/maths/pull/201
* These methods are not const (addresses #203) by @sebsjames in https://github.com/sebsjames/maths/pull/204
* Adds a multiply-and-accumulate method by @sebsjames in https://github.com/sebsjames/maths/pull/206
* interval1 doesn't need to be on C++23 by @sebsjames in https://github.com/sebsjames/maths/pull/208
* Adds -Werror=dev to CI by @sebsjames in https://github.com/sebsjames/maths/pull/209
* One way to deal with infinities in the data by @sebsjames in https://github.com/sebsjames/maths/pull/205
* Extend macc to vector args by @sebsjames in https://github.com/sebsjames/maths/pul…

Share this resource


Discovered 2026-11-24 Source GitHub Archive 2026-11 →