# esso::Ix< N, T0 > Class Template Reference

Represents a small, fast vector. More...

`#include <ix.h>`

Inheritance diagram for esso::Ix< N, T0 >:

List of all members.

## Public Member Functions

construction
Ix ()
Ix (T i0)
Ix (const Ix &i0)
construction from sequence of elements
Ix (T0 i0, T0 i1)
Ix (T0 i0, T0 i1, T0 i2)
Ix (T0 i0, T0 i1, T0 i2, T0 i3)
Ix (T0 i0, T0 i1, T0 i2, T0 i3, T0 i4)
Ix (T0 i0, T0 i1, T0 i2, T0 i3, T0 i4, T0 i5)
const
T0 operator[] (DIMT n) const
bool operator== (const T &src) const
bool operator== (const Ix &src) const
bool operator!= (const T &src) const
bool operator!= (const Ix &src) const
template<DIMT LEN>
Ix< LEN, T0 > Sub (DIMT start=0) const
nonconst
T0 & operator[] (DIMT n)
Ixoperator= (T src)
template<class TT>
Ixoperator+= (const Ix< N, TT > &src)
Ixoperator+= (const T &src)
template<class TT>
Ixoperator-= (const Ix< N, TT > &src)
Ixoperator-= (const T &src)
Ixoperator*= (const T &src)
Ixoperator/= (const T &src)
template<int N1>
IxConcat (const Ix< N1, T0 > &p1, const Ix< N-N1, T0 > &p2)
template<int M>
Ix< N+M, T0 > operator| (const Ix< M, T0 > &p2) const

## Detailed Description

### template<int N, class T0> class esso::Ix< N, T0 >

Represents a small, fast vector.

Use this object for small vectors where the length of the vector is known at compile time. (It is possible to use it for larger datasets too, but it should be noted that all data is allocated on the stack, no dynamic memory is allocated by these objects).

## Constructor & Destructor Documentation

template<int N, class T0>
 esso::Ix< N, T0 >::Ix ( ) ` [inline]`

Default constructor. Just creates the vector without initializing the elements

template<int N, class T0>
 esso::Ix< N, T0 >::Ix ( T i0 ) ` [inline, explicit]`

Constructor which inializes all elements with scalar (copied into all elements).

template<int N, class T0>
 esso::Ix< N, T0 >::Ix ( const Ix< N, T0 > & i0 ) ` [inline]`

Copy constructor. Copies elementwise

template<int N, class T0>
 esso::Ix< N, T0 >::Ix ( T0 i0, T0 i1 ) ` [inline]`

Constructor from two integers (only compiles for Ix<2,T>)

template<int N, class T0>
 esso::Ix< N, T0 >::Ix ( T0 i0, T0 i1, T0 i2 ) ` [inline]`

Constructor from three integers (only compiles for Ix<3,T>)

template<int N, class T0>
 esso::Ix< N, T0 >::Ix ( T0 i0, T0 i1, T0 i2, T0 i3 ) ` [inline]`

Constructor from four integers (only compiles for Ix<4,T>)

template<int N, class T0>
 esso::Ix< N, T0 >::Ix ( T0 i0, T0 i1, T0 i2, T0 i3, T0 i4 ) ` [inline]`

Constructor from five integers (only compiles for Ix<5,T>)

template<int N, class T0>
 esso::Ix< N, T0 >::Ix ( T0 i0, T0 i1, T0 i2, T0 i3, T0 i4, T0 i5 ) ` [inline]`

Constructor from six integers (only compiles for Ix<6,T>)

## Member Function Documentation

template<int N, class T0>
 T0 esso::Ix< N, T0 >::operator[] ( DIMT n ) const` [inline]`

Elementwise access

Reimplemented in esso::Permutation< N >.

template<int N, class T0>
 bool esso::Ix< N, T0 >::operator== ( const T & src ) const` [inline]`

Returns:
true if this object is elementwise equal to src

template<int N, class T0>
 bool esso::Ix< N, T0 >::operator== ( const Ix< N, T0 > & src ) const` [inline]`

Returns:
true if this object is elementwise equal to src

template<int N, class T0>
 bool esso::Ix< N, T0 >::operator!= ( const T & src ) const` [inline]`

Returns:
true if this object is not elementwise equal to src

template<int N, class T0>
 bool esso::Ix< N, T0 >::operator!= ( const Ix< N, T0 > & src ) const` [inline]`

Returns:
true if this object is not elementwise equal to src

template<int N, class T0>
template<DIMT LEN>
 Ix esso::Ix< N, T0 >::Sub ( DIMT start = `0` ) const` [inline]`

Returns:
an `Ix` object whose elements are a sub-range of the elements of this `Ix` object

template<int N, class T0>
 T0& esso::Ix< N, T0 >::operator[] ( DIMT n ) ` [inline]`

Elementwise access

template<int N, class T0>
 Ix& esso::Ix< N, T0 >::operator= ( T src ) ` [inline]`

Assignment from scalar (value is copied into all elements)

template<int N, class T0>
template<class TT>
 Ix& esso::Ix< N, T0 >::operator+= ( const Ix< N, TT > & src ) ` [inline]`

template<int N, class T0>
 Ix& esso::Ix< N, T0 >::operator+= ( const T & src ) ` [inline]`

template<int N, class T0>
template<class TT>
 Ix& esso::Ix< N, T0 >::operator-= ( const Ix< N, TT > & src ) ` [inline]`

Subtraction

template<int N, class T0>
 Ix& esso::Ix< N, T0 >::operator-= ( const T & src ) ` [inline]`

Subtraction with scalar

template<int N, class T0>
 Ix& esso::Ix< N, T0 >::operator*= ( const T & src ) ` [inline]`

Multiplication with scalar

template<int N, class T0>
 Ix& esso::Ix< N, T0 >::operator/= ( const T & src ) ` [inline]`

Quotient with scalar

template<int N, class T0>
template<int N1>
 Ix& esso::Ix< N, T0 >::Concat ( const Ix< N1, T0 > & p1, const Ix< N-N1, T0 > & p2 ) ` [inline]`

Concatenate two vectors i.e. if v1 has dim n1 and v2 has dim n2 then Concat(v1,v2)[n] == v1[n] if n<n1 and v2[n-n1] otherwise

Returns:
reference to this object

Referenced by esso::Ix< N, short >::operator|().

template<int N, class T0>
template<int M>
 Ix esso::Ix< N, T0 >::operator| ( const Ix< M, T0 > & p2 ) const` [inline]`

Returns:
Concatenation of this two Ix objects