Row_meat.hpp
Go to the documentation of this file.
1 // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
2 // Copyright (C) 2008-2011 Conrad Sanderson
3 //
4 // This file is part of the Armadillo C++ library.
5 // It is provided without any warranty of fitness
6 // for any purpose. You can redistribute this file
7 // and/or modify it under the terms of the GNU
8 // Lesser General Public License (LGPL) as published
9 // by the Free Software Foundation, either version 3
10 // of the License or (at your option) any later version.
11 // (see http://www.opensource.org/licenses for more info)
12 
13 
16 
17 
19 template<typename eT>
20 inline
22  : Mat<eT>(1, 0)
23  {
25 
27  }
28 
29 
30 
31 template<typename eT>
32 inline
34  : Mat<eT>(1, X.n_elem)
35  {
37 
39 
40  arrayops::copy((*this).memptr(), X.memptr(), X.n_elem);
41  }
42 
43 
44 
46 template<typename eT>
47 inline
48 Row<eT>::Row(const uword in_n_elem)
49  : Mat<eT>(1, in_n_elem)
50  {
52 
54  }
55 
56 
57 
58 template<typename eT>
59 inline
60 Row<eT>::Row(const uword in_n_rows, const uword in_n_cols)
61  {
63 
65 
66  Mat<eT>::init_warm(in_n_rows, in_n_cols);
67  }
68 
69 
70 
71 template<typename eT>
72 inline
73 Row<eT>::Row(const char* text)
74  {
76 
78 
79  Mat<eT>::operator=(text);
80  }
81 
82 
83 
84 template<typename eT>
85 inline
86 const Row<eT>&
87 Row<eT>::operator=(const char* text)
88  {
90 
91  Mat<eT>::operator=(text);
92 
93  return *this;
94  }
95 
96 
97 
98 template<typename eT>
99 inline
100 Row<eT>::Row(const std::string& text)
101  {
103 
105 
106  Mat<eT>::operator=(text);
107  }
108 
109 
110 
111 template<typename eT>
112 inline
113 const Row<eT>&
114 Row<eT>::operator=(const std::string& text)
115  {
117 
118  Mat<eT>::operator=(text);
119 
120  return *this;
121  }
122 
123 
124 
125 #if defined(ARMA_USE_CXX11)
126 
127 template<typename eT>
128 inline
129 Row<eT>::Row(const std::initializer_list<eT>& list)
130  {
132 
134 
135  Mat<eT>::operator=(list);
136  }
137 
138 
139 
140 template<typename eT>
141 inline
142 const Row<eT>&
143 Row<eT>::operator=(const std::initializer_list<eT>& list)
144  {
146 
147  Mat<eT>::operator=(list);
148 
149  return *this;
150  }
151 
152 #endif
153 
154 
155 
156 template<typename eT>
157 inline
158 const Row<eT>&
159 Row<eT>::operator=(const eT val)
160  {
162 
163  Mat<eT>::operator=(val);
164 
165  return *this;
166  }
167 
168 
169 
170 template<typename eT>
171 template<typename T1>
172 inline
174  {
176 
178 
180  }
181 
182 
183 
184 template<typename eT>
185 template<typename T1>
186 inline
187 const Row<eT>&
189  {
191 
193 
194  return *this;
195  }
196 
197 
198 
200 template<typename eT>
201 inline
202 Row<eT>::Row(eT* aux_mem, const uword aux_length, const bool copy_aux_mem, const bool strict)
203  : Mat<eT>(aux_mem, 1, aux_length, copy_aux_mem, strict)
204  {
206 
208  }
209 
210 
211 
213 template<typename eT>
214 inline
215 Row<eT>::Row(const eT* aux_mem, const uword aux_length)
216  : Mat<eT>(aux_mem, 1, aux_length)
217  {
219 
221  }
222 
223 
224 
225 template<typename eT>
226 template<typename T1, typename T2>
227 inline
229  (
230  const Base<typename Row<eT>::pod_type, T1>& A,
231  const Base<typename Row<eT>::pod_type, T2>& B
232  )
233  {
235 
237 
238  Mat<eT>::init(A,B);
239  }
240 
241 
242 
243 template<typename eT>
244 template<typename T1>
245 inline
247  {
249 
251 
253  }
254 
255 
256 
257 template<typename eT>
258 template<typename T1>
259 inline
260 const Row<eT>&
262  {
264 
266 
267  return *this;
268  }
269 
270 
271 
272 template<typename eT>
273 inline
275  {
277 
279 
281  }
282 
283 
284 
285 template<typename eT>
286 inline
287 const Row<eT>&
289  {
291 
293 
294  return *this;
295  }
296 
297 
298 
299 template<typename eT>
300 inline
302 Row<eT>::operator<<(const eT val)
303  {
304  return mat_injector< Row<eT> >(*this, val);
305  }
306 
307 
308 
309 template<typename eT>
311 eT&
312 Row<eT>::col(const uword col_num)
313  {
314  arma_debug_check( (col_num >= Mat<eT>::n_cols), "Row::col(): out of bounds" );
315 
316  return access::rw(Mat<eT>::mem[col_num]);
317  }
318 
319 
320 
321 template<typename eT>
323 eT
324 Row<eT>::col(const uword col_num) const
325  {
326  arma_debug_check( (col_num >= Mat<eT>::n_cols), "Row::col(): out of bounds" );
327 
328  return Mat<eT>::mem[col_num];
329  }
330 
331 
332 
333 template<typename eT>
336 Row<eT>::cols(const uword in_col1, const uword in_col2)
337  {
339 
340  arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= Mat<eT>::n_cols) ), "Row::cols(): indices out of bounds or incorrectly used");
341 
342  const uword subview_n_cols = in_col2 - in_col1 + 1;
343 
344  return subview_row<eT>(*this, 0, in_col1, subview_n_cols);
345  }
346 
347 
348 
349 template<typename eT>
351 const subview_row<eT>
352 Row<eT>::cols(const uword in_col1, const uword in_col2) const
353  {
355 
356  arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= Mat<eT>::n_cols) ), "Row::cols(): indices out of bounds or incorrectly used");
357 
358  const uword subview_n_cols = in_col2 - in_col1 + 1;
359 
360  return subview_row<eT>(*this, 0, in_col1, subview_n_cols);
361  }
362 
363 
364 
365 template<typename eT>
368 Row<eT>::subvec(const uword in_col1, const uword in_col2)
369  {
371 
372  arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= Mat<eT>::n_cols) ), "Row::subvec(): indices out of bounds or incorrectly used");
373 
374  const uword subview_n_cols = in_col2 - in_col1 + 1;
375 
376  return subview_row<eT>(*this, 0, in_col1, subview_n_cols);
377  }
378 
379 
380 
381 template<typename eT>
383 const subview_row<eT>
384 Row<eT>::subvec(const uword in_col1, const uword in_col2) const
385  {
387 
388  arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= Mat<eT>::n_cols) ), "Row::subvec(): indices out of bounds or incorrectly used");
389 
390  const uword subview_n_cols = in_col2 - in_col1 + 1;
391 
392  return subview_row<eT>(*this, 0, in_col1, subview_n_cols);
393  }
394 
395 
396 
397 template<typename eT>
400 Row<eT>::subvec(const span& col_span)
401  {
403 
404  const bool col_all = col_span.whole;
405 
406  const uword local_n_cols = Mat<eT>::n_cols;
407 
408  const uword in_col1 = col_all ? 0 : col_span.a;
409  const uword in_col2 = col_span.b;
410  const uword subvec_n_cols = col_all ? local_n_cols : in_col2 - in_col1 + 1;
411 
412  arma_debug_check( ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ), "Row::subvec(): indices out of bounds or incorrectly used");
413 
414  return subview_row<eT>(*this, 0, in_col1, subvec_n_cols);
415  }
416 
417 
418 
419 template<typename eT>
421 const subview_row<eT>
422 Row<eT>::subvec(const span& col_span) const
423  {
425 
426  const bool col_all = col_span.whole;
427 
428  const uword local_n_cols = Mat<eT>::n_cols;
429 
430  const uword in_col1 = col_all ? 0 : col_span.a;
431  const uword in_col2 = col_span.b;
432  const uword subvec_n_cols = col_all ? local_n_cols : in_col2 - in_col1 + 1;
433 
434  arma_debug_check( ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ), "Row::subvec(): indices out of bounds or incorrectly used");
435 
436  return subview_row<eT>(*this, 0, in_col1, subvec_n_cols);
437  }
438 
439 
440 
441 // template<typename eT>
442 // arma_inline
443 // subview_row<eT>
444 // Row<eT>::operator()(const span& col_span)
445 // {
446 // arma_extra_debug_sigprint();
447 //
448 // return subvec(col_span);
449 // }
450 //
451 //
452 //
453 // template<typename eT>
454 // arma_inline
455 // const subview_row<eT>
456 // Row<eT>::operator()(const span& col_span) const
457 // {
458 // arma_extra_debug_sigprint();
459 //
460 // return subvec(col_span);
461 // }
462 
463 
464 
466 template<typename eT>
467 inline
468 void
469 Row<eT>::shed_col(const uword col_num)
470  {
472 
473  arma_debug_check( col_num >= Mat<eT>::n_cols, "Row::shed_col(): out of bounds");
474 
475  shed_cols(col_num, col_num);
476  }
477 
478 
479 
481 template<typename eT>
482 inline
483 void
484 Row<eT>::shed_cols(const uword in_col1, const uword in_col2)
485  {
487 
489  (
490  (in_col1 > in_col2) || (in_col2 >= Mat<eT>::n_cols),
491  "Row::shed_cols(): indices out of bounds or incorrectly used"
492  );
493 
494  const uword n_keep_front = in_col1;
495  const uword n_keep_back = Mat<eT>::n_cols - (in_col2 + 1);
496 
497  Row<eT> X(n_keep_front + n_keep_back);
498 
499  eT* X_mem = X.memptr();
500  const eT* t_mem = (*this).memptr();
501 
502  if(n_keep_front > 0)
503  {
504  arrayops::copy( X_mem, t_mem, n_keep_front );
505  }
506 
507  if(n_keep_back > 0)
508  {
509  arrayops::copy( &(X_mem[n_keep_front]), &(t_mem[in_col2+1]), n_keep_back);
510  }
511 
513  }
514 
515 
516 
519 template<typename eT>
520 inline
521 void
522 Row<eT>::insert_cols(const uword col_num, const uword N, const bool set_to_zero)
523  {
525 
526  const uword t_n_cols = Mat<eT>::n_cols;
527 
528  const uword A_n_cols = col_num;
529  const uword B_n_cols = t_n_cols - col_num;
530 
531  // insertion at col_num == n_cols is in effect an append operation
532  arma_debug_check( (col_num > t_n_cols), "Row::insert_cols(): out of bounds");
533 
534  if(N > 0)
535  {
536  Row<eT> out(t_n_cols + N);
537 
538  eT* out_mem = out.memptr();
539  const eT* t_mem = (*this).memptr();
540 
541  if(A_n_cols > 0)
542  {
543  arrayops::copy( out_mem, t_mem, A_n_cols );
544  }
545 
546  if(B_n_cols > 0)
547  {
548  arrayops::copy( &(out_mem[col_num + N]), &(t_mem[col_num]), B_n_cols );
549  }
550 
551  if(set_to_zero == true)
552  {
553  arrayops::inplace_set( &(out_mem[col_num]), eT(0), N );
554  }
555 
556  Mat<eT>::steal_mem(out);
557  }
558  }
559 
560 
561 
564 template<typename eT>
565 template<typename T1>
566 inline
567 void
568 Row<eT>::insert_cols(const uword col_num, const Base<eT,T1>& X)
569  {
571 
572  Mat<eT>::insert_cols(col_num, X);
573  }
574 
575 
576 
577 template<typename eT>
578 inline
579 typename Row<eT>::row_iterator
580 Row<eT>::begin_row(const uword row_num)
581  {
583 
584  arma_debug_check( (row_num >= Mat<eT>::n_rows), "begin_row(): index out of bounds");
585 
586  return Mat<eT>::memptr();
587  }
588 
589 
590 
591 template<typename eT>
592 inline
594 Row<eT>::begin_row(const uword row_num) const
595  {
597 
598  arma_debug_check( (row_num >= Mat<eT>::n_rows), "begin_row(): index out of bounds");
599 
600  return Mat<eT>::memptr();
601  }
602 
603 
604 
605 template<typename eT>
606 inline
607 typename Row<eT>::row_iterator
608 Row<eT>::end_row(const uword row_num)
609  {
611 
612  arma_debug_check( (row_num >= Mat<eT>::n_rows), "end_row(): index out of bounds");
613 
614  return Mat<eT>::memptr() + Mat<eT>::n_cols;
615  }
616 
617 
618 
619 template<typename eT>
620 inline
622 Row<eT>::end_row(const uword row_num) const
623  {
625 
626  arma_debug_check( (row_num >= Mat<eT>::n_rows), "end_row(): index out of bounds");
627 
628  return Mat<eT>::memptr() + Mat<eT>::n_cols;
629  }
630 
631 
632 
633 template<typename eT>
634 template<uword fixed_n_elem>
636 void
638  {
640 
642  access::rw(Mat<eT>::n_cols) = fixed_n_elem;
643  access::rw(Mat<eT>::n_elem) = fixed_n_elem;
646  access::rw(Mat<eT>::mem) = (use_extra) ? mem_local_extra : Mat<eT>::mem_local;
647  }
648 
649 
650 
651 template<typename eT>
652 template<uword fixed_n_elem>
653 inline
655  {
657 
658  mem_setup();
659  }
660 
661 
662 
663 template<typename eT>
664 template<uword fixed_n_elem>
667  {
669 
670  mem_setup();
671 
672  eT* dest = (use_extra) ? mem_local_extra : Mat<eT>::mem_local;
673 
674  arrayops::copy( dest, X.mem, fixed_n_elem );
675  }
676 
677 
678 
679 template<typename eT>
680 template<uword fixed_n_elem>
683  {
685 
686  mem_setup();
687 
689  }
690 
691 
692 
693 template<typename eT>
694 template<uword fixed_n_elem>
695 template<typename T1>
698  {
700 
701  mem_setup();
702 
704  }
705 
706 
707 
708 template<typename eT>
709 template<uword fixed_n_elem>
710 template<typename T1, typename T2>
713  {
715 
716  mem_setup();
717 
718  Row<eT>::init(A,B);
719  }
720 
721 
722 
723 template<typename eT>
724 template<uword fixed_n_elem>
725 inline
726 Row<eT>::fixed<fixed_n_elem>::fixed(eT* aux_mem, const bool copy_aux_mem)
727  {
729 
731  access::rw(Mat<eT>::n_cols) = fixed_n_elem;
732  access::rw(Mat<eT>::n_elem) = fixed_n_elem;
735 
736  if(copy_aux_mem == true)
737  {
738  eT* dest = (use_extra) ? mem_local_extra : Mat<eT>::mem_local;
739 
740  access::rw(Mat<eT>::mem) = dest;
741 
742  arrayops::copy( dest, aux_mem, fixed_n_elem );
743  }
744  else
745  {
746  access::rw(Mat<eT>::mem) = aux_mem;
747  }
748  }
749 
750 
751 
752 template<typename eT>
753 template<uword fixed_n_elem>
754 inline
756  {
758 
759  mem_setup();
760 
761  arrayops::copy( const_cast<eT*>(Mat<eT>::mem), aux_mem, fixed_n_elem );
762  }
763 
764 
765 
766 template<typename eT>
767 template<uword fixed_n_elem>
768 inline
770  {
772 
773  mem_setup();
774 
775  Row<eT>::operator=(text);
776  }
777 
778 
779 
780 template<typename eT>
781 template<uword fixed_n_elem>
782 inline
783 Row<eT>::fixed<fixed_n_elem>::fixed(const std::string& text)
784  {
786 
787  mem_setup();
788 
789  Row<eT>::operator=(text);
790  }
791 
792 
793 
794 template<typename eT>
795 template<uword fixed_n_elem>
796 inline
798 Row<eT>::fixed<fixed_n_elem>::operator()(const uword row_num, const span& col_span)
799  {
801 
802  return Mat<eT>::operator()(row_num, col_span);
803  }
804 
805 
806 
807 template<typename eT>
808 template<uword fixed_n_elem>
809 template<typename T1>
810 const Row<eT>&
812  {
814 
816 
817  return *this;
818  }
819 
820 
821 
822 template<typename eT>
823 template<uword fixed_n_elem>
824 const Row<eT>&
826  {
828 
829  Row<eT>::operator=(val);
830 
831  return *this;
832  }
833 
834 
835 
836 template<typename eT>
837 template<uword fixed_n_elem>
838 const Row<eT>&
840  {
842 
843  Row<eT>::operator=(text);
844 
845  return *this;
846  }
847 
848 
849 
850 template<typename eT>
851 template<uword fixed_n_elem>
852 const Row<eT>&
854  {
856 
857  Row<eT>::operator=(text);
858 
859  return *this;
860  }
861 
862 
863 
864 template<typename eT>
865 template<uword fixed_n_elem>
866 const Row<eT>&
868  {
870 
872 
873  return *this;
874  }
875 
876 
877 
878 template<typename eT>
879 template<uword fixed_n_elem>
880 inline
881 const subview_row<eT>
882 Row<eT>::fixed<fixed_n_elem>::operator()(const uword row_num, const span& col_span) const
883  {
885 
886  return Mat<eT>::operator()(row_num, col_span);
887  }
888 
889 
890 
891 template<typename eT>
892 template<uword fixed_n_elem>
893 inline
895 Row<eT>::fixed<fixed_n_elem>::operator()(const span& row_span, const uword col_num)
896  {
898 
899  return Mat<eT>::operator()(row_span, col_num);
900  }
901 
902 
903 
904 template<typename eT>
905 template<uword fixed_n_elem>
906 inline
907 const subview_col<eT>
908 Row<eT>::fixed<fixed_n_elem>::operator()(const span& row_span, const uword col_num) const
909  {
911 
912  return Mat<eT>::operator()(row_span, col_num);
913  }
914 
915 
916 
917 template<typename eT>
918 template<uword fixed_n_elem>
919 inline
921 Row<eT>::fixed<fixed_n_elem>::operator()(const span& row_span, const span& col_span)
922  {
924 
925  return Mat<eT>::operator()(row_span, col_span);
926  }
927 
928 
929 
930 template<typename eT>
931 template<uword fixed_n_elem>
932 inline
933 const subview<eT>
934 Row<eT>::fixed<fixed_n_elem>::operator()(const span& row_span, const span& col_span) const
935  {
937 
938  return Mat<eT>::operator()(row_span, col_span);
939  }
940 
941 
942 
943 template<typename eT>
944 template<uword fixed_n_elem>
947 eT&
949  {
950  return access::rw( Mat<eT>::mem[i] );
951  }
952 
953 
954 
955 template<typename eT>
956 template<uword fixed_n_elem>
959 eT
961  {
962  return ( Mat<eT>::mem[i] );
963  }
964 
965 
966 
967 template<typename eT>
968 template<uword fixed_n_elem>
971 eT&
973  {
974  return access::rw( Mat<eT>::mem[i] );
975  }
976 
977 
978 
979 template<typename eT>
980 template<uword fixed_n_elem>
983 eT
985  {
986  return ( Mat<eT>::mem[i] );
987  }
988 
989 
990 
991 template<typename eT>
992 template<uword fixed_n_elem>
995 eT&
997  {
998  arma_debug_check( (i >= fixed_n_elem), "Row::fixed::operator(): out of bounds");
999 
1000  return access::rw( Mat<eT>::mem[i] );
1001  }
1002 
1003 
1004 
1005 template<typename eT>
1006 template<uword fixed_n_elem>
1009 eT
1011  {
1012  arma_debug_check( (i >= fixed_n_elem), "Row::fixed::operator(): out of bounds");
1013 
1014  return ( Mat<eT>::mem[i] );
1015  }
1016 
1017 
1018 
1019 template<typename eT>
1020 template<uword fixed_n_elem>
1023 eT&
1024 Row<eT>::fixed<fixed_n_elem>::at(const uword in_row, const uword in_col)
1025  {
1026  return access::rw( Mat<eT>::mem[in_col] );
1027  }
1028 
1029 
1030 
1031 template<typename eT>
1032 template<uword fixed_n_elem>
1035 eT
1036 Row<eT>::fixed<fixed_n_elem>::at(const uword in_row, const uword in_col) const
1037  {
1038  return ( Mat<eT>::mem[in_col] );
1039  }
1040 
1041 
1042 
1043 template<typename eT>
1044 template<uword fixed_n_elem>
1047 eT&
1049  {
1050  arma_debug_check( ((in_row >= 1) || (in_col >= fixed_n_elem)), "Row::fixed::operator(): out of bounds" );
1051 
1052  return access::rw( Mat<eT>::mem[in_col] );
1053  }
1054 
1055 
1056 
1057 template<typename eT>
1058 template<uword fixed_n_elem>
1061 eT
1062 Row<eT>::fixed<fixed_n_elem>::operator() (const uword in_row, const uword in_col) const
1063  {
1064  arma_debug_check( ((in_row >= 1) || (in_col >= fixed_n_elem)), "Row::fixed::operator(): out of bounds" );
1065 
1066  return ( Mat<eT>::mem[in_col] );
1067  }
1068 
1069 
1070 
1071 template<typename eT>
1072 template<uword fixed_n_elem>
1073 arma_hot
1074 inline
1075 const Row<eT>&
1077  {
1079 
1080  arrayops::inplace_set( const_cast<eT*>(Mat<eT>::mem), val, fixed_n_elem );
1081 
1082  return *this;
1083  }
1084 
1085 
1086 
1087 template<typename eT>
1088 template<uword fixed_n_elem>
1089 arma_hot
1090 inline
1091 const Row<eT>&
1093  {
1095 
1096  arrayops::inplace_set( const_cast<eT*>(Mat<eT>::mem), eT(0), fixed_n_elem );
1097 
1098  return *this;
1099  }
1100 
1101 
1102 
1103 template<typename eT>
1104 template<uword fixed_n_elem>
1105 arma_hot
1106 inline
1107 const Row<eT>&
1109  {
1111 
1112  arrayops::inplace_set( const_cast<eT*>(Mat<eT>::mem), eT(1), fixed_n_elem );
1113 
1114  return *this;
1115  }
1116 
1117 
1118 
1119 #ifdef ARMA_EXTRA_ROW_MEAT
1120  #include ARMA_INCFILE_WRAP(ARMA_EXTRA_ROW_MEAT)
1121 #endif
1122 
1123 
1124 
uword b
Definition: span.hpp:40
void shed_cols(const uword in_col1, const uword in_col2)
remove specified columns
Definition: Row_meat.hpp:484
arma_inline arma_warn_unused eT * memptr()
returns a pointer to array of eTs used by the matrix
Definition: Mat_meat.hpp:4024
bool whole
Definition: span.hpp:41
arma_hot static arma_inline void copy(eT *dest, const eT *src, const uword n_elem)
arma_inline const derived & get_ref() const
Definition: Base_meat.hpp:22
const Row & operator=(const char *text)
Definition: Row_meat.hpp:87
void steal_mem(Mat &X)
Definition: Mat_meat.hpp:630
Definition: span.hpp:35
void init_warm(uword in_rows, uword in_cols)
internal matrix construction; if the requested size is small enough, memory from the stack is used...
Definition: Mat_meat.hpp:126
const eT * const_row_iterator
Definition: Row_bones.hpp:87
void shed_col(const uword col_num)
remove specified columns
Definition: Row_meat.hpp:469
get_pod_type< eT >::result pod_type
Definition: Row_bones.hpp:25
const uword n_elem
number of elements in the matrix (read-only)
Definition: Mat_bones.hpp:31
arma_inline subview_row< eT > cols(const uword in_col1, const uword in_col2)
Definition: Row_meat.hpp:336
void insert_cols(const uword col_num, const uword N, const bool set_to_zero=true)
Definition: Mat_meat.hpp:2531
u32 uword
Definition: typedef.hpp:85
row_iterator begin_row(const uword row_num)
Definition: Row_meat.hpp:580
void init(const std::string &text)
internal function to create the matrix from a textual description
Definition: Mat_meat.hpp:318
static arma_inline T1 & rw(const T1 &x)
internal function to allow modification of data declared as read-only
Definition: access.hpp:23
#define arma_debug_check
Definition: debug.hpp:1084
const Mat & ones()
Definition: Mat_meat.hpp:4371
uword a
Definition: span.hpp:39
static arma_hot void inplace_set(eT *dest, const eT val, const uword n_elem)
arma_inline arma_warn_unused eT & at(const uword i)
linear element accessor (treats the matrix as a vector); no bounds check.
Definition: Mat_meat.hpp:3692
subview_row< eT > operator()(const uword row_num, const span &col_span)
Definition: Mat_meat.hpp:1821
#define arma_extra_debug_sigprint_this
Definition: debug.hpp:1117
arma_inline arma_warn_unused eT & operator[](const uword i)
linear element accessor (treats the matrix as a vector); no bounds check.
Definition: Mat_meat.hpp:3668
const Mat & operator=(const char *text)
create the matrix from a textual description
Definition: Mat_meat.hpp:272
row_iterator end_row(const uword row_num)
Definition: Row_meat.hpp:608
Class for row vectors (matrices with only one row)
void insert_cols(const uword col_num, const uword N, const bool set_to_zero=true)
Definition: Row_meat.hpp:522
mat_injector< Row > operator<<(const eT val)
Definition: Row_meat.hpp:302
#define arma_extra_debug_sigprint
Definition: debug.hpp:1116
arma_inline eT & col(const uword col_num)
Definition: Row_meat.hpp:312
Analog of the Base class, intended for cubes.
#define arma_warn_unused
Dense matrix class.
#define arma_inline
arma_inline subview_row< eT > subvec(const uword in_col1, const uword in_col2)
Definition: Row_meat.hpp:368
eT * row_iterator
Definition: Row_bones.hpp:86
const Mat & zeros()
Definition: Mat_meat.hpp:4331
Row()
construct an empty row vector
Definition: Row_meat.hpp:21
arma_aligned const eT *const mem
pointer to the memory used by the matrix (memory is read-only)
Definition: Mat_bones.hpp:40
#define arma_hot
arma_hot const Mat & fill(const eT val)
fill the matrix with the specified value
Definition: Mat_meat.hpp:4317


armadillo_matrix
Author(s):
autogenerated on Fri Apr 16 2021 02:31:58