Op_ones


Classes

class  op_ones_full
 Class for creation of a dense matrix/vector with all elements set to one. More...
class  op_ones_diag

Functions

template<typename eT >
static void op_ones_full::apply (Mat< eT > &out, const Op< Mat< eT >, op_ones_full > &in)
template<typename eT >
static void op_ones_full::apply (Mat< eT > &out, const Op< Col< eT >, op_ones_full > &in)
template<typename eT >
static void op_ones_full::apply (Mat< eT > &out, const Op< Row< eT >, op_ones_full > &in)
template<typename eT >
static void op_ones_full::apply (Col< eT > &out, const Op< Col< eT >, op_ones_full > &in)
template<typename eT >
static void op_ones_full::apply (Row< eT > &out, const Op< Row< eT >, op_ones_full > &in)
template<typename eT >
static void op_ones_diag::apply (Mat< eT > &out, const Op< Mat< eT >, op_ones_diag > &in)

Function Documentation

template<typename eT >
void op_ones_full::apply ( Mat< eT > &  out,
const Op< Mat< eT >, op_ones_full > &  in 
) [inline, static, inherited]

Definition at line 22 of file op_ones_meat.hpp.

References Mat< eT >::fill(), and Mat< eT >::set_size().

00023   {
00024   arma_extra_debug_sigprint();
00025   
00026   out.set_size(in.aux_u32_a, in.aux_u32_b);
00027   out.fill(eT(1));
00028   }

template<typename eT >
void op_ones_full::apply ( Mat< eT > &  out,
const Op< Col< eT >, op_ones_full > &  in 
) [inline, static, inherited]

Definition at line 35 of file op_ones_meat.hpp.

References Mat< eT >::fill(), and Mat< eT >::set_size().

00036   {
00037   arma_extra_debug_sigprint();
00038   
00039   out.set_size(in.aux_u32_a, 1);
00040   out.fill(eT(1));
00041   }

template<typename eT >
void op_ones_full::apply ( Mat< eT > &  out,
const Op< Row< eT >, op_ones_full > &  in 
) [inline, static, inherited]

Definition at line 48 of file op_ones_meat.hpp.

References Mat< eT >::fill(), and Mat< eT >::set_size().

00049   {
00050   arma_extra_debug_sigprint();
00051   
00052   out.set_size(1, in.aux_u32_a);
00053   out.fill(eT(1));
00054   }

template<typename eT >
void op_ones_full::apply ( Col< eT > &  out,
const Op< Col< eT >, op_ones_full > &  in 
) [inline, static, inherited]

Definition at line 61 of file op_ones_meat.hpp.

References Mat< eT >::fill(), and Col< eT >::set_size().

00062   {
00063   arma_extra_debug_sigprint();
00064   
00065   out.set_size(in.aux_u32_a);
00066   out.fill(eT(1));
00067   }

template<typename eT >
void op_ones_full::apply ( Row< eT > &  out,
const Op< Row< eT >, op_ones_full > &  in 
) [inline, static, inherited]

Definition at line 74 of file op_ones_meat.hpp.

References Mat< eT >::fill(), and Row< eT >::set_size().

00075   {
00076   arma_extra_debug_sigprint();
00077   
00078   out.set_size(in.aux_u32_a);
00079   out.fill(eT(1));
00080   }

template<typename eT >
void op_ones_diag::apply ( Mat< eT > &  out,
const Op< Mat< eT >, op_ones_diag > &  in 
) [inline, static, inherited]

Definition at line 87 of file op_ones_meat.hpp.

References Mat< eT >::at(), Mat< eT >::n_rows, and Mat< eT >::zeros().

00088   {
00089   arma_extra_debug_sigprint();
00090   
00091   out.zeros(in.aux_u32_a, in.aux_u32_b);
00092   
00093   for(u32 i=0; i<out.n_rows; ++i)
00094     {
00095     out.at(i,i) = eT(1);
00096     }
00097   
00098   }