Program listing for file numerics/src/tools/NSSTools.h#
Return to documentation for this file
1#ifndef NSSTOOLS_H
2#define NSSTOOLS_H
3
4
5
6#include "SiconosConfig.h"
7
8#ifdef __cplusplus
9#undef restrict
10#define restrict __restrict
11#endif
12
13
14#if defined(__cplusplus) && !defined(BUILD_AS_CPP)
15extern "C"
16{
17#endif
18
19
20 void max_part(double* x, double* sol, int n);
21
22
23 void maxf(double* a, double* b , double* c);
24
25
26 void min_part(double* x, double* sol , int n);
27
28
29 void minf(double* a, double* b, double* c);
30
31
32 void pos_part(unsigned n, double* x, double* x_plus);
33
34
35 void abs_part(double* x, double* sol, int n);
36
37
38 void diffns(int *na, int *a, int *nb, int * b, int *nc, int *c);
39
40
41 void sortsn_(int*ddl_i, int *sort, int *n);
42
43#if defined(__cplusplus) && !defined(BUILD_AS_CPP)
44}
45#include <algorithm>
46using std::min;
47using std::max;
48
49#else
50#define min(a,b) ((a)>(b)?(b):(a))
51#define max(a,b) ((a) >= (b) ? (a) : (b))
52#endif
53
54#endif