mtl::matrix< T, Shape, Storage, Orientation >::crtp_matrix_assign< Matrix, ValueType, SizeType > Struct Template Reference
Base class to provide matrix assignment operators generically. More...
#include <crtp_base_matrix.hpp>
Public Member Functions | |
template<typename Src > | |
void | check_resource (const Src &src) const |
Check wether source and target have compatible resources, generalization of check_dim. | |
template<typename Src > | |
void | check_ready_resource (const Src &src) const |
Check wether source and target have compatible resources and wether target has already resources. | |
template<typename Src > | |
void | checked_change_resource (const Src &src) |
Check wether source and target have compatible resources and adapt empty target. | |
template<typename Src1 , typename Src2 > | |
void | checked_change_resource (const Src1 &src1, const Src2 &src2) |
Check wether source and target have compatible resources and adapt empty target. | |
void | checked_change_dim (SizeType r, SizeType c) |
Check whether matrix sizes are compatible or if matrix is 0 by 0 change it to r by c. | |
template<typename Source > | |
boost::disable_if_c < boost::is_same< Matrix, Source >::value||boost::is_same < typename ashape::ashape < Source >::type, ashape::scal > ::value, Matrix & >::type | operator= (const Source &src) |
Templated assignment implemented by functor to allow for partial specialization. | |
template<typename Factor > | |
Matrix & | operator*= (const Factor &alpha) |
Scale matrix (in place) with scalar value or other matrix. | |
template<typename Factor > | |
Matrix & | operator/= (const Factor &alpha) |
Divide matrix (in place) by scalar value. |
Base class to provide matrix assignment operators generically.
void mtl::matrix< T, Shape, Storage, Orientation >::crtp_matrix_assign< Matrix, ValueType, SizeType >::check_ready_resource | ( | const Src & | src | ) | const [inline] |
Check wether source and target have compatible resources and wether target has already resources.
For expressions like A+= B + C, A must be already larger then 0 by 0 and compatible to B and C.
void mtl::matrix< T, Shape, Storage, Orientation >::crtp_matrix_assign< Matrix, ValueType, SizeType >::check_resource | ( | const Src & | src | ) | const [inline] |
Check wether source and target have compatible resources, generalization of check_dim.
For expressions like A= B + C, A can be set to the size of B and C if still is 0 by 0.
void mtl::matrix< T, Shape, Storage, Orientation >::crtp_matrix_assign< Matrix, ValueType, SizeType >::checked_change_dim | ( | SizeType | r, |
SizeType | c | ||
) | [inline] |
Check whether matrix sizes are compatible or if matrix is 0 by 0 change it to r by c.
Deprecated, superseded by checked_change_resource.
void mtl::matrix< T, Shape, Storage, Orientation >::crtp_matrix_assign< Matrix, ValueType, SizeType >::checked_change_resource | ( | const Src & | src | ) | [inline] |
Check wether source and target have compatible resources and adapt empty target.
For expressions like A= B + C, A can be set to the size of B and C if still is 0 by 0.
void mtl::matrix< T, Shape, Storage, Orientation >::crtp_matrix_assign< Matrix, ValueType, SizeType >::checked_change_resource | ( | const Src1 & | src1, |
const Src2 & | src2 | ||
) | [inline] |
Check wether source and target have compatible resources and adapt empty target.
For expressions like A= B + C, A can be set to the size of B and C if still is 0 by 0.
mtl::matrix< T, Shape, Storage, Orientation >::crtp_matrix_assign< Matrix, ValueType, SizeType > Struct Template Reference -- MTL 4 -- Peter Gottschling and Andrew Lumsdaine
-- Gen. with
rev. 7542
on Sat Aug 11 2012 by doxygen 1.7.6.1 -- © 2010 by SimuNova UG.