BigUglySpider / EmuLibs

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).
https://biguglyspider.github.io/math
0 stars 0 forks source link

STL Iterators for EmuMath::Vector #39

Closed BigUglySpider closed 2 years ago

BigUglySpider commented 2 years ago

Addresses issue #38 (a lot sooner than expected, but I didn't have much time to focus on making a full feature for Matrix today).

Provides STL random_access_iterator support to EmuMath::Vector, allowing use of the following familiar functions:

This provides the same value_type interface, and does not expose underlying reference storage, allowing it to work the same way with both value and reference Vectors as the general interface with said Vectors already worked.

The naming convention of the STL-like functions betrays the usual Emu naming convention to allow EmuMath::Vector to be plugged directly into any algorithms that make use of this STL syntax.