File: fff_routines.h

package info (click to toggle)
nipy 0.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,352 kB
  • sloc: python: 39,115; ansic: 30,931; makefile: 210; sh: 93
file content (41 lines) | stat: -rw-r--r-- 827 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*!
  \file fff_routines.h
  \brief A few standard functions that are always necessary
  \author bertrand Thirion and Alexis Roche
  \date 2008

  Things could also be put somewhere else.
  The implementation has often a quick-and-dirty flavour.

*/

#ifndef FFF_ROUTINES
#define FFF_ROUTINES

#ifdef __cplusplus
extern "C" {
#endif

#include <stdlib.h>
#include <math.h>
#include "fff_array.h"
#include "fff_matrix.h"

  extern void sort_ascending_and_get_permutation( double* x, long* idx, long n );

  extern void sort_ascending(double *x, int n);

  extern long fff_array_argmax1d(const fff_array *farray);

  extern long fff_array_argmin1d(const fff_array *farray);

  extern double fff_array_min1d(const fff_array *farray);

  extern double fff_array_max1d(const fff_array *farray);


#ifdef __cplusplus
}
#endif

#endif