Selection of libraries designed to be used with Emu projects. This was originally a Math library only, but has since been changed to hold all Emu libraries to enable consistency in changes to dependencies (such as EmuCore modifications).
Matrix data is now stored in one flattened EmuMath Vector.
Almost identical interface to before, with some minor differences.
Main difference is in Vector-based accesses - no theoretical variants, only one function name per type of Vector to retrieve, renamed to match different semantics, and defaulting to value output (with reference output still possible, but required to be explicit, such as matrix.Column<float&>()).
MainDiagonal has been renamed to Diagonal as it can now receive separate offsets for Column and Row.
Starting from whatever offset, the Vector remains a diagonal within the Matrix.
The offset for Row copies that of Column unless an additional offset is provided, meaning the provision of just a single offset can still be done to remain on the main diagonal (i.e. you can still type Diagonal<..., Offset>() instead of requiring Diagonal<..., Offset, Offset>()).
Flattened index access is always contiguous
STL iterators for flattened access implemented due to its triviality - since underlying storage is now a flattened Vector, we just use the underlying storage iterator and its own begin, end, etc... functions.
Access operators allow provision of a std::pair<std::size_t, std::size_t> now in order to identify a Column/Row index to access. This is the case for both operator[] and operator(), and allows operator[] to be used for both contiguous and common-interface accesses.
Construction improvements have been applied due to the need to approach underlying storage construction in a different way.
Most construction is now deferred to the underlying Vector via its variadic constructor, which allows us to avoid a significant amount of safety checking code duplication, while remaining consistent, and assisting the compiler with RVO by avoiding early stored_type constructions as we did previously.
resolves #44
Matrix data is now stored in one flattened EmuMath Vector.
Almost identical interface to before, with some minor differences.
matrix.Column<float&>()
).MainDiagonal
has been renamed toDiagonal
as it can now receive separate offsets for Column and Row.Diagonal<..., Offset>()
instead of requiringDiagonal<..., Offset, Offset>()
).begin
,end
, etc... functions.std::pair<std::size_t, std::size_t>
now in order to identify a Column/Row index to access. This is the case for bothoperator[]
andoperator()
, and allowsoperator[]
to be used for both contiguous and common-interface accesses.stored_type
constructions as we did previously.