comparison 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
comparison
equal deleted inserted replaced
8971:967a692ddfe2 8972:5fa53d1b6247
413 if (rep->length (n) == 0) 413 if (rep->length (n) == 0)
414 { 414 {
415 *this = idx_vector (); 415 *this = idx_vector ();
416 return true; 416 return true;
417 } 417 }
418
419 // Possibly skip singleton dims.
420 if (n == 1 && rep->is_colon_equiv (n))
421 {
422 *this = j;
423 return true;
424 }
425
426 if (nj == 1 && j.is_colon_equiv (nj))
427 return true;
418 428
419 switch (j.idx_class ()) 429 switch (j.idx_class ())
420 { 430 {
421 case class_colon: 431 case class_colon:
422 if (rep->is_colon_equiv (n)) 432 if (rep->is_colon_equiv (n))