Public Types | Public Member Functions | Public Attributes

diagmat_proxy_check< Row< eT > > Class Template Reference
[Diagmat_proxy]

#include <diagmat_proxy.hpp>

List of all members.

Public Types

typedef eT elem_type
typedef get_pod_type
< elem_type >::result 
pod_type

Public Member Functions

 diagmat_proxy_check (const Row< eT > &X, const Mat< eT > &out)
 ~diagmat_proxy_check ()
arma_inline elem_type operator[] (const u32 i) const
arma_inline elem_type at (const u32 row, const u32 col) const

Public Attributes

const Row< eT > * P_local
const Row< eT > & P
const bool P_is_vec
const u32 n_elem

Detailed Description

template<typename eT>
class diagmat_proxy_check< Row< eT > >

Definition at line 210 of file diagmat_proxy.hpp.


Member Typedef Documentation

template<typename eT >
typedef eT diagmat_proxy_check< Row< eT > >::elem_type

Definition at line 214 of file diagmat_proxy.hpp.

template<typename eT >
typedef get_pod_type<elem_type>::result diagmat_proxy_check< Row< eT > >::pod_type

Definition at line 215 of file diagmat_proxy.hpp.


Constructor & Destructor Documentation

template<typename eT >
diagmat_proxy_check< Row< eT > >::diagmat_proxy_check ( const Row< eT > &  X,
const Mat< eT > &  out 
) [inline]

Definition at line 217 of file diagmat_proxy.hpp.

    : P_local ( (&X == reinterpret_cast<const Row<eT>*>(&out)) ? new Row<eT>(X) : 0 )
    , P       ( (&X == reinterpret_cast<const Row<eT>*>(&out)) ? (*P_local)     : X )
    , P_is_vec(true)
    , n_elem  (P.n_elem)
    {
    arma_extra_debug_sigprint();
    }

template<typename eT >
diagmat_proxy_check< Row< eT > >::~diagmat_proxy_check (  )  [inline]

Definition at line 227 of file diagmat_proxy.hpp.

    {
    if(P_local)
      {
      delete P_local;
      }
    }


Member Function Documentation

template<typename eT >
arma_inline elem_type diagmat_proxy_check< Row< eT > >::operator[] ( const u32  i  )  const [inline]

Definition at line 236 of file diagmat_proxy.hpp.

References Mat< eT >::at(), diagmat_proxy_check< T1 >::P, and diagmat_proxy_check< T1 >::P_is_vec.

{ return P_is_vec ? P[i] : P.at(i,i);                                         }

template<typename eT >
arma_inline elem_type diagmat_proxy_check< Row< eT > >::at ( const u32  row,
const u32  col 
) const [inline]

Definition at line 237 of file diagmat_proxy.hpp.

References Mat< eT >::at(), diagmat_proxy_check< T1 >::P, and diagmat_proxy_check< T1 >::P_is_vec.

{ return (row == col) ? ( P_is_vec ? P[row] : P.at(row,row) ) : elem_type(0); }


Member Data Documentation

template<typename eT >
const Row<eT>* diagmat_proxy_check< Row< eT > >::P_local

Definition at line 240 of file diagmat_proxy.hpp.

template<typename eT >
const Row<eT>& diagmat_proxy_check< Row< eT > >::P

Definition at line 241 of file diagmat_proxy.hpp.

template<typename eT >
const bool diagmat_proxy_check< Row< eT > >::P_is_vec

Definition at line 242 of file diagmat_proxy.hpp.

template<typename eT >
const u32 diagmat_proxy_check< Row< eT > >::n_elem

Definition at line 243 of file diagmat_proxy.hpp.