Lums
Public Member Functions | List of all members
lm::Vector< N, T > Class Template Reference

A class representing a Vector. More...

#include <Vector.hpp>

Inheritance diagram for lm::Vector< N, T >:

Public Member Functions

 Vector (T value=T())
 
template<typename A , typename B , typename... Types>
 Vector (A a, B b, Types...values)
 
T & operator[] (std::size_t i)
 
constexpr const T & operator[] (std::size_t i) const
 

Detailed Description

template<std::size_t N, typename T>
class lm::Vector< N, T >

A class representing a Vector.

Template Parameters
NThe vector dimension
TThe vector type

Constructor & Destructor Documentation

template<std::size_t N, typename T>
lm::Vector< N, T >::Vector ( value = T())
inline

Construct a vector from a value The value is assigned to each member.

Parameters
valueThe value to be assigned.
template<std::size_t N, typename T>
template<typename A , typename B , typename... Types>
lm::Vector< N, T >::Vector ( a,
b,
Types...  values 
)
inline

Construct a vector from a batch of values

Parameters
aThe first value
bThe second value
valuesThe remaining values

Member Function Documentation

template<std::size_t N, typename T>
T& lm::Vector< N, T >::operator[] ( std::size_t  i)
inline

Get a value from the vector

Parameters
iThe index
Returns
A value
template<std::size_t N, typename T>
constexpr const T& lm::Vector< N, T >::operator[] ( std::size_t  i) const
inline

Get a value from the vector

Parameters
iThe index
Returns
A value

The documentation for this class was generated from the following file: