Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
fmat::SubMatrix< H, W, R > Class Template Reference
Detailed Descriptiontemplate<size_t H, size_t W, typename R = fmatReal>
|
Public Types | |
typedef R | storage_t |
typedef fmat_internal::unconst < R >::type | out_t |
Public Member Functions | |
SubMatrix (R *x, size_t colStride=H) | |
SubMatrix (const SubMatrix< H, W, out_t > &x) | |
SubMatrix (Matrix< H, W, out_t > &x) | |
template<typename T > | |
SubMatrix (const SubMatrix< H, W, T > &x) | |
template<typename T > | |
SubMatrix (const Matrix< H, W, T > &x) | |
template<size_t SH, size_t SW, typename T > | |
SubMatrix (const SubMatrix< SH, SW, T > &x) | |
this constructor handles shrinking/slicing from other SubMatrix, starting at (0,0) | |
template<size_t SH, size_t SW, typename T > | |
SubMatrix (const SubMatrix< SH, SW, T > &x, size_t rowOff, size_t colOff) | |
this constructor handles shrinking/slicing from other SubMatrix, at a specified offset | |
template<size_t SH, size_t SW> | |
SubMatrix (Matrix< SH, SW, out_t > &x) | |
this constructor handles shrinking/slicing from non-const Matrix, starting at (0,0) | |
template<size_t SH, size_t SW> | |
SubMatrix (Matrix< SH, SW, out_t > &x, size_t rowOff, size_t colOff) | |
this constructor handles shrinking/slicing from non-const Matrix, starting at specified offset | |
template<size_t SH, size_t SW, typename T > | |
SubMatrix (const Matrix< SH, SW, T > &x) | |
this constructor handles shrinking/slicing from const Matrix (which can only be used if R is const too - error on cols init otherwise) | |
template<size_t SH, size_t SW, typename T > | |
SubMatrix (const Matrix< SH, SW, T > &x, size_t rowOff, size_t colOff) | |
this constructor handles shrinking/slicing from const Matrix (which can only be used if R is const too - error on cols init otherwise) | |
operator SubMatrix< H, W, const R > () const | |
template<typename T > | |
SubMatrix & | importFrom (const T &x) |
template<typename T > | |
SubMatrix & | importFromCMajor (const T &x, size_t stride=H) |
template<typename T > | |
SubMatrix & | importFromRMajor (const T &x, size_t stride=W) |
template<typename T > | |
SubMatrix & | importFrom2DArray (const T &x) |
template<typename T > | |
SubMatrix & | importFromNewmat (const T &x) |
template<typename T > | |
T | exportTo () const |
template<typename T > | |
T & | exportTo (T &x) const |
template<typename T > | |
T & | exportToCMajor (T &x, size_t stride=H) const |
template<typename T > | |
T & | exportToRMajor (T &x, size_t stride=W) const |
template<typename T > | |
T & | exportTo2DArray (T &x) const |
template<typename T > | |
T & | exportToNewmat (T &x) const |
const SubMatrix & | operator= (R x) const |
const SubMatrix & | operator= (const R *x) const |
const SubMatrix & | operator= (const Matrix< H, W, out_t > &x) const |
const SubMatrix & | operator= (const SubMatrix &x) const |
template<typename T > | |
const SubMatrix & | operator= (const SubMatrix< H, W, T > &x) const |
const SubMatrix & | operator+= (R x) const |
const SubMatrix & | operator-= (R x) const |
const SubMatrix & | operator*= (R x) const |
const SubMatrix & | operator/= (R x) const |
Matrix< H, W, out_t > | operator+ (R x) const |
Matrix< H, W, out_t > | operator- (R x) const |
Matrix< H, W, out_t > | operator* (R x) const |
Matrix< H, W, out_t > | operator/ (R x) const |
Matrix< H, W, out_t > | operator- () const |
template<typename T > | |
const SubMatrix & | operator+= (const SubMatrix< H, W, T > &x) const |
template<typename T > | |
const SubMatrix & | operator-= (const SubMatrix< H, W, T > &x) const |
template<typename T > | |
const SubMatrix & | operator+= (const Matrix< H, W, T > &x) const |
template<typename T > | |
const SubMatrix & | operator-= (const Matrix< H, W, T > &x) const |
template<typename T > | |
Matrix< H, W, out_t > | operator+ (const SubMatrix< H, W, T > &x) const |
template<typename T > | |
Matrix< H, W, out_t > | operator- (const SubMatrix< H, W, T > &x) const |
template<typename T > | |
Matrix< H, W, out_t > | operator+ (const Matrix< H, W, T > &x) const |
template<typename T > | |
Matrix< H, W, out_t > | operator- (const Matrix< H, W, T > &x) const |
template<typename T > | |
bool | operator== (const SubMatrix< H, W, T > &x) const |
template<typename T > | |
bool | operator!= (const SubMatrix< H, W, T > &x) const |
template<typename T > | |
bool | operator== (const Matrix< H, W, T > &x) const |
template<typename T > | |
bool | operator!= (const Matrix< H, W, T > &x) const |
R & | operator() (size_t r, size_t c) |
const R & | operator() (size_t r, size_t c) const |
SubVector< H, R > & | column (size_t i) |
const SubVector< H, R > & | column (size_t i) const |
SubMatrix< 1, W, R > | row (size_t i) |
SubMatrix< 1, W, const R > | row (size_t i) const |
Column< H, R > | minC () const |
Column< H, R > | maxC () const |
Row< W, R > | minR () const |
Row< W, R > | maxR () const |
void | abs () const |
template<typename F > | |
void | apply (const F &f) const |
template<typename F > | |
Matrix< H, W, out_t > | map (const F &f) const |
Matrix< W, H, out_t > | transpose () const ATTR_must_check |
std::string | fmt (std::string const &numberFormat=defaultNumberFormat, std::string const &firstLineStart="{ ", std::string const &nextLineStart=" ", std::string const &lastLineEnd=" }", std::string const &rowBegin="", std::string const &elementSep=" ", std::string const &rowEnd="", std::string const &rowSep="\n") const |
Static Public Attributes | |
static const size_t | HEIGHT = H |
static const size_t | WIDTH = W |
static const size_t | CAP = H*W |
Protected Attributes | |
SubVector< H, R > | cols [(W==0)?1:W] |
Friends | |
class | Matrix |
class | SubMatrix |
class | SubVector |
class | Column |
class | Row |
Matrix< H, W, out_t > | operator+ (R x, const SubMatrix &a) |
Matrix< H, W, out_t > | operator- (R x, const SubMatrix &a) |
Matrix< H, W, out_t > | operator* (R x, const SubMatrix &a) |
typedef fmat_internal::unconst<R>::type fmat::SubMatrix< H, W, R >::out_t |
Definition at line 359 of file fmatCore.h.
typedef R fmat::SubMatrix< H, W, R >::storage_t |
Definition at line 358 of file fmatCore.h.
fmat::SubMatrix< H, W, R >::SubMatrix | ( | R * | x, | |
size_t | colStride = H | |||
) | [explicit] |
Definition at line 361 of file fmatCore.h.
fmat::SubMatrix< H, W, R >::SubMatrix | ( | const SubMatrix< H, W, out_t > & | x | ) |
Definition at line 363 of file fmatCore.h.
fmat::SubMatrix< H, W, R >::SubMatrix | ( | Matrix< H, W, out_t > & | x | ) |
Definition at line 364 of file fmatCore.h.
fmat::SubMatrix< H, W, R >::SubMatrix | ( | const SubMatrix< H, W, T > & | x | ) |
Definition at line 365 of file fmatCore.h.
fmat::SubMatrix< H, W, R >::SubMatrix | ( | const Matrix< H, W, T > & | x | ) |
Definition at line 366 of file fmatCore.h.
fmat::SubMatrix< H, W, R >::SubMatrix | ( | const SubMatrix< SH, SW, T > & | x | ) | [explicit] |
this constructor handles shrinking/slicing from other SubMatrix, starting at (0,0)
If x has const data and this is non-const, we rely on an error on the cols initializer to point that out
Definition at line 370 of file fmatCore.h.
fmat::SubMatrix< H, W, R >::SubMatrix | ( | const SubMatrix< SH, SW, T > & | x, | |
size_t | rowOff, | |||
size_t | colOff | |||
) | [explicit] |
this constructor handles shrinking/slicing from other SubMatrix, at a specified offset
If x has const data and this is non-const, we rely on an error on the cols initializer to point that out
Definition at line 377 of file fmatCore.h.
fmat::SubMatrix< H, W, R >::SubMatrix | ( | Matrix< SH, SW, out_t > & | x | ) | [explicit] |
this constructor handles shrinking/slicing from non-const Matrix, starting at (0,0)
Definition at line 383 of file fmatCore.h.
fmat::SubMatrix< H, W, R >::SubMatrix | ( | Matrix< SH, SW, out_t > & | x, | |
size_t | rowOff, | |||
size_t | colOff | |||
) | [explicit] |
this constructor handles shrinking/slicing from non-const Matrix, starting at specified offset
Definition at line 389 of file fmatCore.h.
fmat::SubMatrix< H, W, R >::SubMatrix | ( | const Matrix< SH, SW, T > & | x | ) | [explicit] |
this constructor handles shrinking/slicing from const Matrix (which can only be used if R is const too - error on cols init otherwise)
Definition at line 395 of file fmatCore.h.
fmat::SubMatrix< H, W, R >::SubMatrix | ( | const Matrix< SH, SW, T > & | x, | |
size_t | rowOff, | |||
size_t | colOff | |||
) | [explicit] |
this constructor handles shrinking/slicing from const Matrix (which can only be used if R is const too - error on cols init otherwise)
Definition at line 401 of file fmatCore.h.
void fmat::SubMatrix< H, W, R >::abs | ( | ) | const |
Definition at line 494 of file fmatCore.h.
void fmat::SubMatrix< H, W, R >::apply | ( | const F & | f | ) | const |
Definition at line 495 of file fmatCore.h.
const SubVector<H,R>& fmat::SubMatrix< H, W, R >::column | ( | size_t | i | ) | const |
Definition at line 474 of file fmatCore.h.
SubVector<H,R>& fmat::SubMatrix< H, W, R >::column | ( | size_t | i | ) |
Definition at line 473 of file fmatCore.h.
T& fmat::SubMatrix< H, W, R >::exportTo | ( | T & | x | ) | const |
Definition at line 415 of file fmatCore.h.
T fmat::SubMatrix< H, W, R >::exportTo | ( | ) | const |
Definition at line 414 of file fmatCore.h.
T& fmat::SubMatrix< H, W, R >::exportTo2DArray | ( | T & | x | ) | const |
Definition at line 418 of file fmatCore.h.
T& fmat::SubMatrix< H, W, R >::exportToCMajor | ( | T & | x, | |
size_t | stride = H | |||
) | const |
Definition at line 416 of file fmatCore.h.
T& fmat::SubMatrix< H, W, R >::exportToNewmat | ( | T & | x | ) | const |
Definition at line 419 of file fmatCore.h.
T& fmat::SubMatrix< H, W, R >::exportToRMajor | ( | T & | x, | |
size_t | stride = W | |||
) | const |
Definition at line 417 of file fmatCore.h.
std::string fmat::SubMatrix< H, W, R >::fmt | ( | std::string const & | numberFormat = defaultNumberFormat , |
|
std::string const & | firstLineStart = "{ " , |
|||
std::string const & | nextLineStart = " " , |
|||
std::string const & | lastLineEnd = " }" , |
|||
std::string const & | rowBegin = "" , |
|||
std::string const & | elementSep = " " , |
|||
std::string const & | rowEnd = "" , |
|||
std::string const & | rowSep = "\n" | |||
) | const |
Definition at line 511 of file fmatCore.h.
SubMatrix& fmat::SubMatrix< H, W, R >::importFrom | ( | const T & | x | ) |
Definition at line 409 of file fmatCore.h.
SubMatrix& fmat::SubMatrix< H, W, R >::importFrom2DArray | ( | const T & | x | ) |
Definition at line 412 of file fmatCore.h.
SubMatrix& fmat::SubMatrix< H, W, R >::importFromCMajor | ( | const T & | x, | |
size_t | stride = H | |||
) |
Definition at line 410 of file fmatCore.h.
SubMatrix& fmat::SubMatrix< H, W, R >::importFromNewmat | ( | const T & | x | ) |
Definition at line 413 of file fmatCore.h.
SubMatrix& fmat::SubMatrix< H, W, R >::importFromRMajor | ( | const T & | x, | |
size_t | stride = W | |||
) |
Definition at line 411 of file fmatCore.h.
Matrix<H,W,out_t> fmat::SubMatrix< H, W, R >::map | ( | const F & | f | ) | const |
Definition at line 496 of file fmatCore.h.
Column<H,R> fmat::SubMatrix< H, W, R >::maxC | ( | ) | const |
Definition at line 486 of file fmatCore.h.
Row<W,R> fmat::SubMatrix< H, W, R >::maxR | ( | ) | const |
Definition at line 493 of file fmatCore.h.
Column<H,R> fmat::SubMatrix< H, W, R >::minC | ( | ) | const |
Definition at line 479 of file fmatCore.h.
Row<W,R> fmat::SubMatrix< H, W, R >::minR | ( | ) | const |
Definition at line 492 of file fmatCore.h.
fmat::SubMatrix< H, W, R >::operator SubMatrix< H, W, const R > | ( | ) | const |
Definition at line 407 of file fmatCore.h.
bool fmat::SubMatrix< H, W, R >::operator!= | ( | const Matrix< H, W, T > & | x | ) | const |
Definition at line 468 of file fmatCore.h.
bool fmat::SubMatrix< H, W, R >::operator!= | ( | const SubMatrix< H, W, T > & | x | ) | const |
Definition at line 466 of file fmatCore.h.
const R& fmat::SubMatrix< H, W, R >::operator() | ( | size_t | r, | |
size_t | c | |||
) | const |
Definition at line 471 of file fmatCore.h.
R& fmat::SubMatrix< H, W, R >::operator() | ( | size_t | r, | |
size_t | c | |||
) |
Definition at line 470 of file fmatCore.h.
Matrix<H,W,out_t> fmat::SubMatrix< H, W, R >::operator* | ( | R | x | ) | const |
Definition at line 434 of file fmatCore.h.
const SubMatrix& fmat::SubMatrix< H, W, R >::operator*= | ( | R | x | ) | const |
Definition at line 430 of file fmatCore.h.
Matrix<H,W,out_t> fmat::SubMatrix< H, W, R >::operator+ | ( | const Matrix< H, W, T > & | x | ) | const |
Definition at line 462 of file fmatCore.h.
Matrix<H,W,out_t> fmat::SubMatrix< H, W, R >::operator+ | ( | const SubMatrix< H, W, T > & | x | ) | const |
Definition at line 460 of file fmatCore.h.
Matrix<H,W,out_t> fmat::SubMatrix< H, W, R >::operator+ | ( | R | x | ) | const |
Definition at line 432 of file fmatCore.h.
const SubMatrix& fmat::SubMatrix< H, W, R >::operator+= | ( | const Matrix< H, W, T > & | x | ) | const |
Definition at line 444 of file fmatCore.h.
const SubMatrix& fmat::SubMatrix< H, W, R >::operator+= | ( | const SubMatrix< H, W, T > & | x | ) | const |
Definition at line 442 of file fmatCore.h.
const SubMatrix& fmat::SubMatrix< H, W, R >::operator+= | ( | R | x | ) | const |
Definition at line 428 of file fmatCore.h.
Matrix<H,W,out_t> fmat::SubMatrix< H, W, R >::operator- | ( | const Matrix< H, W, T > & | x | ) | const |
Definition at line 463 of file fmatCore.h.
Matrix<H,W,out_t> fmat::SubMatrix< H, W, R >::operator- | ( | const SubMatrix< H, W, T > & | x | ) | const |
Definition at line 461 of file fmatCore.h.
Matrix<H,W,out_t> fmat::SubMatrix< H, W, R >::operator- | ( | ) | const |
Definition at line 436 of file fmatCore.h.
Matrix<H,W,out_t> fmat::SubMatrix< H, W, R >::operator- | ( | R | x | ) | const |
Definition at line 433 of file fmatCore.h.
const SubMatrix& fmat::SubMatrix< H, W, R >::operator-= | ( | const Matrix< H, W, T > & | x | ) | const |
Definition at line 452 of file fmatCore.h.
const SubMatrix& fmat::SubMatrix< H, W, R >::operator-= | ( | const SubMatrix< H, W, T > & | x | ) | const |
Definition at line 443 of file fmatCore.h.
const SubMatrix& fmat::SubMatrix< H, W, R >::operator-= | ( | R | x | ) | const |
Definition at line 429 of file fmatCore.h.
Matrix<H,W,out_t> fmat::SubMatrix< H, W, R >::operator/ | ( | R | x | ) | const |
Definition at line 435 of file fmatCore.h.
const SubMatrix& fmat::SubMatrix< H, W, R >::operator/= | ( | R | x | ) | const |
Definition at line 431 of file fmatCore.h.
const SubMatrix& fmat::SubMatrix< H, W, R >::operator= | ( | const SubMatrix< H, W, T > & | x | ) | const |
Definition at line 426 of file fmatCore.h.
const SubMatrix& fmat::SubMatrix< H, W, R >::operator= | ( | const SubMatrix< H, W, R > & | x | ) | const |
Definition at line 424 of file fmatCore.h.
const SubMatrix& fmat::SubMatrix< H, W, R >::operator= | ( | const Matrix< H, W, out_t > & | x | ) | const |
Definition at line 423 of file fmatCore.h.
const SubMatrix& fmat::SubMatrix< H, W, R >::operator= | ( | const R * | x | ) | const |
Definition at line 422 of file fmatCore.h.
const SubMatrix& fmat::SubMatrix< H, W, R >::operator= | ( | R | x | ) | const |
Definition at line 421 of file fmatCore.h.
bool fmat::SubMatrix< H, W, R >::operator== | ( | const Matrix< H, W, T > & | x | ) | const |
Definition at line 467 of file fmatCore.h.
bool fmat::SubMatrix< H, W, R >::operator== | ( | const SubMatrix< H, W, T > & | x | ) | const |
Definition at line 465 of file fmatCore.h.
SubMatrix<1,W,const R> fmat::SubMatrix< H, W, R >::row | ( | size_t | i | ) | const |
Definition at line 477 of file fmatCore.h.
SubMatrix<1,W,R> fmat::SubMatrix< H, W, R >::row | ( | size_t | i | ) |
Definition at line 476 of file fmatCore.h.
Matrix<W,H,out_t> fmat::SubMatrix< H, W, R >::transpose | ( | ) | const |
Definition at line 503 of file fmatCore.h.
Referenced by BoxObstacle::reset(), and RectangularObstacle::reset().
friend class Column [friend] |
Definition at line 345 of file fmatCore.h.
friend class Matrix [friend] |
Definition at line 342 of file fmatCore.h.
Matrix<H,W,out_t> operator* | ( | R | x, | |
const SubMatrix< H, W, R > & | a | |||
) | [friend] |
Definition at line 440 of file fmatCore.h.
Matrix<H,W,out_t> operator+ | ( | R | x, | |
const SubMatrix< H, W, R > & | a | |||
) | [friend] |
Definition at line 438 of file fmatCore.h.
Matrix<H,W,out_t> operator- | ( | R | x, | |
const SubMatrix< H, W, R > & | a | |||
) | [friend] |
Definition at line 439 of file fmatCore.h.
friend class Row [friend] |
Definition at line 346 of file fmatCore.h.
friend class SubMatrix [friend] |
Definition at line 343 of file fmatCore.h.
friend class SubVector [friend] |
Definition at line 344 of file fmatCore.h.
const size_t fmat::SubMatrix< H, W, R >::CAP = H*W [static] |
Definition at line 352 of file fmatCore.h.
Referenced by fmat::SubMatrix< H, W, R >::maxC(), and fmat::SubMatrix< H, W, R >::minC().
SubVector<H,R> fmat::SubMatrix< H, W, R >::cols[(W==0)?1:W] [protected] |
Definition at line 525 of file fmatCore.h.
Referenced by fmat::SubMatrix< H, W, R >::abs(), fmat::SubMatrix< H, W, R >::apply(), fmat::SubMatrix< H, W, R >::column(), fmat::SubMatrix< H, W, R >::exportTo(), fmat::SubMatrix< H, W, R >::exportTo2DArray(), fmat::SubMatrix< H, W, R >::exportToCMajor(), fmat::SubMatrix< H, W, R >::exportToNewmat(), fmat::SubMatrix< H, W, R >::exportToRMajor(), fmat::SubMatrix< H, W, R >::importFrom(), fmat::SubMatrix< H, W, R >::importFrom2DArray(), fmat::SubMatrix< H, W, R >::importFromCMajor(), fmat::SubMatrix< H, W, R >::importFromNewmat(), fmat::SubMatrix< H, W, R >::importFromRMajor(), fmat::SubMatrix< H, W, R >::map(), fmat::Matrix< 4, 2 >::Matrix(), fmat::SubMatrix< H, W, R >::maxC(), fmat::SubMatrix< H, W, R >::maxR(), fmat::SubMatrix< H, W, R >::minC(), fmat::SubMatrix< H, W, R >::minR(), fmat::Row< N, R >::operator!=(), fmat::Column< 2, float >::operator!=(), fmat::Matrix< 4, 2 >::operator!=(), fmat::SubMatrix< H, W, R >::operator!=(), fmat::SubMatrix< H, W, R >::operator()(), fmat::SubMatrix< H, W, R >::operator*=(), fmat::Matrix< 4, 2 >::operator+=(), fmat::SubMatrix< H, W, R >::operator+=(), fmat::Matrix< 4, 2 >::operator-=(), fmat::SubMatrix< H, W, R >::operator-=(), fmat::SubMatrix< H, W, R >::operator/=(), fmat::Row< N, R >::operator=(), fmat::Column< 2, float >::operator=(), fmat::Matrix< 4, 2 >::operator=(), fmat::SubMatrix< H, W, R >::operator=(), fmat::Row< N, R >::operator==(), fmat::Column< 2, float >::operator==(), fmat::Matrix< 4, 2 >::operator==(), fmat::SubMatrix< H, W, R >::operator==(), fmat::SubMatrix< H, W, R >::SubMatrix(), and fmat::SubMatrix< H, W, R >::transpose().
const size_t fmat::SubMatrix< H, W, R >::HEIGHT = H [static] |
Definition at line 350 of file fmatCore.h.
const size_t fmat::SubMatrix< H, W, R >::WIDTH = W [static] |
Definition at line 351 of file fmatCore.h.
Tekkotsu v5.1CVS |
Generated Mon May 9 04:59:22 2016 by Doxygen 1.6.3 |