Deep RTS
Public Member Functions | List of all members
cppmat::matrix< X > Class Template Reference

#include <matrix.h>

Public Member Functions

 matrix ()
 
 matrix (const std::vector< size_t > &shape)
 
 matrix (const std::vector< size_t > &shape, X D)
 
template<typename Iterator >
 matrix (const std::vector< size_t > &shape, Iterator first, Iterator last)
 
void resize (const std::vector< size_t > &shape)
 
void reshape (const std::vector< size_t > &shape)
 
void chdim (size_t ndim)
 
size_t size () const
 
size_t ndim () const
 
size_t shape (size_t i) const
 
std::vector< size_t > shape () const
 
std::vector< size_t > strides (bool bytes=false) const
 
X & operator[] (size_t i)
 
const X & operator[] (size_t i) const
 
X & operator() (size_t a)
 
const X & operator() (size_t a) const
 
X & operator() (size_t a, size_t b)
 
const X & operator() (size_t a, size_t b) const
 
X & operator() (size_t a, size_t b, size_t c)
 
const X & operator() (size_t a, size_t b, size_t c) const
 
X & operator() (size_t a, size_t b, size_t c, size_t d)
 
const X & operator() (size_t a, size_t b, size_t c, size_t d) const
 
X & operator() (size_t a, size_t b, size_t c, size_t d, size_t e)
 
const X & operator() (size_t a, size_t b, size_t c, size_t d, size_t e) const
 
X & operator() (size_t a, size_t b, size_t c, size_t d, size_t e, size_t f)
 
const X & operator() (size_t a, size_t b, size_t c, size_t d, size_t e, size_t f) const
 
X * data ()
 
const X * data () const
 
auto begin ()
 
auto begin () const
 
auto end ()
 
auto end () const
 
void setConstant (X D)
 
void setZero ()
 
void setOnes ()
 
void zeros ()
 
void ones ()
 
matrix< X > & operator*= (const matrix< X > &B)
 
matrix< X > & operator/= (const matrix< X > &B)
 
matrix< X > & operator+= (const matrix< X > &B)
 
matrix< X > & operator-= (const matrix< X > &B)
 
matrix< X > & operator*= (const X &B)
 
matrix< X > & operator/= (const X &B)
 
matrix< X > & operator+= (const X &B)
 
matrix< X > & operator-= (const X &B)
 
min () const
 
max () const
 
sum () const
 
double mean () const
 
double average (const matrix< X > &weights) const
 
void printf (std::string fmt) const
 

Constructor & Destructor Documentation

◆ matrix() [1/4]

template<class X >
cppmat::matrix< X >::matrix ( )
inline

◆ matrix() [2/4]

template<class X >
cppmat::matrix< X >::matrix ( const std::vector< size_t > &  shape)

◆ matrix() [3/4]

template<class X >
cppmat::matrix< X >::matrix ( const std::vector< size_t > &  shape,
D 
)

◆ matrix() [4/4]

template<class X >
template<typename Iterator >
cppmat::matrix< X >::matrix ( const std::vector< size_t > &  shape,
Iterator  first,
Iterator  last 
)

Member Function Documentation

◆ average()

template<class X >
double cppmat::matrix< X >::average ( const matrix< X > &  weights) const

◆ begin() [1/2]

template<class X >
auto cppmat::matrix< X >::begin ( )

◆ begin() [2/2]

template<class X >
auto cppmat::matrix< X >::begin ( ) const

◆ chdim()

template<class X >
void cppmat::matrix< X >::chdim ( size_t  ndim)

◆ data() [1/2]

template<class X >
X * cppmat::matrix< X >::data ( )

◆ data() [2/2]

template<class X >
const X * cppmat::matrix< X >::data ( ) const

◆ end() [1/2]

template<class X >
auto cppmat::matrix< X >::end ( )

◆ end() [2/2]

template<class X >
auto cppmat::matrix< X >::end ( ) const

◆ max()

template<class X >
X cppmat::matrix< X >::max ( ) const

◆ mean()

template<class X >
double cppmat::matrix< X >::mean ( ) const

◆ min()

template<class X >
X cppmat::matrix< X >::min ( ) const

◆ ndim()

template<class X >
size_t cppmat::matrix< X >::ndim ( ) const

◆ ones()

template<class X >
void cppmat::matrix< X >::ones ( )

◆ operator()() [1/12]

template<class X >
X & cppmat::matrix< X >::operator() ( size_t  a)

◆ operator()() [2/12]

template<class X >
const X & cppmat::matrix< X >::operator() ( size_t  a) const

◆ operator()() [3/12]

template<class X >
X & cppmat::matrix< X >::operator() ( size_t  a,
size_t  b 
)

◆ operator()() [4/12]

template<class X >
const X & cppmat::matrix< X >::operator() ( size_t  a,
size_t  b 
) const

◆ operator()() [5/12]

template<class X >
X & cppmat::matrix< X >::operator() ( size_t  a,
size_t  b,
size_t  c 
)

◆ operator()() [6/12]

template<class X >
const X & cppmat::matrix< X >::operator() ( size_t  a,
size_t  b,
size_t  c 
) const

◆ operator()() [7/12]

template<class X >
X & cppmat::matrix< X >::operator() ( size_t  a,
size_t  b,
size_t  c,
size_t  d 
)

◆ operator()() [8/12]

template<class X >
const X & cppmat::matrix< X >::operator() ( size_t  a,
size_t  b,
size_t  c,
size_t  d 
) const

◆ operator()() [9/12]

template<class X >
X & cppmat::matrix< X >::operator() ( size_t  a,
size_t  b,
size_t  c,
size_t  d,
size_t  e 
)

◆ operator()() [10/12]

template<class X >
const X & cppmat::matrix< X >::operator() ( size_t  a,
size_t  b,
size_t  c,
size_t  d,
size_t  e 
) const

◆ operator()() [11/12]

template<class X >
X & cppmat::matrix< X >::operator() ( size_t  a,
size_t  b,
size_t  c,
size_t  d,
size_t  e,
size_t  f 
)

◆ operator()() [12/12]

template<class X >
const X & cppmat::matrix< X >::operator() ( size_t  a,
size_t  b,
size_t  c,
size_t  d,
size_t  e,
size_t  f 
) const

◆ operator*=() [1/2]

template<class X >
matrix< X > & cppmat::matrix< X >::operator*= ( const matrix< X > &  B)

◆ operator*=() [2/2]

template<class X >
matrix< X > & cppmat::matrix< X >::operator*= ( const X &  B)

◆ operator+=() [1/2]

template<class X >
matrix< X > & cppmat::matrix< X >::operator+= ( const matrix< X > &  B)

◆ operator+=() [2/2]

template<class X >
matrix< X > & cppmat::matrix< X >::operator+= ( const X &  B)

◆ operator-=() [1/2]

template<class X >
matrix< X > & cppmat::matrix< X >::operator-= ( const matrix< X > &  B)

◆ operator-=() [2/2]

template<class X >
matrix< X > & cppmat::matrix< X >::operator-= ( const X &  B)

◆ operator/=() [1/2]

template<class X >
matrix< X > & cppmat::matrix< X >::operator/= ( const matrix< X > &  B)

◆ operator/=() [2/2]

template<class X >
matrix< X > & cppmat::matrix< X >::operator/= ( const X &  B)

◆ operator[]() [1/2]

template<class X >
X & cppmat::matrix< X >::operator[] ( size_t  i)

◆ operator[]() [2/2]

template<class X >
const X & cppmat::matrix< X >::operator[] ( size_t  i) const

◆ printf()

template<class X >
void cppmat::matrix< X >::printf ( std::string  fmt) const

◆ reshape()

template<class X >
void cppmat::matrix< X >::reshape ( const std::vector< size_t > &  shape)

◆ resize()

template<class X >
void cppmat::matrix< X >::resize ( const std::vector< size_t > &  shape)

◆ setConstant()

template<class X >
void cppmat::matrix< X >::setConstant ( D)

◆ setOnes()

template<class X >
void cppmat::matrix< X >::setOnes ( )

◆ setZero()

template<class X >
void cppmat::matrix< X >::setZero ( )

◆ shape() [1/2]

template<class X >
std::vector< size_t > cppmat::matrix< X >::shape ( ) const

◆ shape() [2/2]

template<class X >
size_t cppmat::matrix< X >::shape ( size_t  i) const

◆ size()

template<class X >
size_t cppmat::matrix< X >::size ( ) const

◆ strides()

template<class X >
std::vector< size_t > cppmat::matrix< X >::strides ( bool  bytes = false) const

◆ sum()

template<class X >
X cppmat::matrix< X >::sum ( ) const

◆ zeros()

template<class X >
void cppmat::matrix< X >::zeros ( )

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