File: fff_routines.h

package info (click to toggle)
nipy 0.1.2%2B20100526-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 11,992 kB
  • ctags: 13,434
  • sloc: python: 47,720; ansic: 41,334; makefile: 197
file content (44 lines) | stat: -rw-r--r-- 1,017 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
42
43
44
/*!
  \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  void fff_rng_draw_noreplace (size_t *list, long k, long 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);

  extern int generate_normals(fff_matrix* nvariate, const fff_matrix * means, const fff_matrix * precision);

#ifdef __cplusplus
}
#endif
 
#endif