src/mei/mei_math_util.c File Reference

| programmer's documentation

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
mei_math_util.c File Reference

Provides mathemathical functions facilities. More...

`#include "cs_defs.h"`
`#include <stdlib.h>`
`#include <stdio.h>`
`#include <string.h>`
`#include <fcntl.h>`
`#include <assert.h>`
`#include <bft_mem.h>`
`#include <bft_error.h>`
`#include <bft_printf.h>`
`#include "mei_math_util.h"`
Include dependency graph for mei_math_util.c:

## Macros
#define | SIZE_MAX 1000

## Functions
double | mei_interp1d (const char *filename, const int c1, const int c2, const double x)
| Return the 1D interpolation if a value. More...
void | mei_data_free (void)
| Destroy all user data set for 1D interpolation. More...
double | mei_max (const double x1, const double x2)
| Return the max value from two doubles. More...
double | mei_min (const double x1, const double x2)
| Return the min value from two doubles. More...

## Detailed Description

Provides mathemathical functions facilities.

## Macro Definition Documentation

#define SIZE_MAX 1000

## Function Documentation

void mei_data_free | ( | void |  | ) |

Destroy all user data set for 1D interpolation.

double mei_interp1d | ( | const char * | filename,
|  | const int | c1,
|  | const int | c2,
|  | const double | x
| ) |  |

Return the 1D interpolation if a value.

Parameters

  [in] | filename | name of file of data
  [in] | c1 | column number of the file for abscisse
  [in] | c2 | column number of the file for ordinate
  [in] | x | variable to interpolate

Returns
  interpolated value

double mei_max | ( | const double | x1,
|  | const double | x2
| ) |  |

Return the max value from two doubles.

Parameters

  [in] | x1 | double
  [in] | x2 | double

Returns
  max value

double mei_min | ( | const double | x1,
|  | const double | x2
| ) |  |

Return the min value from two doubles.

Parameters

  [in] | x1 | double
  [in] | x2 | double

Returns
  min value