The VectorMath class contains static functions for manipulating numerical data in vectors. This includes operations for summation, scaling, dot products, cross products, prefix sums, etc..
More...
#include <VectorMath.hpp>
|
| template<typename T > |
| static T | sum (T *const data, size_t const size) noexcept |
| | Sum the elements of an array. More...
|
| |
| template<typename T > |
| static void | increment (T *const data, size_t const size, T const start=0, T const inc=1) noexcept |
| | Set all entries int the array to the given sequence. More...
|
| |
| template<typename T > |
| static void | prefixSumExclusive (T *const data, size_t const size) noexcept |
| | Perform a prefix sum on an array. More...
|
| |
| template<typename T > |
| static void | prefixSumExclusive (T const begin, T const end) noexcept |
| | Perform a prefix sum on an array. More...
|
| |
The VectorMath class contains static functions for manipulating numerical data in vectors. This includes operations for summation, scaling, dot products, cross products, prefix sums, etc..
◆ increment()
template<typename T >
| static void sl::VectorMath::increment |
( |
T *const |
data, |
|
|
size_t const |
size, |
|
|
T const |
start = 0, |
|
|
T const |
inc = 1 |
|
) |
| |
|
inlinestaticnoexcept |
Set all entries int the array to the given sequence.
- Template Parameters
-
| The | type of elements in the array. |
- Parameters
-
| data | The starting location of memory. |
| size | The number of lements. |
| start | The starting value of the sequence. |
| inc | The increment of the sequence. |
◆ prefixSumExclusive() [1/2]
template<typename T >
| static void sl::VectorMath::prefixSumExclusive |
( |
T *const |
data, |
|
|
size_t const |
size |
|
) |
| |
|
inlinestaticnoexcept |
Perform a prefix sum on an array.
- Template Parameters
-
| T | The type of elements in the array. |
- Parameters
-
| data | The starting location of memory. |
| size | The number of elements in the array. |
◆ prefixSumExclusive() [2/2]
template<typename T >
| static void sl::VectorMath::prefixSumExclusive |
( |
T const |
begin, |
|
|
T const |
end |
|
) |
| |
|
inlinestaticnoexcept |
Perform a prefix sum on an array.
- Template Parameters
-
| T | The type of elements in the array. |
- Parameters
-
| data | The starting location of memory. |
| size | The number of elements in the array. |
◆ sum()
template<typename T >
| static T sl::VectorMath::sum |
( |
T *const |
data, |
|
|
size_t const |
size |
|
) |
| |
|
inlinestaticnoexcept |
Sum the elements of an array.
- Template Parameters
-
- Parameters
-
| data | The starting memory location. |
| size | The number of elements. |
- Returns
- The sum.
The documentation for this class was generated from the following file: