LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
StdMatrix< T > Class Template Reference

#include <deeplima/utils/std_matrix.h>

Public Member Functions

 StdMatrix ()
 
 StdMatrix (std::shared_ptr< std::vector< std::vector< T > > > input)
 
 StdMatrix (const StdMatrix &m)
 
StdMatrix & operator= (const StdMatrix &m)
 
 ~StdMatrix ()
 
size_t get (size_t time, size_t feat) const
 
void copy (const StdMatrix< T > &m)
 
size_t size () const
 Return the number of elements in this matrix.
 
size_t dim () const
 Return the dimension of this matrix's vectors (their size).
 
void resize (size_t new_size)
 
std::vector< T > & operator[] (size_t index)
 

Public Attributes

std::vector< std::vector< T > > m_tensor
 

Detailed Description

template<class T>
class StdMatrix< T >

Definition at line 30 of file std_matrix.h.

Constructor & Destructor Documentation

◆ StdMatrix() [1/3]

template<class T >
StdMatrix< T >::StdMatrix ( )
inline

Definition at line 34 of file std_matrix.h.

◆ StdMatrix() [2/3]

template<class T >
StdMatrix< T >::StdMatrix ( std::shared_ptr< std::vector< std::vector< T > > >  input)
inline

Definition at line 38 of file std_matrix.h.

◆ StdMatrix() [3/3]

template<class T >
StdMatrix< T >::StdMatrix ( const StdMatrix< T > &  m)
inline

Definition at line 42 of file std_matrix.h.

◆ ~StdMatrix()

template<class T >
StdMatrix< T >::~StdMatrix ( )
inline

Definition at line 49 of file std_matrix.h.

Member Function Documentation

◆ copy()

template<class T >
void StdMatrix< T >::copy ( const StdMatrix< T > &  m)
inline

Definition at line 61 of file std_matrix.h.

◆ dim()

template<class T >
size_t StdMatrix< T >::dim ( ) const
inline

Return the dimension of this matrix's vectors (their size).

This matrix must be non-empty. Otherwise, the result is undefined.

Definition at line 75 of file std_matrix.h.

◆ get()

template<class T >
size_t StdMatrix< T >::get ( size_t  time,
size_t  feat 
) const
inline

Definition at line 53 of file std_matrix.h.

◆ operator=()

template<class T >
StdMatrix & StdMatrix< T >::operator= ( const StdMatrix< T > &  m)
inline

Definition at line 45 of file std_matrix.h.

◆ operator[]()

template<class T >
std::vector< T > & StdMatrix< T >::operator[] ( size_t  index)
inline

Definition at line 86 of file std_matrix.h.

◆ resize()

template<class T >
void StdMatrix< T >::resize ( size_t  new_size)
inline

Definition at line 81 of file std_matrix.h.

◆ size()

template<class T >
size_t StdMatrix< T >::size ( ) const
inline

Return the number of elements in this matrix.

Definition at line 66 of file std_matrix.h.

Member Data Documentation

◆ m_tensor

template<class T >
std::vector<std::vector<T> > StdMatrix< T >::m_tensor

Definition at line 91 of file std_matrix.h.


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