26 typedef typename T1::elem_type eT;
31 out.
set_size(Y.get_n_rows(), Y.get_n_cols());
34 ea_type A = Y.get_ea();
40 for(i=0, j=1; j<n_elem; i+=2, j+=2)
42 out_mem[i] = (val < A[i]) ?
uword(1) :
uword(0);
43 out_mem[j] = (val < A[j]) ?
uword(1) :
uword(0);
48 out_mem[i] = (val < A[i]) ?
uword(1) :
uword(0);
61 typedef typename T1::elem_type eT;
66 out.
set_size(Y.get_n_rows(), Y.get_n_cols());
69 ea_type A = Y.get_ea();
75 for(i=0, j=1; j<n_elem; i+=2, j+=2)
77 out_mem[i] = (A[i] < val) ?
uword(1) :
uword(0);
78 out_mem[j] = (A[j] < val) ?
uword(1) :
uword(0);
83 out_mem[i] = (A[i] < val) ?
uword(1) :
uword(0);
96 typedef typename T1::elem_type eT;
101 out.
set_size(Y.get_n_rows(), Y.get_n_cols());
103 const eT val = X.
aux;
104 ea_type A = Y.get_ea();
110 for(i=0, j=1; j<n_elem; i+=2, j+=2)
112 out_mem[i] = (val > A[i]) ?
uword(1) :
uword(0);
113 out_mem[j] = (val > A[j]) ?
uword(1) :
uword(0);
118 out_mem[i] = (val > A[i]) ?
uword(1) :
uword(0);
124 template<
typename T1>
131 typedef typename T1::elem_type eT;
136 out.
set_size(Y.get_n_rows(), Y.get_n_cols());
138 const eT val = X.
aux;
139 ea_type A = Y.get_ea();
145 for(i=0, j=1; j<n_elem; i+=2, j+=2)
147 out_mem[i] = (A[i] > val) ?
uword(1) :
uword(0);
148 out_mem[j] = (A[j] > val) ?
uword(1) :
uword(0);
153 out_mem[i] = (A[i] > val) ?
uword(1) :
uword(0);
159 template<
typename T1>
166 typedef typename T1::elem_type eT;
171 out.
set_size(Y.get_n_rows(), Y.get_n_cols());
173 const eT val = X.
aux;
174 ea_type A = Y.get_ea();
180 for(i=0, j=1; j<n_elem; i+=2, j+=2)
182 out_mem[i] = (val <= A[i]) ?
uword(1) :
uword(0);
183 out_mem[j] = (val <= A[j]) ?
uword(1) :
uword(0);
188 out_mem[i] = (val <= A[i]) ?
uword(1) :
uword(0);
194 template<
typename T1>
201 typedef typename T1::elem_type eT;
206 out.
set_size(Y.get_n_rows(), Y.get_n_cols());
208 const eT val = X.
aux;
209 ea_type A = Y.get_ea();
215 for(i=0, j=1; j<n_elem; i+=2, j+=2)
217 out_mem[i] = (A[i] <= val) ?
uword(1) :
uword(0);
218 out_mem[j] = (A[j] <= val) ?
uword(1) :
uword(0);
223 out_mem[i] = (A[i] <= val) ?
uword(1) :
uword(0);
229 template<
typename T1>
236 typedef typename T1::elem_type eT;
241 out.
set_size(Y.get_n_rows(), Y.get_n_cols());
243 const eT val = X.
aux;
244 ea_type A = Y.get_ea();
250 for(i=0, j=1; j<n_elem; i+=2, j+=2)
252 out_mem[i] = (val >= A[i]) ?
uword(1) :
uword(0);
253 out_mem[j] = (val >= A[j]) ?
uword(1) :
uword(0);
258 out_mem[i] = (val >= A[i]) ?
uword(1) :
uword(0);
264 template<
typename T1>
271 typedef typename T1::elem_type eT;
276 out.
set_size(Y.get_n_rows(), Y.get_n_cols());
278 const eT val = X.
aux;
279 ea_type A = Y.get_ea();
285 for(i=0, j=1; j<n_elem; i+=2, j+=2)
287 out_mem[i] = (A[i] >= val) ?
uword(1) :
uword(0);
288 out_mem[j] = (A[j] >= val) ?
uword(1) :
uword(0);
293 out_mem[i] = (A[i] >= val) ?
uword(1) :
uword(0);
299 template<
typename T1>
306 typedef typename T1::elem_type eT;
311 out.
set_size(Y.get_n_rows(), Y.get_n_cols());
313 const eT val = X.
aux;
314 ea_type A = Y.get_ea();
320 for(i=0, j=1; j<n_elem; i+=2, j+=2)
322 out_mem[i] = (A[i] == val) ?
uword(1) :
uword(0);
323 out_mem[j] = (A[j] == val) ?
uword(1) :
uword(0);
328 out_mem[i] = (A[i] == val) ?
uword(1) :
uword(0);
334 template<
typename T1>
341 typedef typename T1::elem_type eT;
346 out.
set_size(Y.get_n_rows(), Y.get_n_cols());
348 const eT val = X.
aux;
349 ea_type A = Y.get_ea();
355 for(i=0, j=1; j<n_elem; i+=2, j+=2)
357 out_mem[i] = (A[i] != val) ?
uword(1) :
uword(0);
358 out_mem[j] = (A[j] != val) ?
uword(1) :
uword(0);
363 out_mem[i] = (A[i] != val) ?
uword(1) :
uword(0);
375 template<
typename T1>
382 typedef typename T1::elem_type eT;
387 out.
set_size(Y.get_n_rows(), Y.get_n_cols(), Y.get_n_slices());
389 const eT val = X.
aux;
390 ea_type A = Y.get_ea();
396 for(i=0, j=1; j<n_elem; i+=2, j+=2)
398 out_mem[i] = (val < A[i]) ?
uword(1) :
uword(0);
399 out_mem[j] = (val < A[j]) ?
uword(1) :
uword(0);
404 out_mem[i] = (val < A[i]) ?
uword(1) :
uword(0);
410 template<
typename T1>
417 typedef typename T1::elem_type eT;
422 out.
set_size(Y.get_n_rows(), Y.get_n_cols(), Y.get_n_slices());
424 const eT val = X.
aux;
425 ea_type A = Y.get_ea();
431 for(i=0, j=1; j<n_elem; i+=2, j+=2)
433 out_mem[i] = (A[i] < val) ?
uword(1) :
uword(0);
434 out_mem[j] = (A[j] < val) ?
uword(1) :
uword(0);
439 out_mem[i] = (A[i] < val) ?
uword(1) :
uword(0);
445 template<
typename T1>
452 typedef typename T1::elem_type eT;
457 out.
set_size(Y.get_n_rows(), Y.get_n_cols(), Y.get_n_slices());
459 const eT val = X.
aux;
460 ea_type A = Y.get_ea();
466 for(i=0, j=1; j<n_elem; i+=2, j+=2)
468 out_mem[i] = (val > A[i]) ?
uword(1) :
uword(0);
469 out_mem[j] = (val > A[j]) ?
uword(1) :
uword(0);
474 out_mem[i] = (val > A[i]) ?
uword(1) :
uword(0);
480 template<
typename T1>
487 typedef typename T1::elem_type eT;
492 out.
set_size(Y.get_n_rows(), Y.get_n_cols(), Y.get_n_slices());
494 const eT val = X.
aux;
495 ea_type A = Y.get_ea();
501 for(i=0, j=1; j<n_elem; i+=2, j+=2)
503 out_mem[i] = (A[i] > val) ?
uword(1) :
uword(0);
504 out_mem[j] = (A[j] > val) ?
uword(1) :
uword(0);
509 out_mem[i] = (A[i] > val) ?
uword(1) :
uword(0);
515 template<
typename T1>
522 typedef typename T1::elem_type eT;
527 out.
set_size(Y.get_n_rows(), Y.get_n_cols(), Y.get_n_slices());
529 const eT val = X.
aux;
530 ea_type A = Y.get_ea();
536 for(i=0, j=1; j<n_elem; i+=2, j+=2)
538 out_mem[i] = (val <= A[i]) ?
uword(1) :
uword(0);
539 out_mem[j] = (val <= A[j]) ?
uword(1) :
uword(0);
544 out_mem[i] = (val <= A[i]) ?
uword(1) :
uword(0);
550 template<
typename T1>
557 typedef typename T1::elem_type eT;
562 out.
set_size(Y.get_n_rows(), Y.get_n_cols(), Y.get_n_slices());
564 const eT val = X.
aux;
565 ea_type A = Y.get_ea();
571 for(i=0, j=1; j<n_elem; i+=2, j+=2)
573 out_mem[i] = (A[i] <= val) ?
uword(1) :
uword(0);
574 out_mem[j] = (A[j] <= val) ?
uword(1) :
uword(0);
579 out_mem[i] = (A[i] <= val) ?
uword(1) :
uword(0);
585 template<
typename T1>
592 typedef typename T1::elem_type eT;
597 out.
set_size(Y.get_n_rows(), Y.get_n_cols(), Y.get_n_slices());
599 const eT val = X.
aux;
600 ea_type A = Y.get_ea();
606 for(i=0, j=1; j<n_elem; i+=2, j+=2)
608 out_mem[i] = (val >= A[i]) ?
uword(1) :
uword(0);
609 out_mem[j] = (val >= A[j]) ?
uword(1) :
uword(0);
614 out_mem[i] = (val >= A[i]) ?
uword(1) :
uword(0);
620 template<
typename T1>
627 typedef typename T1::elem_type eT;
632 out.
set_size(Y.get_n_rows(), Y.get_n_cols(), Y.get_n_slices());
634 const eT val = X.
aux;
635 ea_type A = Y.get_ea();
641 for(i=0, j=1; j<n_elem; i+=2, j+=2)
643 out_mem[i] = (A[i] >= val) ?
uword(1) :
uword(0);
644 out_mem[j] = (A[j] >= val) ?
uword(1) :
uword(0);
649 out_mem[i] = (A[i] >= val) ?
uword(1) :
uword(0);
655 template<
typename T1>
662 typedef typename T1::elem_type eT;
667 out.
set_size(Y.get_n_rows(), Y.get_n_cols(), Y.get_n_slices());
669 const eT val = X.
aux;
670 ea_type A = Y.get_ea();
676 for(i=0, j=1; j<n_elem; i+=2, j+=2)
678 out_mem[i] = (A[i] == val) ?
uword(1) :
uword(0);
679 out_mem[j] = (A[j] == val) ?
uword(1) :
uword(0);
684 out_mem[i] = (A[i] == val) ?
uword(1) :
uword(0);
690 template<
typename T1>
697 typedef typename T1::elem_type eT;
702 out.
set_size(Y.get_n_rows(), Y.get_n_cols(), Y.get_n_slices());
704 const eT val = X.
aux;
705 ea_type A = Y.get_ea();
711 for(i=0, j=1; j<n_elem; i+=2, j+=2)
713 out_mem[i] = (A[i] != val) ?
uword(1) :
uword(0);
714 out_mem[j] = (A[j] != val) ?
uword(1) :
uword(0);
719 out_mem[i] = (A[i] != val) ?
uword(1) :
uword(0);
arma_inline arma_warn_unused eT * memptr()
returns a pointer to array of eTs used by the matrix
arma_aligned in_eT aux
storage of auxiliary data, using the element type as used by T1
static void apply(Mat< uword > &out, const mtOp< uword, T1, op_rel_gt_pre > &X)
void set_size(const uword in_elem)
change the matrix to have user specified dimensions (data is not preserved)
arma_aligned const T1 & m
storage of reference to the operand (eg. a matrix)
arma_aligned in_eT aux
storage of auxiliary data, using the element type as used by T1
void set_size(const uword in_rows, const uword in_cols, const uword in_slices)
change the cube to have user specified dimensions (data is not preserved)
const uword n_elem
number of elements in the matrix (read-only)
static void apply(Mat< uword > &out, const mtOp< uword, T1, op_rel_gt_post > &X)
static void apply(Mat< uword > &out, const mtOp< uword, T1, op_rel_lt_pre > &X)
arma_inline arma_warn_unused eT * memptr()
returns a pointer to array of eTs used by the cube
static void apply(Mat< uword > &out, const mtOp< uword, T1, op_rel_gteq_pre > &X)
#define arma_extra_debug_sigprint
static void apply(Mat< uword > &out, const mtOp< uword, T1, op_rel_gteq_post > &X)
const uword n_elem
number of elements in the cube (read-only)
static void apply(Mat< uword > &out, const mtOp< uword, T1, op_rel_lteq_pre > &X)
static void apply(Mat< uword > &out, const mtOp< uword, T1, op_rel_noteq > &X)
static void apply(Mat< uword > &out, const mtOp< uword, T1, op_rel_lt_post > &X)
static void apply(Mat< uword > &out, const mtOp< uword, T1, op_rel_eq > &X)
arma_aligned const T1 & m
storage of reference to the operand (eg. a matrix)
static void apply(Mat< uword > &out, const mtOp< uword, T1, op_rel_lteq_post > &X)