Mercurial > hg > octave-terminal
changeset 209:5869adaa6aea
[project @ 1993-11-12 10:44:40 by jwe]
author | jwe |
---|---|
date | Fri, 12 Nov 1993 10:44:40 +0000 |
parents | 380cb9ccc889 |
children | 7947b7a6b6da |
files | liboctave/idx-vector.cc |
diffstat | 1 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/idx-vector.cc +++ b/liboctave/idx-vector.cc @@ -26,6 +26,7 @@ #endif #include <iostream.h> +#include <stdlib.h> #include "Matrix.h" #include "Range.h" @@ -263,6 +264,19 @@ } } +static inline int +intcmp (int *i, int *j) +{ + return (*i - *j); +} + +void +idx_vector::sort (void) +{ + qsort ((void *) data, len, sizeof (int), + (int (*)(void*, void*)) intcmp); +} + ostream& operator << (ostream& os, const idx_vector& a) {