SIFT
Public Member Functions | Private Attributes | Friends | List of all members
sift::Matrix< T > Class Template Reference

#include <matrix.hpp>

Public Member Functions

 Matrix ()=default
 
 Matrix (u16_t width, u16_t height, const T &def=T())
 
u16_t width () const
 
u16_t height () const
 
T & operator[] (const Point< u16_t, u16_t > &vec)
 
const T & operator[] (const Point< u16_t, u16_t > &vec) const
 
T & operator() (u16_t x, u16_t y)
 
const T & operator() (u16_t x, u16_t y) const
 
T * begin ()
 
T * end ()
 

Private Attributes

u16_t _width
 
u16_t _height
 
std::shared_ptr< T > _data
 

Friends

std::ostream & operator<< (std::ostream &out, Matrix &m)
 

Detailed Description

template<typename T>
class sift::Matrix< T >

A class which allows 2-dimensional access, but saves the data in an one-dimensional data structure

Constructor & Destructor Documentation

template<typename T>
sift::Matrix< T >::Matrix ( )
default
template<typename T>
sift::Matrix< T >::Matrix ( u16_t  width,
u16_t  height,
const T &  def = T() 
)
inlineexplicit

allocates a data structure with the given dimensions and sets everything to a default value

Member Function Documentation

template<typename T>
T* sift::Matrix< T >::begin ( )
inline
template<typename T>
T* sift::Matrix< T >::end ( )
inline
template<typename T>
u16_t sift::Matrix< T >::height ( ) const
inline
template<typename T>
T& sift::Matrix< T >::operator() ( u16_t  x,
u16_t  y 
)
inline
template<typename T>
const T& sift::Matrix< T >::operator() ( u16_t  x,
u16_t  y 
) const
inline
template<typename T>
T& sift::Matrix< T >::operator[] ( const Point< u16_t, u16_t > &  vec)
inline
template<typename T>
const T& sift::Matrix< T >::operator[] ( const Point< u16_t, u16_t > &  vec) const
inline
template<typename T>
u16_t sift::Matrix< T >::width ( ) const
inline

Friends And Related Function Documentation

template<typename T>
std::ostream& operator<< ( std::ostream &  out,
Matrix< T > &  m 
)
friend

Member Data Documentation

template<typename T>
std::shared_ptr<T> sift::Matrix< T >::_data
private
template<typename T>
u16_t sift::Matrix< T >::_height
private
template<typename T>
u16_t sift::Matrix< T >::_width
private

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