int MinID () const { TYPE m = data[0]; int ix=0; for ( int i=1; i<N; ++i ) if ( m > data[i] ) { m = data[i]; ix = i; } return m; }
int MaxID () const { TYPE m = data[0]; int ix=0; for ( int i=1; i<N; ++i ) if ( m < data[i] ) { m = data[i]; ix = i; } return m; }
Should these two functions return ix instead of return m? Otherwise, it will be the same function as Min/Max in the header file.
Should these two functions
return ix
instead ofreturn m
? Otherwise, it will be the same function asMin/Max
in the header file.