comparison liboctave/Array-util.cc @ 5607:4b33d802ef3c

[project @ 2006-02-08 18:56:54 by jwe]
author jwe
date Wed, 08 Feb 2006 18:56:54 +0000
parents 20b20fd070b0
children ace8d8d26933
comparison
equal deleted inserted replaced
5606:70ef31ebe156 5607:4b33d802ef3c
449 } 449 }
450 450
451 return retval; 451 return retval;
452 } 452 }
453 453
454 Array<octave_idx_type>
455 calc_permutated_idx (const Array<octave_idx_type>& old_idx,
456 const Array<octave_idx_type>& perm_vec, bool inv)
457 {
458 octave_idx_type n_el = old_idx.length ();
459
460 Array<octave_idx_type> retval (n_el);
461
462 for (octave_idx_type i = 0; i < n_el; i++)
463 {
464 if (inv)
465 retval(perm_vec(i)) = old_idx(i);
466 else
467 retval(i) = old_idx(perm_vec(i));
468 }
469
470 return retval;
471 }
472
473 void 454 void
474 gripe_nonconformant (const char *op, int op1_len, int op2_len) 455 gripe_nonconformant (const char *op, int op1_len, int op2_len)
475 { 456 {
476 (*current_liboctave_error_handler) 457 (*current_liboctave_error_handler)
477 ("%s: nonconformant arguments (op1 len: %d, op2 len: %d)", 458 ("%s: nonconformant arguments (op1 len: %d, op2 len: %d)",