MPSolve 3.2.1
Loading...
Searching...
No Matches
tools.h File Reference

Header containing various tools used to interact with the system. More...

#include <mps/mps.h>

Go to the source code of this file.

Macros

#define LOG2   0.69314718055994530941
#define LOG10   2.30258509299404568401
#define LOG10_2   0.30102999566398119521
#define LOG2_10   3.32192809488736234787
#define PI   3.14159265358979323846
#define MAX(A, B)
#define MIN(A, B)
#define mps_boolean_valloc(N)
#define mps_boolean_vclear(V, N)
#define mps_boolean_vfree(V)
#define char_valloc(N)
#define char_vclear(V, N)
#define char_vfree(V)
#define int_valloc(N)
#define int_vclear(V, N)
#define int_vfree(V)
#define long_valloc(N)
#define long_vclear(V, N)
#define long_vfree(V)
#define float_valloc(N)
#define float_vclear(V, N)
#define float_vfree(V)
#define double_valloc(N)
#define double_vclear(V, N)
#define double_vfree(V)

Functions

void randomize (unsigned int seed)
double drand (void)
double dbl_set_2dl (double d, long int l)
void dbl_get_2dl (double *rd, long int *rl, double d)
double dbl_get_mant (double d)
int dbl_get_exp (double d)
void mps_boolean_vinit (mps_boolean v[], unsigned long int size)
void char_vinit (char v[], unsigned long int size)
void int_vinit (int v[], unsigned long int size)
void long_vinit (long v[], unsigned long int size)
void float_vinit (float v[], unsigned long int size)
void double_vinit (double v[], unsigned long int size)

Detailed Description

Header containing various tools used to interact with the system.

It contains convenience function to obtain random values, and define the mps_boolean type.

Macro Definition Documentation

◆ char_valloc

#define char_valloc ( N)
Value:
(char*)malloc ((N)*sizeof(char))

◆ char_vclear

#define char_vclear ( V,
N )
Value:
char_vinit (V, N)

◆ char_vfree

#define char_vfree ( V)
Value:
free (V)

◆ double_valloc

#define double_valloc ( N)
Value:
(double*)malloc ((N)*sizeof(double))

◆ double_vclear

#define double_vclear ( V,
N )
Value:
double_vinit (V, N)

◆ double_vfree

#define double_vfree ( V)
Value:
free (V)

◆ float_valloc

#define float_valloc ( N)
Value:
(float*)malloc ((N)*sizeof(float))

◆ float_vclear

#define float_vclear ( V,
N )
Value:
float_vinit (V, N)

◆ float_vfree

#define float_vfree ( V)
Value:
free (V)

◆ int_valloc

#define int_valloc ( N)
Value:
(int*)malloc ((N)*sizeof(int))

◆ int_vclear

#define int_vclear ( V,
N )
Value:
int_vinit (V, N)

◆ int_vfree

#define int_vfree ( V)
Value:
free (V)

◆ long_valloc

#define long_valloc ( N)
Value:
(long*)malloc ((N)*sizeof(long))

◆ long_vclear

#define long_vclear ( V,
N )
Value:
lng_vinit (V, N)

◆ long_vfree

#define long_vfree ( V)
Value:
free (V)

◆ MAX

#define MAX ( A,
B )
Value:
((A) > (B) ? (A) : (B))

◆ MIN

#define MIN ( A,
B )
Value:
((A) < (B) ? (A) : (B))

◆ mps_boolean_valloc

#define mps_boolean_valloc ( N)
Value:
(mps_boolean*)malloc ((N)*sizeof(mps_boolean))

◆ mps_boolean_vclear

#define mps_boolean_vclear ( V,
N )
Value:
mps_boolean_vinit (V, N)

◆ mps_boolean_vfree

#define mps_boolean_vfree ( V)
Value:
free (V)