|
Robotran C Documentation
|
Go to the documentation of this file.
13 #ifndef MBS_1D_ARRAY_h
14 #define MBS_1D_ARRAY_h
63 double *
mbs_arange_0(
double start,
double stop,
double step,
int with_end,
int *size);
82 double *
mbs_drand_0(
int num,
double min,
double max);
95 double *
mbs_drand_1(
int num,
double min,
double max);
216 int save_ivec_0(
int *vec,
int size,
char *name,
int row);
232 int save_ivec_1(
int *vec,
int size,
char *name,
int row);
265 void vector_sum(
double v1[4],
double v2[4],
double v_dest[4]);
276 void sum_dvec_0(
double *v1,
double *v2,
int size,
double *v_dest);
286 void vector_diff(
double v1[4],
double v2[4],
double v_dest[4]);
297 void diff_dvec_0(
double *v1,
double *v2,
int size,
double *v_dest);
307 void cross_product(
double v1[4],
double v2[4],
double v_dest[4]);
349 void copy_ivec_0(
int* vec_src,
int* vec_dest,
int l_v);
356 void copy_ivec_1(
int* vec_src,
int* vec_dest,
int l_v);
406 int code_ivec_0(FILE *file_out,
int *values,
const char *name,
int size);
420 int code_ivec_1(FILE *file_out,
int *values,
const char *name,
int size);
429 void sort_ivec_0(
int* vec_src,
int* vec_dest,
int l_v);
437 void sort_dvec_0(
double* vec_src,
double* vec_dest,
int l_v);
445 void sort_ivec_1(
int* vec_src,
int* vec_dest,
int l_v);
467 void conc_ivec_0(
int* vec1_src,
int l_v1,
int* vec2_src,
int l_v2,
int* vec_dest);
476 void conc_ivec_1(
int* vec1_src,
int l_v1,
int* vec2_src,
int l_v2,
int* vec3);
488 int slct_ivec_0(
int* vec1_src,
int l_v1,
int* vec_ind_src,
int l_v2,
int* vec1_dest);
570 void copy_dvec_0(
double* vec_src,
double* vec_dest,
int l_v);
576 void copy_dvec_1(
double* vec_src,
double* vec_dest);
611 double *
re_copy_dvec_0(
double *src,
int s_nx,
double *dest,
int d_nx);
623 double *
re_copy_dvec_1(
double *src,
int s_nx,
double *dest,
int d_nx);
660 int code_dvec_0(FILE *file_out,
double *values,
const char *name,
int size);
674 int code_dvec_1(FILE *file_out,
double *values,
const char *name,
int size);
683 void save_dvec_0(
double* vec,
int nb_r,
char* name);
716 void slct_dvec_1(
double* vec1_src,
int* vec_ind_src,
int l_v,
double* vec3);
728 int slct_dvec_0(
double* vec1_src,
int l_v1,
int* vec_ind_src,
int l_v2,
double* vec_dest);
830 double norm(
double v[4]);
841 void normalize(
double v[4],
double vn[4]);
void pick_and_place_dvec_0(double *src, int *index, int n, double *dest)
Pick the values from an array and set them in the destination array at the specified index.
Definition: mbs_1D_array.c:1314
int code_dvec_0(FILE *file_out, double *values, const char *name, int size)
Write C-code to allocate and fill an array of double.
Definition: mbs_1D_array.c:1120
void print_format_dvec_0(double *vec, int nb_r, char *format)
print a (x sized) vector of doubles in console, starting with index 0
Definition: mbs_1D_array.c:1098
double * re_copy_dvec_0(double *src, int s_nx, double *dest, int d_nx)
Copy an array of double into another, reallocate the destination if required.
Definition: mbs_1D_array.c:1044
int code_ivec_0(FILE *file_out, int *values, const char *name, int size)
Write C-code to allocate and fill an array of integers.
Definition: mbs_1D_array.c:611
void free_ivec_1(int *vec)
release memory for a vector of integers, starting with index 1
Definition: mbs_1D_array.c:495
int slct_dvec_0(double *vec_src, int l_v1, int *vec_ind_src, int l_v2, double *vec_dest)
fill the third (l_v2 sized) vector by slicing the first (l_v1 sized) vector of doubles at the indexes...
Definition: mbs_1D_array.c:1333
int save_ivec_1(int *vec, int size, char *name, int row)
save a (x sized) vector of integers in the specified file, starting with index 0 The file is open wit...
Definition: mbs_1D_array.c:398
void conc_ivec_0(int *vec1_src, int l_v1, int *vec2_src, int l_v2, int *vec_dest)
concatenate the first (l_v1 sized) vector and the second (l_v2 sized) vectors of integers into the th...
Definition: mbs_1D_array.c:827
double * mbs_drand_1(int num, double min, double max)
Allocate an array with the specified random number in the specified range.
Definition: mbs_1D_array.c:208
void sort_inplace_ivec_1(int *vec, int l_v)
sort and modify the (x sized) vector of integers, starting with index 1 The "Bubble sort" is used,...
Definition: mbs_1D_array.c:799
void diff_dvec_0(double *v1, double *v2, int size, double *v_dest)
Subtract each component of 2 array in a third vector.
Definition: mbs_1D_array.c:453
void mbs_msg(const char *msg,...)
Send a message.
Definition: mbs_message.c:87
double norm_dvec_1(double *vec, int l_v)
compute the norm of a [l_v sized] vector of doubles, starting with index 1
Definition: norm.c:67
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 print_dvec_0(double *vec, int l_v)
print a (x sized) vector of doubles in console, starting with index 0
Definition: mbs_1D_array.c:1093
void conc_ivec_0(int *vec1_src, int l_vec1, int *vec2_src, int l_vec2, int *vec_dest)
concatenate the first (l_v1 sized) vector and the second (l_v2 sized) vectors of integers into the th...
Definition: mbs_1D_array.c:827
int find_ivec_1(int *vec, int l_v, int f)
return the index of the value f in the (x sized) vector vec of integers, starting with index 1....
Definition: mbs_1D_array.c:907
int find_ivec_0(int *vec, int l_v, int f)
return the index of the value f in the (x sized) vector vec of integers, starting with index 0....
Definition: mbs_1D_array.c:877
int code_ivec_1(FILE *file_out, int *values, const char *name, int size)
Write C-code to allocate and fill an array of integers.
Definition: mbs_1D_array.c:656
double norm(double v[4])
DEPRECATED: See norm_dvec_1().
Definition: norm.c:27
double * mbs_drand_0(int num, double min, double max)
Allocate an array with the specified random number in the specified range.
Definition: mbs_1D_array.c:173
int max_dvec_1(double *vec)
Find the index of the maximum value in the vector.
Definition: mbs_1D_array.c:1466
void print_dvec_0(double *vec, int nb_r)
print a (x sized) vector of doubles in console, starting with index 0
Definition: mbs_1D_array.c:1093
double scalar_product(double v1[4], double v2[4])
Compute and return the scalar product of 2 vectors with first index is 1.
Definition: mbs_1D_array.c:414
void zeros_dvec_1(double *vec)
set all the element of a vector of doubles to zero, starting with index 1
Definition: mbs_1D_array.c:1393
void normalize_dvec_0(double *vec, double *vn, int l_v)
Compute the normalize vector with starting with index 0.
Definition: norm.c:79
double scalar_product_0(double *v1, double *v2, int n)
Compute and return the scalar product of 2 vectors with first index is 0.
Definition: mbs_1D_array.c:420
int * re_copy_ivec_1(int *src, int s_nx, int *dest, int d_nx)
Definition: mbs_1D_array.c:549
void value_dvec_1(double value, double *vec)
set all the element of a vector of doubles to zero, starting with index 1
Definition: mbs_1D_array.c:1378
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
int max_dvec_0(double *vec, int size)
Find the index of the maximum value in the array.
Definition: mbs_1D_array.c:1444
int same_ivec_1(int *v1, int *v2)
Compare if two vector are the same.
Definition: mbs_1D_array.c:939
void free_ivec_0(int *vec)
release memory for a vector of integers, starting with index 0
Definition: mbs_1D_array.c:490
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
double * mbs_linspace_1(double start, double stop, int num)
Allocate an evenly spaced numbers over the specified range.
Definition: mbs_1D_array.c:80
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
void print_ivec_1(int *vec)
print a vector (of size specified in vec[0]) of integers in console, starting with index 1
Definition: mbs_1D_array.c:590
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
int code_dvec_0(FILE *file_out, double *values, const char *name, int size)
Write C-code to allocate and fill an array of double.
Definition: mbs_1D_array.c:1120
void f0123_ivec_0(int *vec, int l_v)
Fill the (l_v sized) vector of integers as [0 1 2 3 ... l_v-1], starting with index 0.
Definition: mbs_1D_array.c:817
void print_dvec_1(double *vec)
print a vector (of size specified in vec[0]) of doubles in console, starting with index 1
Definition: mbs_1D_array.c:1250
int code_ivec_0(FILE *file_out, int *values, const char *name, int size)
Write C-code to allocate and fill an array of integers.
Definition: mbs_1D_array.c:611
void normalize(double v[4], double vn[4])
DEPRECATED: See normalize_dvec_1()
Definition: norm.c:33
int any_dvec_0(double *vec, int l_v)
check if all values of a [l_v sized] vector of doubles are equal to 0, return 0 in that case,...
Definition: mbs_1D_array.c:1352
void sort_ivec_0(int *vec_src, int *vec_dest, int l_v)
sort the first (l_v sized) vector of integers into the second vector, starting with index 0
Definition: mbs_1D_array.c:691
int same_dvec_1(double *v1, double *v2)
Compare if two vector of floats are the same.
Definition: mbs_1D_array.c:1429
void pick_and_place_dvec_1(double *src, int *index, int n, double *dest)
Pick the values from an array and set them in the destination array at the specified index.
Definition: mbs_1D_array.c:1305
void sort_ivec_1(int *vec_src, int *vec_dest, int l_v)
sort the first (x sized) vector of integers into the second vector, starting with index 1
Definition: mbs_1D_array.c:763
void save_dvec_0(double *vec, int nb_r, char *name)
save a (x sized) vector of doubles in the specified file, starting with index 0 The file is open with...
Definition: mbs_1D_array.c:1280
void opposite_dvec_1(double *vec)
function to take the opposite of a given vector (minus in front of each entry)
Definition: mbs_1D_array.c:1408
void mbs_warning_msg(const char *msg,...)
Send a warning message.
Definition: mbs_message.c:100
int * get_ivec_0(int l_v)
create (with memory allocation) a vector (length l_v) of integers, starting at index 0
Definition: mbs_1D_array.c:474
int get_dinterval_binary_0(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:244
int save_ivec_0(int *vec, int size, char *name, int row)
save a (x sized) vector of integers in the specified file, starting with index 0 The file is open wit...
Definition: mbs_1D_array.c:353
void copy_dvec_1(double *vec_src, double *vec_dest)
Copy the content of a vector (of size specified in vec_src[0]) of doubles to a second vector,...
Definition: mbs_1D_array.c:991
void number_product(double s, double v1[4], double v_dest[4])
Compute the product of a vector by a real. The first index is 1.
Definition: mbs_1D_array.c:468
void free_dvec_1(double *vec)
release memory for a vector of doubles, starting at index 1
Definition: mbs_1D_array.c:976
int get_dinterval_binary_from_index_0(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:289
void vector_diff(double v1[4], double v2[4], double v_dest[4])
Subtract each component of 2 vectors in a third vector. The first index is 1.
Definition: mbs_1D_array.c:446
int binary_search_0(double *array, double value, int id_min, int id_max)
Definition: mbs_1D_array.c:227
double norm_dvec_0(double *vec, int l_v)
compute the norm of a [l_v sized] vector of doubles, starting with index 0
Definition: norm.c:55
void save_dvec_0(double *vec, int l_v, char *name)
save a (x sized) vector of doubles in the specified file, starting with index 0 The file is open with...
Definition: mbs_1D_array.c:1280
int slct_ivec_0(int *vec_src, int l_vec1, int *vec_ind_src, int l_vec2, int *vec_dest)
fill the third (l_v2 sized) vector by slicing the first (l_v1 sized) vector of integers at the indexe...
Definition: mbs_1D_array.c:858
int * get_ivec_1(int l_v)
create (with memory allocation) a vector (length l_v) of integers, starting at index 1
Definition: mbs_1D_array.c:479
void cross_product(double v1[4], double v2[4], double v_dest[4])
Compute the cross product of 2 vectors in a third vector. The first index is 1.
Definition: mbs_1D_array.c:461
int same_ivec_0(int *v1, int *v2, int size)
Compare if two vector are the same.
Definition: mbs_1D_array.c:922
double scalar_product(double v1[4], double v2[4])
Compute and return the scalar product of 2 vectors with first index is 1.
Definition: mbs_1D_array.c:414
double norminf_vector_1(double *v, int n)
Compute the maximum of a vector.
Definition: norm.c:38
int slct_dvec_0(double *vec1_src, int l_v1, int *vec_ind_src, int l_v2, double *vec_dest)
fill the third (l_v2 sized) vector by slicing the first (l_v1 sized) vector of doubles at the indexes...
Definition: mbs_1D_array.c:1333
void copy_ivec_1(int *vec_src, int *vec_dest, int l_v)
Copy the content of a vector (of size l_v) of integers to a second vector, starting with index 1.
Definition: mbs_1D_array.c:510
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
double * convert_dvec_0_to_1(double *src, int size, int free_src)
Copy a dvec0 into a new allocated dvec1.
Definition: mbs_1D_array.c:1009
double * mbs_linspace_0(double start, double stop, int num)
Allocate an evenly spaced numbers over the specified range.
Definition: mbs_1D_array.c:60
void free_dvec_0(double *vec)
release memory for a vector of doubles, starting at index 0
Definition: mbs_1D_array.c:971
int code_dvec_1(FILE *file_out, double *values, const char *name, int size)
Write C-code to allocate and fill an array of double.
Definition: mbs_1D_array.c:1190
int save_ivec_1(int *vec, int size, char *name, int row)
save a (x sized) vector of integers in the specified file, starting with index 0 The file is open wit...
Definition: mbs_1D_array.c:398
double * mbs_drand_1(int num, double min, double max)
Allocate an array with the specified random number in the specified range.
Definition: mbs_1D_array.c:208
double * mbs_arange_0(double start, double stop, double step, int with_end, int *size)
Allocate an a array with specified step between two values.
Definition: mbs_1D_array.c:100
void print_dvec_1(double *vec)
print a vector (of size specified in vec[0]) of doubles in console, starting with index 1
Definition: mbs_1D_array.c:1250
void zeros_dvec_0(double *vec, int l_v)
set all the element of a [l_v sized] vector of doubles to zero, starting with index 0
Definition: mbs_1D_array.c:1383
void value_dvec_0(double value, double *vec, int l_v)
set all the element of a [l_v sized] vector of doubles to a value, starting with index 0
Definition: mbs_1D_array.c:1368
void opposite_dvec_1(double *vec)
function to take the opposite of a given vector (minus in front of each entry)
Definition: mbs_1D_array.c:1408
void vector_sum(double v1[4], double v2[4], double v_dest[4])
Sum each component of 2 vectors in a third vector. The first index is 1.
Definition: mbs_1D_array.c:431
int get_dinterval_binary_0(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:244
int code_ivec_1(FILE *file_out, int *values, const char *name, int size)
Write C-code to allocate and fill an array of integers.
Definition: mbs_1D_array.c:656
void sum_dvec_0(double *v1, double *v2, int size, double *v_dest)
Sum each component of 2 array in a third vector.
Definition: mbs_1D_array.c:438
void print_ivec_0(int *vec, int l_v)
print a (l_v sized) vector of integers in console, starting with index 0
Definition: mbs_1D_array.c:569
double * convert_dvec_1_to_0(double *src, int size, int free_src)
Copy a dvec1 into a new allocated dvec0.
Definition: mbs_1D_array.c:1025
void free_dvec_1(double *vec)
release memory for a vector of doubles, starting at index 1
Definition: mbs_1D_array.c:976
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
void vector_diff(double v1[4], double v2[4], double v_dest[4])
Subtract each component of 2 vectors in a third vector. The first index is 1.
Definition: mbs_1D_array.c:446
int max_dvec_1(double *vec)
Find the index of the maximum value in the vector.
Definition: mbs_1D_array.c:1466
void copy_ivec_0(int *vec_src, int *vec_dest, int l_v)
Copy the content of a vector(of size l_v) of integers to a second vector, starting with index 0.
Definition: mbs_1D_array.c:500
double * re_copy_dvec_1(double *src, int s_nx, double *dest, int d_nx)
Copy an array of double into another, reallocate the destination if required.
Definition: mbs_1D_array.c:1073
void pick_and_place_dvec_0(double *src, int *index, int n, double *dest)
Pick the values from an array and set them in the destination array at the specified index.
Definition: mbs_1D_array.c:1314
void cross_product(double v1[4], double v2[4], double v_dest[4])
Compute the cross product of 2 vectors in a third vector. The first index is 1.
Definition: mbs_1D_array.c:461
void free_ivec_0(int *vec)
release memory for a vector of integers, starting with index 0
Definition: mbs_1D_array.c:490
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
double * re_copy_dvec_0(double *src, int s_nx, double *dest, int d_nx)
Copy an array of double into another, reallocate the destination if required.
Definition: mbs_1D_array.c:1044
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
void print_format_dvec_0(double *vec, int l_v, char *format)
print a (x sized) vector of doubles in console, starting with index 0
Definition: mbs_1D_array.c:1098
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
void print_ivec_1(int *vec)
print a vector (of size specified in vec[0]) of integers in console, starting with index 1
Definition: mbs_1D_array.c:590
void sort_inplace_ivec_1(int *vec, int l_v)
sort and modify the (x sized) vector of integers, starting with index 1 The "Bubble sort" is used,...
Definition: mbs_1D_array.c:799
double * convert_dvec_0_to_1(double *src, int size, int free_src)
Copy a dvec0 into a new allocated dvec1.
Definition: mbs_1D_array.c:1009
void diff_dvec_0(double *v1, double *v2, int size, double *v_dest)
Subtract each component of 2 array in a third vector.
Definition: mbs_1D_array.c:453
void f0123_ivec_0(int *vec, int l_v)
Fill the (l_v sized) vector of integers as [0 1 2 3 ... l_v-1], starting with index 0.
Definition: mbs_1D_array.c:817
int * re_copy_ivec_0(int *src, int s_nx, int *dest, int d_nx)
Copy an array of int into another, reallocate the destination if required.
Definition: mbs_1D_array.c:520
int same_dvec_0(double *v1, double *v2, int size)
Compare if two vector of floats are the same.
Definition: mbs_1D_array.c:1413
int any_dvec_0(double *vec, int l_v)
check if all values of a [l_v sized] vector of doubles are equal to 0, return 0 in that case,...
Definition: mbs_1D_array.c:1352
int same_dvec_1(double *v1, double *v2)
Compare if two vector of floats are the same.
Definition: mbs_1D_array.c:1429
void sort_ivec_1(int *vec_src, int *vec_dest, int l_v)
sort the first (x sized) vector of integers into the second vector, starting with index 1
Definition: mbs_1D_array.c:763
int * re_copy_ivec_0(int *src, int s_nx, int *dest, int d_nx)
Copy an array of int into another, reallocate the destination if required.
Definition: mbs_1D_array.c:520
int * get_ivec_0(int l_v)
create (with memory allocation) a vector (length l_v) of integers, starting at index 0
Definition: mbs_1D_array.c:474
void zeros_dvec_0(double *vec, int l_v)
set all the element of a [l_v sized] vector of doubles to zero, starting with index 0
Definition: mbs_1D_array.c:1383
void slct_dvec_1(double *vec1_src, int *vec_ind_src, int l_v, double *vec3)
fill the third vector by slicing the first vector of doubles at the indexes specified in the second (...
Definition: mbs_1D_array.c:1323
int get_dinterval_binary_from_index_0(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:289
void opposite_dvec_0(double *vec, int n)
function to take the opposite of a given vector (minus in front of each entry)
Definition: mbs_1D_array.c:1398
void conc_ivec_1(int *vec1_src, int l_v1, int *vec2_src, int l_v2, int *vec3)
concatenate the first (l_v1 sized) vector and the second (l_v2 sized) vectors of integers into the th...
Definition: mbs_1D_array.c:842
void vector_sum(double v1[4], double v2[4], double v_dest[4])
Sum each component of 2 vectors in a third vector. The first index is 1.
Definition: mbs_1D_array.c:431
void normalize_dvec_1(double *vec, double *vn, int l_v)
Compute the normalize vector with first index is 1.
Definition: norm.c:92
void zeros_dvec_1(double *vec)
set all the element of a vector of doubles to zero, starting with index 1
Definition: mbs_1D_array.c:1393
int slct_ivec_0(int *vec1_src, int l_v1, int *vec_ind_src, int l_v2, int *vec1_dest)
fill the third (l_v2 sized) vector by slicing the first (l_v1 sized) vector of integers at the indexe...
Definition: mbs_1D_array.c:858
double * convert_dvec_1_to_0(double *src, int size, int free_src)
Copy a dvec1 into a new allocated dvec0.
Definition: mbs_1D_array.c:1025
int max_dvec_0(double *vec, int size)
Find the index of the maximum value in the array.
Definition: mbs_1D_array.c:1444
int same_ivec_0(int *v1, int *v2, int size)
Compare if two vector are the same.
Definition: mbs_1D_array.c:922
void free_ivec_1(int *vec)
release memory for a vector of integers, starting with index 1
Definition: mbs_1D_array.c:495
double * mbs_linspace_1(double start, double stop, int num)
Allocate an evenly spaced numbers over the specified range.
Definition: mbs_1D_array.c:80
void copy_ivec_0(int *vec_src, int *vec_dest, int l_v)
Copy the content of a vector(of size l_v) of integers to a second vector, starting with index 0.
Definition: mbs_1D_array.c:500
double * re_copy_dvec_1(double *src, int s_nx, double *dest, int d_nx)
Copy an array of double into another, reallocate the destination if required.
Definition: mbs_1D_array.c:1073
void copy_ivec_1(int *vec_src, int *vec_dest, int l_v)
Copy the content of a vector (of size l_v) of integers to a second vector, starting with index 1.
Definition: mbs_1D_array.c:510
double * mbs_linspace_0(double start, double stop, int num)
Allocate an evenly spaced numbers over the specified range.
Definition: mbs_1D_array.c:60
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
int mbs_linspace(double start, double stop, int num, double *linspace)
Definition: mbs_1D_array.c:25
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
int code_dvec_1(FILE *file_out, double *values, const char *name, int size)
Write C-code to allocate and fill an array of double.
Definition: mbs_1D_array.c:1190
void sort_ivec_0(int *vec_src, int *vec_dest, int l_v)
sort the first (l_v sized) vector of integers into the second vector, starting with index 0
Definition: mbs_1D_array.c:691
void slct_dvec_1(double *vec_src, int *vec_ind_src, int l_v, double *vec_dest)
fill the third vector by slicing the first vector of doubles at the indexes specified in the second (...
Definition: mbs_1D_array.c:1323
void pick_and_place_dvec_1(double *src, int *index, int n, double *dest)
Pick the values from an array and set them in the destination array at the specified index.
Definition: mbs_1D_array.c:1305
void conc_ivec_1(int *vec1_src, int l_vec1, int *vec2_src, int l_vec2, int *vec_dest)
concatenate the first (l_v1 sized) vector and the second (l_v2 sized) vectors of integers into the th...
Definition: mbs_1D_array.c:842
int find_ivec_1(int *vec, int l_v, int f)
return the index of the value f in the (x sized) vector vec of integers, starting with index 1....
Definition: mbs_1D_array.c:907
int save_ivec_0(int *vec, int size, char *name, int row)
save a (x sized) vector of integers in the specified file, starting with index 0 The file is open wit...
Definition: mbs_1D_array.c:353
int find_ivec_0(int *vec, int l_v, int f)
return the index of the value f in the (x sized) vector vec of integers, starting with index 0....
Definition: mbs_1D_array.c:877
void copy_dvec_1(double *vec_src, double *vec_dest)
Copy the content of a vector (of size specified in vec_src[0]) of doubles to a second vector,...
Definition: mbs_1D_array.c:991
void number_product(double s, double v1[4], double v_dest[4])
Compute the product of a vector by a real. The first index is 1.
Definition: mbs_1D_array.c:468
double * mbs_arange_0(double start, double stop, double step, int with_end, int *size)
Allocate an a array with specified step between two values.
Definition: mbs_1D_array.c:100
int same_dvec_0(double *v1, double *v2, int size)
Compare if two vector of floats are the same.
Definition: mbs_1D_array.c:1413
void value_dvec_0(double value, double *vec, int l_v)
set all the element of a [l_v sized] vector of doubles to a value, starting with index 0
Definition: mbs_1D_array.c:1368
double * mbs_drand_0(int num, double min, double max)
Allocate an array with the specified random number in the specified range.
Definition: mbs_1D_array.c:173
void sum_dvec_0(double *v1, double *v2, int size, double *v_dest)
Sum each component of 2 array in a third vector.
Definition: mbs_1D_array.c:438
void print_ivec_0(int *vec, int l_v)
print a (l_v sized) vector of integers in console, starting with index 0
Definition: mbs_1D_array.c:569
double scalar_product_0(double *v1, double *v2, int n)
Compute and return the scalar product of 2 vectors with first index is 0.
Definition: mbs_1D_array.c:420
void value_dvec_1(double value, double *vec)
set all the element of a vector of doubles to zero, starting with index 1
Definition: mbs_1D_array.c:1378
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
void opposite_dvec_0(double *vec, int n)
function to take the opposite of a given vector (minus in front of each entry)
Definition: mbs_1D_array.c:1398
int * get_ivec_1(int l_v)
create (with memory allocation) a vector (length l_v) of integers, starting at index 1
Definition: mbs_1D_array.c:479
int same_ivec_1(int *v1, int *v2)
Compare if two vector are the same.
Definition: mbs_1D_array.c:939