34 double *min,
double *max,
double *list,
37 register double lo, hi, val;
46 for (i = 0; i < n; i++) {
47 if ((val = list[i]) < lo)
73 double *min,
double *max,
double *list,
74 int64_t n, int32_t reset) {
76 register double lo, hi, val;
91 for (i = 0; i < n; i++) {
92 if ((val = list[i]) < lo)
117 int64_t *imin, int64_t *imax,
double *list, int64_t n) {
119 register double lo, hi, val;
130 for (i = 0; i < n; i++) {
131 if ((val = list[i]) < lo) {
161 int64_t *imin, int64_t *imax,
long *list, int64_t n) {
163 register long lo, hi, val;
174 for (i = 0; i < n; i++) {
175 if ((val = list[i]) < lo) {
197int assign_min_max(
double *min,
double *max,
double val) {
219int find_min_max_2d(
double *min,
double *max,
double **value,
221 double data, rmin, rmax, *value_i1;
224 if (!n1 || !n2 || !min || !max || !value)
229 for (i1 = 0; i1 < n1; i1++) {
230 if (!(value_i1 = value[i1]))
232 for (i2 = 0; i2 < n2; i2++) {
233 if ((data = value_i1[i2]) > rmax)
247int find_min_max_2d_float(
float *min,
float *max,
float **value,
249 float data, rmin, rmax, *value_i1;
252 if (!n1 || !n2 || !min || !max || !value)
257 for (i1 = 0; i1 < n1; i1++) {
258 if (!(value_i1 = value[i1]))
260 for (i2 = 0; i2 < n2; i2++) {
261 if ((data = value_i1[i2]) > rmax)
273 double *min,
double *loc,
double *c1,
double *c2,
278 if (!n || !loc || !c1 || !c2)
282 for (i = 0; i < n; i++) {
283 if ((val = c2[i]) < *min) {
292 double *max,
double *loc,
double *c1,
double *c2,
297 if (!n || !c1 || !c2 || !loc || !max)
300 for (i = 0; i < n; i++) {
301 if ((val = c2[i]) > *max) {
319 double max = -DBL_MAX;
337 double min = DBL_MAX;
int index_min_max(int64_t *imin, int64_t *imax, double *list, int64_t n)
Finds the indices of the minimum and maximum values in a list of doubles.
int find_min_max(double *min, double *max, double *list, int64_t n)
Finds the minimum and maximum values in a list of doubles.
int update_min_max(double *min, double *max, double *list, int64_t n, int32_t reset)
Updates the minimum and maximum values based on a list of doubles.
int index_min_max_long(int64_t *imin, int64_t *imax, long *list, int64_t n)
Finds the indices of the minimum and maximum values in a list of longs.
double max_in_array(double *array, long n)
Finds the maximum value in an array of doubles.
double min_in_array(double *array, long n)
Finds the minimum value in an array of doubles.