21 template<
typename out_eT>
26 template<
typename in_eT,
typename T1>
29 template<
typename in_eT,
typename T1>
32 template<
typename in_eT,
typename T1>
35 template<
typename in_eT,
typename T1>
41 template<
typename out_eT>
42 template<
typename in_eT,
typename T1>
56 arma_debug_check( (X.n_elem != 1),
"conv_to(): given object doesn't have exactly one element" );
58 return out_eT(X.mem[0]);
63 template<
typename out_eT>
64 template<
typename in_eT,
typename T1>
78 arma_debug_check( (X.n_elem != 1),
"conv_to(): given object doesn't have exactly one element" );
89 template<
typename out_eT>
90 template<
typename in_eT,
typename T1>
104 arma_debug_check( (X.n_elem != 1),
"conv_to(): given object doesn't have exactly one element" );
106 return out_eT(X.mem[0]);
111 template<
typename out_eT>
112 template<
typename in_eT,
typename T1>
126 arma_debug_check( (X.n_elem != 1),
"conv_to(): given object doesn't have exactly one element" );
139 template<
typename out_eT>
144 template<
typename in_eT,
typename T1>
147 template<
typename in_eT,
typename T1>
152 template<
typename in_eT>
155 template<
typename in_eT>
160 template<
typename in_eT>
163 template<
typename in_eT>
168 template<
typename in_eT>
171 template<
typename in_eT>
177 template<
typename out_eT>
178 template<
typename in_eT,
typename T1>
199 template<
typename out_eT>
200 template<
typename in_eT,
typename T1>
221 template<
typename out_eT>
222 template<
typename in_eT>
233 typename std::vector<in_eT>::const_iterator in_begin = in.
begin();
234 typename std::vector<in_eT>::const_iterator in_end = in.end();
239 typename std::vector<in_eT>::const_iterator in_it;
242 for(in_it = in_begin, out_it = out_begin; (in_it != in_end) && (out_it != out_end); ++in_it, ++out_it)
244 (*out_it) = out_eT(*in_it);
252 template<
typename out_eT>
253 template<
typename in_eT>
264 typename std::vector<in_eT>::const_iterator in_begin = in.
begin();
265 typename std::vector<in_eT>::const_iterator in_end = in.end();
270 typename std::vector<in_eT>::const_iterator in_it;
273 for(in_it = in_begin, out_it = out_begin; (in_it != in_end) && (out_it != out_end); ++in_it, ++out_it)
275 out_eT& out_elem = (*out_it);
276 const in_eT& in_elem = (*in_it);
286 template<
typename out_eT>
287 template<
typename in_eT>
305 template<
typename out_eT>
306 template<
typename in_eT>
324 template<
typename out_eT>
325 template<
typename in_eT>
343 template<
typename out_eT>
344 template<
typename in_eT>
364 template<
typename out_eT>
369 template<
typename in_eT,
typename T1>
372 template<
typename in_eT,
typename T1>
377 template<
typename in_eT>
380 template<
typename in_eT>
385 template<
typename in_eT>
388 template<
typename in_eT>
393 template<
typename in_eT>
396 template<
typename in_eT>
402 template<
typename out_eT>
403 template<
typename in_eT,
typename T1>
415 arma_debug_check( (X.is_vec() ==
false),
"conv_to(): given object can't be interpreted as a vector" );
426 template<
typename out_eT>
427 template<
typename in_eT,
typename T1>
439 arma_debug_check( (X.is_vec() ==
false),
"conv_to(): given object can't be interpreted as a vector" );
450 template<
typename out_eT>
451 template<
typename in_eT>
462 typename std::vector<in_eT>::const_iterator in_begin = in.
begin();
463 typename std::vector<in_eT>::const_iterator in_end = in.end();
468 typename std::vector<in_eT>::const_iterator in_it;
471 for(in_it = in_begin, out_it = out_begin; (in_it != in_end) && (out_it != out_end); ++in_it, ++out_it)
473 (*out_it) = out_eT(*in_it);
481 template<
typename out_eT>
482 template<
typename in_eT>
493 typename std::vector<in_eT>::const_iterator in_begin = in.
begin();
494 typename std::vector<in_eT>::const_iterator in_end = in.end();
499 typename std::vector<in_eT>::const_iterator in_it;
502 for(in_it = in_begin, out_it = out_begin; (in_it != in_end) && (out_it != out_end); ++in_it, ++out_it)
504 out_eT& out_elem = (*out_it);
505 const in_eT& in_elem = (*in_it);
515 template<
typename out_eT>
516 template<
typename in_eT>
525 const bool is_vec = ( (in.
rows() == 1) || (in.
cols() == 1) );
527 arma_debug_check( (is_vec ==
false),
"conv_to(): given object can't be interpreted as a vector" );
538 template<
typename out_eT>
539 template<
typename in_eT>
559 template<
typename out_eT>
560 template<
typename in_eT>
578 template<
typename out_eT>
579 template<
typename in_eT>
599 template<
typename out_eT>
604 template<
typename in_eT,
typename T1>
607 template<
typename in_eT,
typename T1>
612 template<
typename in_eT>
615 template<
typename in_eT>
620 template<
typename in_eT>
623 template<
typename in_eT>
628 template<
typename in_eT>
631 template<
typename in_eT>
637 template<
typename out_eT>
638 template<
typename in_eT,
typename T1>
650 arma_debug_check( (X.is_vec() ==
false),
"conv_to(): given object can't be interpreted as a vector" );
661 template<
typename out_eT>
662 template<
typename in_eT,
typename T1>
674 arma_debug_check( (X.is_vec() ==
false),
"conv_to(): given object can't be interpreted as a vector" );
685 template<
typename out_eT>
686 template<
typename in_eT>
697 typename std::vector<in_eT>::const_iterator in_begin = in.
begin();
698 typename std::vector<in_eT>::const_iterator in_end = in.end();
703 typename std::vector<in_eT>::const_iterator in_it;
706 for(in_it = in_begin, out_it = out_begin; (in_it != in_end) && (out_it != out_end); ++in_it, ++out_it)
708 (*out_it) = out_eT(*in_it);
716 template<
typename out_eT>
717 template<
typename in_eT>
728 typename std::vector<in_eT>::const_iterator in_begin = in.
begin();
729 typename std::vector<in_eT>::const_iterator in_end = in.end();
734 typename std::vector<in_eT>::const_iterator in_it;
737 for(in_it = in_begin, out_it = out_begin; (in_it != in_end) && (out_it != out_end); ++in_it, ++out_it)
739 out_eT& out_elem = (*out_it);
740 const in_eT& in_elem = (*in_it);
750 template<
typename out_eT>
751 template<
typename in_eT>
760 const bool is_vec = ( (in.
rows() == 1) || (in.
cols() == 1) );
762 arma_debug_check( (is_vec ==
false),
"conv_to(): given object can't be interpreted as a vector" );
773 template<
typename out_eT>
774 template<
typename in_eT>
794 template<
typename out_eT>
795 template<
typename in_eT>
813 template<
typename out_eT>
814 template<
typename in_eT>
833 template<
typename out_eT>
838 template<
typename in_eT,
typename T1>
841 template<
typename in_eT,
typename T1>
847 template<
typename out_eT>
848 template<
typename in_eT,
typename T1>
869 template<
typename out_eT>
870 template<
typename in_eT,
typename T1>
892 template<
typename out_eT>
897 template<
typename in_eT,
typename T1>
900 template<
typename in_eT,
typename T1>
906 template<
typename out_eT>
907 template<
typename in_eT,
typename T1>
919 arma_debug_check( (X.is_vec() ==
false),
"conv_to(): given object can't be interpreted as a vector" );
921 std::vector<out_eT> out(X.n_elem);
926 typename std::vector<out_eT>::iterator out_begin = out.begin();
927 typename std::vector<out_eT>::iterator out_end = out.end();
930 typename std::vector<out_eT>::iterator out_it;
932 for(X_it = X_begin, out_it = out_begin; (X_it != X_end) && (out_it != out_end); ++X_it, ++out_it)
934 (*out_it) = out_eT(*X_it);
942 template<
typename out_eT>
943 template<
typename in_eT,
typename T1>
955 arma_debug_check( (X.is_vec() ==
false),
"conv_to(): given object can't be interpreted as a vector" );
957 std::vector<out_eT> out(X.n_elem);
962 typename std::vector<out_eT>::iterator out_begin = out.begin();
963 typename std::vector<out_eT>::iterator out_end = out.end();
966 typename std::vector<out_eT>::iterator out_it;
968 for(X_it = X_begin, out_it = out_begin; (X_it != X_end) && (out_it != out_end); ++X_it, ++out_it)
970 out_eT& out_elem = (*out_it);
971 const in_eT& X_elem = (*X_it);
982 template<
typename out_eT>
987 template<
typename in_eT,
typename T1>
990 template<
typename in_eT,
typename T1>
996 template<
typename out_eT>
997 template<
typename in_eT,
typename T1>
1018 template<
typename out_eT>
1019 template<
typename in_eT,
typename T1>
1042 template<
typename out_eT>
1047 template<
typename in_eT,
typename T1>
1050 template<
typename in_eT,
typename T1>
1056 template<
typename out_eT>
1057 template<
typename in_eT,
typename T1>
1069 arma_debug_check( (X.is_vec() ==
false),
"conv_to(): given object can't be interpreted as a vector" );
1080 template<
typename out_eT>
1081 template<
typename in_eT,
typename T1>
arma_inline arma_warn_unused eT * memptr()
returns a pointer to array of eTs used by the matrix
static out_eT from(const Base< in_eT, T1 > &in, const typename arma_not_cx< in_eT >::result *junk=0)
arma_inline const derived & get_ref() const
arma_hot static arma_inline void convert_cx_scalar(out_eT &out, const in_eT &in, const typename arma_not_cx< out_eT >::result *junk1=0, const typename arma_not_cx< in_eT >::result *junk2=0)
dummy itpp::Mat class, to prevent compilation errors
const uword n_elem
number of elements in the matrix (read-only)
#define arma_type_check(condition)
Class for column vectors (matrices with only one column)
arma_inline arma_warn_unused eT * memptr()
returns a pointer to array of eTs used by the cube
static arma_hot void convert_cx(out_eT *dest, const in_eT *src, const uword n_elem)
#define arma_ignore(variable)
static arma_hot void convert(out_eT *dest, const in_eT *src, const uword n_elem)
Class for row vectors (matrices with only one row)
#define arma_extra_debug_sigprint
const eT * const_iterator
Analog of the Base class, intended for cubes.
const uword n_elem
number of elements in the cube (read-only)
dummy itpp::Vec class, to prevent compilation errors
arma_inline const derived & get_ref() const