comparison liboctave/mx-inlines.cc @ 4758:a308566c8b42

[project @ 2004-02-13 23:01:34 by jwe]
author jwe
date Fri, 13 Feb 2004 23:01:34 +0000
parents 4302ab3fefd7
children bec345670e56
comparison
equal deleted inserted replaced
4757:c48180a45d34 4758:a308566c8b42
605 increment_index (iter_idx, dv); \ 605 increment_index (iter_idx, dv); \
606 } \ 606 } \
607 \ 607 \
608 return retval 608 return retval
609 609
610 #define MX_ND_CAT \
611 bool retval = false;\
612 \
613 dim_vector dv = dims (); \
614 \
615 Array<int> ra_idx (dv.length (), 0); \
616 \
617 for (int i = 0; i < length (); i++) \
618 { \
619 if (i != 0) \
620 increment_index (ra_idx, dv, 0); \
621 \
622 Array<int> ra_idx2 = ra_idx; \
623 \
624 if (dim >= ra_idx2.length ()) \
625 { \
626 ra_idx2.resize_and_fill (dim + 1, 0); \
627 \
628 retval = true; \
629 } \
630 \
631 ra_idx2.elem (dim) = ra_idx2.elem (dim) + add_dim; \
632 \
633 cat_arr.elem (ra_idx2) = elem (ra_idx); \
634 } \
635 \
636 return retval
637
610 #endif 638 #endif
611 639
612 /* 640 /*
613 ;;; Local Variables: *** 641 ;;; Local Variables: ***
614 ;;; mode: C++ *** 642 ;;; mode: C++ ***