Mercurial > hg > octave-nkf
diff liboctave/idx-vector.cc @ 8972:5fa53d1b6247
more indexing optimizations
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Fri, 13 Mar 2009 13:39:22 +0100 |
parents | eb63fbe60fab |
children | 7e31df9a0334 |
line wrap: on
line diff
--- a/liboctave/idx-vector.cc +++ b/liboctave/idx-vector.cc @@ -416,6 +416,16 @@ return true; } + // Possibly skip singleton dims. + if (n == 1 && rep->is_colon_equiv (n)) + { + *this = j; + return true; + } + + if (nj == 1 && j.is_colon_equiv (nj)) + return true; + switch (j.idx_class ()) { case class_colon: