Glue< T1, T2, glue_type > Class Template Reference
[Glue]

Class for storing data required for delayed binary operations, such as the operands (e.g. two matrices) and the binary operator (e.g. addition). The operands are stored as references (which can be optimised away), while the operator is "stored" through the template definition (glue_type). The operands can be 'Mat', 'Row', 'Col', 'Op', and 'Glue'. Note that as 'Glue' can be one of the operands, more than two matrices can be stored. More...

#include <Glue_proto.hpp>

Inheritance diagram for Glue< T1, T2, glue_type >:

Base< T1::elem_type, Glue< T1, T2, glue_type > >

List of all members.

Public Types

typedef T1::elem_type elem_type
typedef get_pod_type
< elem_type >::pod_type 
pod_type

Public Member Functions

arma_inline Glue (const T1 &in_A, const T2 &in_B)
arma_inline ~Glue ()

Public Attributes

const T1 & A
 first operand
const T2 & B
 second operand


Detailed Description

template<typename T1, typename T2, typename glue_type>
class Glue< T1, T2, glue_type >

Class for storing data required for delayed binary operations, such as the operands (e.g. two matrices) and the binary operator (e.g. addition). The operands are stored as references (which can be optimised away), while the operator is "stored" through the template definition (glue_type). The operands can be 'Mat', 'Row', 'Col', 'Op', and 'Glue'. Note that as 'Glue' can be one of the operands, more than two matrices can be stored.

For example, we could have: Glue< Glue<Mat, Mat, glue_times>, Mat, glue_plus>

Another example is: Glue< Op<Mat, op_trans>, Op<Mat, op_inv>, glue_times >

More complicated example: Glue< Op< Glue<Mat, Mat, glue_plus>, op_trans>, Op<Mat, op_inv>, glue_times >

Definition at line 35 of file Glue_proto.hpp.


Member Typedef Documentation

template<typename T1 , typename T2 , typename glue_type >
typedef T1::elem_type Glue< T1, T2, glue_type >::elem_type

Definition at line 39 of file Glue_proto.hpp.

template<typename T1 , typename T2 , typename glue_type >
typedef get_pod_type<elem_type>::pod_type Glue< T1, T2, glue_type >::pod_type

Definition at line 40 of file Glue_proto.hpp.


Member Data Documentation

template<typename T1 , typename T2 , typename glue_type >
const T1& Glue< T1, T2, glue_type >::A

template<typename T1 , typename T2 , typename glue_type >
const T2& Glue< T1, T2, glue_type >::B