|
Robotran C Documentation
|
double ** tq
2D array containing the time (first column) and the corresponding coordinates value
Definition: lut.h:44
void mbs_lut_res_free(MbsLutRes *lut)
Release memory used by 2D LUT structure.
Definition: lut.c:108
MbsLut2D * mbs_lut_2D_empty(int nx, int ny)
Allocate a 2D LUT structure with of required space with datas set to null.
Definition: lut.c:1250
void mbs_lut_2Dvec_free(MbsLut2Dvec *lut)
Release memory used by 2Dvec LUT structure.
Definition: lut.c:129
double * x
1D array containing the input values
Definition: lut.h:59
void mbs_msg(const char *msg,...)
Send a message.
Definition: mbs_message.c:87
int mbs_lut_res_interp(MbsLutRes *lut, double t, double *coord)
Interpolate the coordinates from a Results Look Up Table for a specific time value.
Definition: lut.c:364
void mbs_lut_res_free(MbsLutRes *lut)
Release memory used by 2D LUT structure.
Definition: lut.c:108
int mbs_lut_1D_compute(MbsLut1D *lut, double x, double *y)
Evaluate the table at the specified coordinate with the index stored in the structure.
Definition: lut.c:278
double * y
1D array containing the second input values (starting at 0)
Definition: lut.h:71
char * get_char_cpy(const char *fmt,...)
Copy the provided formatted string into a newly allocated memory.
Definition: useful_functions.c:196
MbsLut1D * mbs_lut_1D_alloc()
Allocate a 1D LUT (Look Up Table) structure.
Definition: lut.c:22
void mbs_lut_1Dvec_free(MbsLut1Dvec *lut)
Release memory used by 1Dvec LUT structure.
Definition: lut.c:118
int mbs_lut_res_interp(MbsLutRes *lut, double t, double *coord)
Interpolate the coordinates from a Results Look Up Table for a specific time value.
Definition: lut.c:364
void mbs_lut_2D_free(MbsLut2D *lut)
Release memory used by 2D LUT structure.
Definition: lut.c:94
int mbs_lut_2Dvec_interp(MbsLut2Dvec *lut, double x, double y, double *output)
Interpolate the output from a 2D Look Up Table for a specific couple of input value (extrapolation is...
Definition: lut.c:519
double ** z
2D array containing the output to be interpolate at each defined input values
Definition: lut.h:35
MbsLut2D * mbs_lut_2D_empty(int nx, int ny)
Allocate a 2D LUT structure with of required space with datas set to null.
Definition: lut.c:1250
MbsLut1Dvec * mbs_lut_1Dvec_load_file(char *fileName)
Load a file and return a new allocated results LUT structure.
Definition: lut.c:1012
MbsLut2Dvec * mbs_lut_2Dvec_load_file(char *fileName)
Load a file and return a new allocated results LUT structure.
Definition: lut.c:1115
double * get_dvec_0(int l_v)
create (with memory allocation) a vector (length l_v) of doubles, starting at index 0
Definition: mbs_1D_array.c:955
#define _MBS_ERR_LOW_FILES
Low Level error number Error during opening/writing files = -9.
Definition: mbs_errors_names.h:157
MbsLut1D * mbs_lut_1D_load_2vectors(const double *x_ptr, const double *y_ptr, const int nx)
Load two vectors and return a new allocated 1D LUT structure.
Definition: lut.c:722
int nt
number of time steps
Definition: lut.h:43
void free_dmat_0(double **mat)
release memory for a matrix of doubles, starting at index 0
Definition: mbs_matrix.c:332
MbsLut1D * mbs_lut_1D_empty(int nx)
Allocate a look-up-table with of required space with datas set to null.
Definition: lut.c:1237
MbsLut1D * mbs_lut_1D_load_2vectors(const double *x_ptr, const double *y_ptr, const int nx)
Load two vectors and return a new allocated 1D LUT structure.
Definition: lut.c:722
int mbs_lut_2Dvec_interp(MbsLut2Dvec *lut, double x, double y, double *output)
Interpolate the output from a 2D Look Up Table for a specific couple of input value (extrapolation is...
Definition: lut.c:519
double * y
1D array containing the output to be interpolate at each defined input values.
Definition: lut.h:23
Structure for interpolate a vector (entry by entry) from one input.
Definition: lut.h:55
void mbs_warning_msg(const char *msg,...)
Send a warning message.
Definition: mbs_message.c:100
int ny
number of element in the array of the second input
Definition: lut.h:32
double * x
1D array containing the input values.
Definition: lut.h:22
#define _MBS_ERR_LOW_NAN
Low Level error number Number is NaN (not a number) = -7.
Definition: mbs_errors_names.h:147
Structure for interpolate a variable from two inputs.
Definition: lut.h:65
double * y
1D array containing the second input values
Definition: lut.h:34
void mbs_lut_1Dvec_free(MbsLut1Dvec *lut)
Release memory used by 1Dvec LUT structure.
Definition: lut.c:118
double ** get_dmat_0(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of doubles, starting at index 0
Definition: mbs_matrix.c:277
MbsLut2D * mbs_lut_2D_load_mxarray(const mxArray *LUT_2D_ptr)
Load an mxArray and return a new allocated 2D LUT structure.
Definition: lut.c:644
int nq
number coordinates
Definition: lut.h:42
int nx
number of element in the array
Definition: lut.h:57
#define MSG_PRE
Definition: lut.c:20
MbsLutRes * mbs_lut_res_load_file(char *fileName)
Load a file and return a new allocated results LUT structure.
Definition: lut.c:904
MbsLut2D * mbs_lut_2D_alloc()
Allocate a 2D LUT (Look Up Table) structure.
Definition: lut.c:30
Declare reading text file related functions.
void free_d3Darray_0(double ***array3D)
release memory for a 3D array of doubles, starting at index 0
Definition: useful_functions.c:379
int get_file_nb_lines_col(FILE *fp, int *n_line, int *max_width)
Return the number of line and the max line width in remainder of the file.
Definition: read_files.c:32
int mbs_lut_1Dvec_interp(MbsLut1Dvec *lut, double x, double *output)
Interpolate the output from a 1Dvec Look Up Table (extrapolation is allowed).
Definition: lut.c:452
#define MSG_ERR
Definition: lut.c:19
int mbs_lut_1D_interp(MbsLut1D *lut, double x, double *y)
Interpolate the output from a 1D Look Up Table. If lut::id_x is put to zero, it computes the index....
Definition: lut.c:208
MbsLut1D * mbs_lut_1D_load_1vector(const double *LUT_1D_ptr, const int nx)
Load a vector and return a new allocated 1D LUT structure.
Definition: lut.c:688
double mbs_lut_2D_interp(MbsLut2D *lut, double x, double y)
Interpolate the output from a 2D Look Up Table for a specific couple of input value....
Definition: lut.c:294
int n
size of the vectors to interpolate
Definition: lut.h:69
int nx
number of element in the array of the first input
Definition: lut.h:31
void free_dvec_1(double *vec)
release memory for a vector of doubles, starting at index 1
Definition: mbs_1D_array.c:976
MbsLut1D * mbs_lut_1D_load_mxarray(const mxArray *LUT_1D_ptr)
Load an mxArray and return a new allocated 1D LUT structure.
Definition: lut.c:616
int get_dinterval_binary_1(double *array, int size, double value, int *index, int lim_check)
Find the index of the highest value in the array lower or equal than the value.
Definition: mbs_1D_array.c:278
MbsLut1D * mbs_lut_1D_load_file(char *fileName)
Load a file and return a new allocated 1D LUT structure.
Definition: lut.c:757
MbsLut2D * mbs_lut_2D_load_file(char *fileName)
Load a file and return a new allocated 2D LUT structure.
Definition: lut.c:841
MbsLut1Dvec * mbs_lut_1Dvec_alloc(int nx, int n)
Allocate a 1Dvec LUT (Look Up Table) structure.
Definition: lut.c:57
MbsLut2D * mbs_lut_2D_alloc()
Allocate a 2D LUT (Look Up Table) structure.
Definition: lut.c:30
MbsLut2Dvec * mbs_lut_2Dvec_alloc(int nx, int ny, int n)
Allocate a 1Dvec LUT (Look Up Table) structure.
Definition: lut.c:68
MbsLut1Dvec * mbs_lut_1Dvec_load_file(char *fileName)
Load a file and return a new allocated results LUT structure.
Definition: lut.c:1012
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:352
int mbs_lut_1D_step_by_step(MbsLut1D *lut, double x, double *y)
Evaluate the table at the specified coordinate testing fro adjacent to adjacent interval.
Definition: lut.c:240
MbsLut1D * mbs_lut_1D_load_mxarray(const mxArray *LUT_1D_ptr)
Load an mxArray and return a new allocated 1D LUT structure.
Definition: lut.c:616
int mbs_lut_1D_interp(MbsLut1D *lut, double x, double *y)
Interpolate the output from a 1D Look Up Table. If lut::id_x is put to zero, it computes the index....
Definition: lut.c:208
MbsLut2D * mbs_lut_2D_load_mxarray(const mxArray *LUT_2D_ptr)
Load an mxArray and return a new allocated 2D LUT structure.
Definition: lut.c:644
int get_dinterval_binary_from_index_1(double *array, int size, double value, int *index, int lim_check, int verbose)
Find the index of the highest value in the array lower or equal than the value.
Definition: mbs_1D_array.c:341
void sort_dvec_0(double *vec_src, double *vec_dest, int l_v)
sort the first (l_v sized) vector of double into the second vector, starting with index 0
Definition: mbs_1D_array.c:727
int find_dvec_0(double *vec, int l_v, double f)
return the index of the value f in the (x sized) vector vec of doubles, starting with index 0....
Definition: mbs_1D_array.c:892
MbsLut1D * mbs_lut_1D_empty(int nx)
Allocate a look-up-table with of required space with datas set to null.
Definition: lut.c:1237
MbsLutRes * mbs_lut_res_load_file(char *fileName)
Load a file and return a new allocated results LUT structure.
Definition: lut.c:904
Interpolation of value from array (Look Up Table) main header.
int nx
number of element in the array of the first input
Definition: lut.h:67
int mbs_lut_1D_compute(MbsLut1D *lut, double x, double *y)
Evaluate the table at the specified coordinate with the index stored in the structure.
Definition: lut.c:278
double * x
1D array containing the first input values (starting at 0)
Definition: lut.h:70
int n
size of the vector to interpolate
Definition: lut.h:58
MbsLut1D * mbs_lut_1D_load_1vector(const double *LUT_1D_ptr, const int nx)
Load a vector and return a new allocated 1D LUT structure.
Definition: lut.c:688
int id_t
Last index used in the tq array.
Definition: lut.h:45
void mbs_lut_2D_free(MbsLut2D *lut)
Release memory used by 2D LUT structure.
Definition: lut.c:94
int mbs_lut_1D_step_by_step(MbsLut1D *lut, double x, double *y)
Evaluate the table at the specified coordinate testing fro adjacent to adjacent interval.
Definition: lut.c:240
double mbs_lut_2D_interp(MbsLut2D *lut, double x, double y)
Interpolate the output from a 2D Look Up Table for a specific couple of input value....
Definition: lut.c:294
MbsLutRes * mbs_lut_res_alloc()
Allocate a LUT (Look Up Table) structure for results files.
Definition: lut.c:44
MbsLut2Dvec * mbs_lut_2Dvec_load_file(char *fileName)
Load a file and return a new allocated results LUT structure.
Definition: lut.c:1115
void mbs_lut_1D_print(MbsLut1D *lut, char *format)
Print the content of the look-up table.
Definition: lut.c:142
double * x
1D array containing the first input values
Definition: lut.h:33
int ny
number of element in the array of the second input
Definition: lut.h:68
Structure for interpolate a variable from one input.
Definition: lut.h:19
double * get_dvec_1(int l_v)
create (with memory allocation) a vector (length l_v) of doubles, starting at index 1
Definition: mbs_1D_array.c:960
Structure for interpolate a variable from two inputs.
Definition: lut.h:29
void free_dmat_1(double **mat)
release memory for a matrix of doubles, starting at index 1
Definition: mbs_matrix.c:340
void copy_dvec_0(double *vec_src, double *vec_dest, int l_v)
Copy the content of a vector (of sizel_v) of doubles to a second vector, starting with index 0.
Definition: mbs_1D_array.c:981
void free_dvec_0(double *vec)
release memory for a vector of doubles, starting at index 0
Definition: mbs_1D_array.c:971
double ** mat
2D array containing the output vectors to be interpolate at each defined input values
Definition: lut.h:60
void mbs_lut_1D_free(MbsLut1D *lut)
Release memory used by 1D LUT structure.
Definition: lut.c:82
int mbs_lut_1Dvec_interp(MbsLut1Dvec *lut, double x, double *output)
Interpolate the output from a 1Dvec Look Up Table (extrapolation is allowed).
Definition: lut.c:452
double ** get_dmat_1(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of doubles, starting at index 1
Definition: mbs_matrix.c:294
void mbs_lut_1D_print(MbsLut1D *lut, char *format)
Print the content of the look-up table.
Definition: lut.c:142
void mbs_lut_1D_free(MbsLut1D *lut)
Release memory used by 1D LUT structure.
Definition: lut.c:82
int mode
Method to look for the correct interval:
Definition: lut.h:46
int id_x
Last index used in the x array.
Definition: lut.h:24
MbsLut1D * mbs_lut_1D_alloc()
Allocate a 1D LUT (Look Up Table) structure.
Definition: lut.c:22
int read_dmat_0(double **mat, int nb_r, int nb_c, const char *name)
read a [nb_r times nb_c] matrix of doubles from a file starting with index 0 and store the values in ...
Definition: mbs_matrix.c:537
MbsLut1D * mbs_lut_1D_load_file(char *fileName)
Load a file and return a new allocated 1D LUT structure.
Definition: lut.c:757
MbsLut2D * mbs_lut_2D_load_file(char *fileName)
Load a file and return a new allocated 2D LUT structure.
Definition: lut.c:841
MbsLut1Dvec * mbs_lut_1Dvec_alloc(int nx, int n)
Allocate a 1Dvec LUT (Look Up Table) structure.
Definition: lut.c:57
MbsLutRes * mbs_lut_res_alloc()
Allocate a LUT (Look Up Table) structure for results files.
Definition: lut.c:44
Structure for interpolate the trajectories of coordinates.
Definition: lut.h:40
MbsLut2Dvec * mbs_lut_2Dvec_alloc(int nx, int ny, int n)
Allocate a 1Dvec LUT (Look Up Table) structure.
Definition: lut.c:68
double *** mat_output
2D array containing in each entry an output vector to be interpolate at each defined input values
Definition: lut.h:72
void mbs_lut_2Dvec_free(MbsLut2Dvec *lut)
Release memory used by 2Dvec LUT structure.
Definition: lut.c:129
int nx
number of element in the array.
Definition: lut.h:21