Mercurial > hg > octave-terminal
changeset 10418:6c19d6fcd7e5
up to 7th-order dim_vector constructors
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Wed, 17 Mar 2010 08:46:46 +0100 |
parents | ad29dbbc3f70 |
children | afe44ee90cbd |
files | liboctave/ChangeLog liboctave/dim-vector.h |
diffstat | 2 files changed, 53 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,7 @@ +2010-03-17 Jaroslav Hajek <highegg@gmail.com> + + * dim-vector.h: Provide constructors up to order 7. + 2010-03-16 Jaroslav Hajek <highegg@gmail.com> * lo-specfun.cc: Substitute cbrt and cbrtf if needed.
--- a/liboctave/dim-vector.h +++ b/liboctave/dim-vector.h @@ -140,14 +140,14 @@ rep[1] = 1; } - explicit dim_vector (octave_idx_type r, octave_idx_type c) + dim_vector (octave_idx_type r, octave_idx_type c) : rep (newrep (2)) { rep[0] = r; rep[1] = c; } - explicit dim_vector (octave_idx_type r, octave_idx_type c, octave_idx_type p) + dim_vector (octave_idx_type r, octave_idx_type c, octave_idx_type p) : rep (newrep (3)) { rep[0] = r; @@ -155,6 +155,53 @@ rep[2] = p; } + dim_vector (octave_idx_type r, octave_idx_type c, octave_idx_type p, + octave_idx_type q) + : rep (newrep (4)) + { + rep[0] = r; + rep[1] = c; + rep[2] = p; + rep[3] = q; + } + + dim_vector (octave_idx_type r, octave_idx_type c, octave_idx_type p, + octave_idx_type q, octave_idx_type s) + : rep (newrep (5)) + { + rep[0] = r; + rep[1] = c; + rep[2] = p; + rep[3] = q; + rep[4] = s; + } + + dim_vector (octave_idx_type r, octave_idx_type c, octave_idx_type p, + octave_idx_type q, octave_idx_type s, octave_idx_type t) + : rep (newrep (6)) + { + rep[0] = r; + rep[1] = c; + rep[2] = p; + rep[3] = q; + rep[4] = s; + rep[5] = t; + } + + dim_vector (octave_idx_type r, octave_idx_type c, octave_idx_type p, + octave_idx_type q, octave_idx_type s, octave_idx_type t, + octave_idx_type u) + : rep (newrep (7)) + { + rep[0] = r; + rep[1] = c; + rep[2] = p; + rep[3] = q; + rep[4] = s; + rep[5] = t; + rep[6] = u; + } + dim_vector (const octave_idx_type *vec, size_t vec_size) : rep (newrep (vec_size)) {