matrix: add data accessor function
This commit is contained in:
parent
faf7e68671
commit
4566141855
@ -36,6 +36,9 @@ namespace util {
|
||||
T* operator[] (size_t);
|
||||
const T* operator[] (size_t) const;
|
||||
|
||||
T* data (void);
|
||||
const T* data (void) const;
|
||||
|
||||
const T* begin (void) const;
|
||||
const T* end (void) const;
|
||||
T* begin (void);
|
||||
|
18
matrix.ipp
18
matrix.ipp
@ -40,6 +40,24 @@ util::matrix<S,T>::operator[] (size_t idx) const
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
template <size_t S, typename T>
|
||||
T*
|
||||
util::matrix<S,T>::data (void)
|
||||
{
|
||||
return begin ();
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
template <size_t S, typename T>
|
||||
const T*
|
||||
util::matrix<S,T>::data (void) const
|
||||
{
|
||||
return begin ();
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
template <size_t S, typename T>
|
||||
const T*
|
||||
|
Loading…
Reference in New Issue
Block a user