cotila  1.2.1
A compile time linear algebra system
Public Types | Static Public Attributes | Related Functions | List of all members
cotila::vector< T, N > Struct Template Reference

A container representing a vector. More...

#include <vector.h>

Public Types

using value_type = T
 
using size_type = std::size_t
 

Public Member Functions

Element access
constexpr T & operator[] (size_type i) noexcept
 access specified element More...
 
constexpr const T & operator[] (size_type i) const noexcept
 access specified element More...
 
Iterators
constexpr T * begin () noexcept
 returns an iterator to the beginning More...
 
constexpr T * end () noexcept
 returns an iterator to the end More...
 
constexpr const T * cbegin () const noexcept
 returns an iterator to the beginning More...
 
constexpr const T * cend () const noexcept
 returns an iterator to the end More...
 

Static Public Attributes

static constexpr size_type size = N
 size of the vector
 

Related Functions

(Note that these are not member functions.)

template<typename... Args>
 decltype (auto) constexpr cotila::make_vector(Args... args)
 constructs a cotila::vector from arguments More...
 
cotila::vector deduction guides
template<typename T , typename... U>
 vector (T, U...) -> vector< std::enable_if_t<(std::is_same_v< T, U > &&...), T >, 1+sizeof...(U)>
 deduction guide for uniform initialization More...
 
template<typename T , std::size_t N>
 vector (const T(&)[N]) -> vector< T, N >
 deduction guide for aggregate initialization More...
 
template<typename T , std::size_t N>
 vector (const T(&)[N][2]) -> vector< std::complex< T >, N >
 deduction guide for complex-valued aggregate initialization More...
 

Detailed Description

template<typename T, std::size_t N>
struct cotila::vector< T, N >

Template Parameters
Tscalar type to contain
Nsize of the vector

cotila::vector is a container representing a vector.

It is an aggregate type similar to std::array, and can be initialized with aggregate initialization or with the cotila::make_vector function.


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