Logo MTL4
Public Member Functions
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>

Inheritance diagram for mtl::matrix< T, Shape, Storage, Orientation >::crtp_matrix_assign< Matrix, ValueType, SizeType >:
Inheritance graph
[legend]

List of all members.

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 >
Matrixoperator*= (const Factor &alpha)
 Scale matrix (in place) with scalar value or other matrix.
template<typename Factor >
Matrixoperator/= (const Factor &alpha)
 Divide matrix (in place) by scalar value.

Detailed Description

template<class T, class Shape = rectangle<>, class Storage = dense<>, class Orientation = row_major>
template<typename Matrix, typename ValueType, typename SizeType>
struct mtl::matrix< T, Shape, Storage, Orientation >::crtp_matrix_assign< Matrix, ValueType, SizeType >

Base class to provide matrix assignment operators generically.


Member Function Documentation

template<class T , class Shape = rectangle<>, class Storage = dense<>, class Orientation = row_major>
template<typename Matrix, typename ValueType, typename SizeType>
template<typename Src >
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.

template<class T , class Shape = rectangle<>, class Storage = dense<>, class Orientation = row_major>
template<typename Matrix, typename ValueType, typename SizeType>
template<typename Src >
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.

template<class T , class Shape = rectangle<>, class Storage = dense<>, class Orientation = row_major>
template<typename Matrix, typename ValueType, typename SizeType>
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.

template<class T , class Shape = rectangle<>, class Storage = dense<>, class Orientation = row_major>
template<typename Matrix, typename ValueType, typename SizeType>
template<typename Src >
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.

template<class T , class Shape = rectangle<>, class Storage = dense<>, class Orientation = row_major>
template<typename Matrix, typename ValueType, typename SizeType>
template<typename Src1 , typename Src2 >
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.


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


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.