Template Class arrayNX_t

Inheritance Relationships

Base Type

  • public std::array< type, N >

Derived Types

Class Documentation

template<typename type, size_t N>
class arrayNX_t : public std::array<type, N>

Generic fixed-size array wrapper for type type and size N.

Subclassed by slam_mer::array2D_t, slam_mer::array3D_t, slam_mer::array4D_t, slam_mer::array6D_t

Public Types

using vector = vector_t<arrayNX_t<type, N>>
using pair = std::pair<arrayNX_t<type, N>, arrayNX_t<type, N>>
using set = set_t<arrayNX_t<type, N>>

Public Functions

arrayNX_t() = default

Default constructor.

inline arrayNX_t(const std::array<type, N> &array_)

Construct a new arrayNX t object from std::array

Parameters:

array_ – Source fixed-size array copied into this wrapper.

inline arrayNX_t operator+(const arrayNX_t &other_) const

Addition operator

Parameters:

other_ – Array added component-wise to this array.

Returns:

Component-wise sum of the two arrays.

inline arrayNX_t operator-(const arrayNX_t &other_) const

Subtraction operator

Parameters:

other_ – Array subtracted component-wise from this array.

Returns:

Component-wise difference of the two arrays.

inline arrayNX_t operator*(const type &scalar_) const

Multiplication by scalar operator

Parameters:

scalar_ – Scalar multiplier applied to each component.

Returns:

Array with each component multiplied by scalar_.

inline arrayNX_t operator/(const type &scalar_) const

Division by scalar operator

Parameters:

scalar_ – Scalar divisor applied to each component.

Returns:

Array with each component divided by scalar_.

template<class ...Args>
inline explicit arrayNX_t(Args... args)

Constructs from exactly N values convertible to type.

Allow {v0, v1, …} to construct arrayNX_t

Parameters:

args – Values copied in order into the fixed-size array.