|
Robotran C Documentation
|
Go to the documentation of this file.
6 #ifndef _USEFUL_FUNCTIONS_H_
7 #define _USEFUL_FUNCTIONS_H_
13 #define MIN(a,b) (((a)<(b))?(a):(b))
14 #define MAX(a,b) (((a)>(b))?(a):(b))
26 #define DBL_MAX 1.7976931348623158e+308
52 double pow_int(
double basis,
int expo);
67 double sign(
double a);
219 int mbs_strcmp(
const char* __s1,
const char* __s2);
char * get_char_cpy(const char *fmt,...)
Copy the provided formatted string into a newly allocated memory.
Definition: useful_functions.c:191
char * get_char_cpy(const char *fmt,...)
Copy the provided formatted string into a newly allocated memory.
Definition: useful_functions.c:191
void free_char_tab(char **mat)
release memory for a matrix of chars
Definition: useful_functions.c:217
void mbs_log(char *msg,...)
Function for logging messages in a file called "log" where the program is executed.
Definition: useful_functions.c:28
double sign(double a)
sign function
Definition: useful_functions.c:124
void free_char_vec(char *vec)
release memory for a vector of char
Definition: useful_functions.c:186
int mbs_write_data(MbsData *mbs, char *filename, char *function_name)
Write a source with a function allocating and setting a MbsData copy of the provided.
Definition: mbs_data.c:231
void free_char_vec(char *vec)
release memory for a vector of char
Definition: useful_functions.c:186
int mbs_strcmp(const char *__s1, const char *__s2)
Compare two char with strcmp.
Definition: useful_functions.c:261
void mbs_reset_data(MbsData *s)
Reset all fields of a MbsData structure to initial values.
Definition: mbs_data.c:208
double sign(double a)
sign function
Definition: useful_functions.c:124
double *** get_d3Darray_0(int nb_r, int nb_c, int z)
create (with memory allocation) a [x times y times z] 3D array of doubles, starting at index 0
Definition: useful_functions.c:230
char * get_char_vec(int size)
create (with memory allocation) a vector (length l_v) of char
Definition: useful_functions.c:159
void free_char_tab(char **mat)
release memory for a matrix of chars
Definition: useful_functions.c:217
void mbs_msg(char *msg,...)
Send a message.
Definition: mbs_message.c:76
void free_d3Darray_0(double ***array3D)
release memory for a 3D array of doubles, starting at index 0
Definition: useful_functions.c:252
int mbs_strcmp(const char *__s1, const char *__s2)
Compare two char with strcmp.
Definition: useful_functions.c:261
void free_d3Darray_0(double ***array3D)
release memory for a 3D array of doubles, starting at index 0
Definition: useful_functions.c:252
char * get_char_vec(int l_v)
create (with memory allocation) a vector (length l_v) of char
Definition: useful_functions.c:159
void mbs_copy_data(MbsData *s, MbsData *s_copy)
Copy all fields between two MBSdata structures.
Definition: mbs_data.c:88
char ** get_char_tab(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of chars WARNING: only the first dimension...
Definition: useful_functions.c:170
double *** get_d3Darray_0(int x, int y, int z)
create (with memory allocation) a [x times y times z] 3D array of doubles, starting at index 0
Definition: useful_functions.c:230
void mbs_print_data(MbsData *mbs_data)
Definition: mbs_data.c:21
char * get_time_machine()
returns the current time as a String
Definition: useful_functions.c:131
char ** get_char_tab(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of chars WARNING: only the first dimension...
Definition: useful_functions.c:170
char * get_time_machine()
returns the current time as a String
Definition: useful_functions.c:131
int expo_ten_inf(double nb)
get log with base 10
Definition: useful_functions.c:89
Definition: mbs_data.h:149
void * mbs_free(void *__ptr)
Free the pointor ptr and set it to NULL.
Definition: useful_functions.c:17
int expo_ten_inf(double nb)
get log with base 10
Definition: useful_functions.c:89
double pow_int(double basis, int expo)
compute efficiently pow with an integer exponent
Definition: useful_functions.c:60
void mbs_log(char *msg,...)
Function for logging messages in a file called "log" where the program is executed.
Definition: useful_functions.c:28
void mbs_warning_msg(char *msg,...)
Send a warning message.
Definition: mbs_message.c:89
double pow_int(double basis, int expo)
compute efficiently pow with an integer exponent
Definition: useful_functions.c:60
int mbs_compare_data(MbsData *s1, MbsData *s2, int accelred)
Compare two MbsData.
Definition: mbs_data.c:533
void * mbs_free(void *__ptr)
Free the pointor ptr and set it to NULL.
Definition: useful_functions.c:17