22 template<
typename T1,
typename T2>
29 typedef typename T1::elem_type eT;
31 if( ((
void*)(&in.
A)) == ((
void*)(&in.
B)) )
41 const eT* A_mem = A.
memptr();
45 for(
uword col=0; col<N; ++col)
47 eT* col_mem = out.
colptr(col);
52 for(
uword row=0; row<col; ++row, --i)
54 col_mem[row] = A_mem[i];
58 for(
uword row=col; row<N; ++row, ++i)
60 col_mem[row] = A_mem[i];
79 const eT* A_mem = A.
memptr();
80 const eT* B_mem = B.
memptr();
89 for(
uword col=0; col<B_N; ++col)
91 eT* col_mem = out.
colptr(col);
94 for(
uword row=col; row<A_N; ++row, ++i)
96 col_mem[row] = A_mem[i];
100 for(
uword row=0; row<A_N; ++row)
103 for(
uword col=(row+1); col<B_N; ++col, ++i)
105 out.
at(row,col) = B_mem[i];
116 template<
typename T1,
typename T2>
123 typedef typename T1::elem_type eT;
125 if( ((
void*)(&in.
A)) == ((
void*)(&in.
B)) )
135 const eT* A_mem = A.
memptr();
144 for(
uword col=0; col<N; ++col)
146 eT* col_mem = out.
colptr(col);
151 for(
uword row=0; row<col; ++row, --i)
153 col_mem[row] = A_mem[N-i];
159 for(
uword row=col; row<N; ++row, ++i)
161 col_mem[row] = A_mem[i];
170 for(
uword row=0; row<N; ++row)
174 for(
uword col=0; col<row; ++col, --i)
176 out.
at(row,col) = A_mem[N-i];
181 for(
uword col=row; col<N; ++col, ++i)
183 out.
at(row,col) = A_mem[i];
arma_inline arma_warn_unused bool is_vec() const
returns true if the object can be interpreted as a column or row vector
arma_inline arma_warn_unused eT * memptr()
returns a pointer to array of eTs used by the matrix
void set_size(const uword in_elem)
change the matrix to have user specified dimensions (data is not preserved)
static void apply(Mat< typename T1::elem_type > &out, const Glue< T1, T2, glue_toeplitz > &in)
arma_inline arma_warn_unused bool is_colvec() const
returns true if the object can be interpreted as a column vector
static void apply(Mat< typename T1::elem_type > &out, const Glue< T1, T2, glue_toeplitz_circ > &in)
const uword n_elem
number of elements in the matrix (read-only)
#define arma_extra_debug_print
arma_inline arma_warn_unused eT * colptr(const uword in_col)
returns a pointer to array of eTs for a specified column; no bounds check
const T1 & A
first operand
arma_inline arma_warn_unused eT & at(const uword i)
linear element accessor (treats the matrix as a vector); no bounds check.
const T2 & B
second operand
#define arma_extra_debug_sigprint
arma_inline arma_warn_unused bool is_empty() const
returns true if the matrix has no elements