Robotran C Documentation
mbs_polynomial.h
Go to the documentation of this file.
1 
11 #ifndef _MBS_POLYNOMIAL_H_
12 #define _MBS_POLYNOMIAL_H_
13 
14 
22 typedef struct MbsPolynomial
23 {
24  int order;
31  double* coef;
35 
47 
56 
81 MbsPolynomial *mbs_polynomial_constrained(int nb_pos, double **pos_xy,
82  int nb_deriv, double **deriv_xyp);
83 
95 int mbs_polynomial_eval(MbsPolynomial *poly, double x, double *y, int deriv);
96 
111 int mbs_polynomial_eval_vec(MbsPolynomial *poly, int nx, double *vx, double **p_vy,
112  int deriv);
113 
121 
122 #endif
mbs_polynomial_print
int mbs_polynomial_print(MbsPolynomial *poly)
Print information about the polynomial.
Definition: mbs_polynomial.c:333
mbs_msg
void mbs_msg(const char *msg,...)
Send a message.
Definition: mbs_message.c:87
lubksb_0
void lubksb_0(double **a, int n, int *indx, double b[])
Definition: lubksb.c:31
get_dvec_0
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
free_ivec_0
void free_ivec_0(int *vec)
release memory for a vector of integers, starting with index 0
Definition: mbs_1D_array.c:490
free_dmat_0
void free_dmat_0(double **mat)
release memory for a matrix of doubles, starting at index 0
Definition: mbs_matrix.c:332
MbsPolynomial::order
int order
Order of the polynomial, positive or null ie:
Definition: mbs_polynomial.h:24
mbs_matrix.h
mbs_1D_array.h
ludcmp_0
int ludcmp_0(double **a, int n, int *indx, double *d)
LU decomposition of a matrix with index starting at 0.
Definition: ludcmp.c:82
mbs_polynomial_eval
int mbs_polynomial_eval(MbsPolynomial *poly, double x, double *y, int deriv)
Evaluate the polynomial (or its nth derivative) at the provided coordinate.
Definition: mbs_polynomial.c:303
get_dmat_0
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
mbs_polynomial_eval_vec
int mbs_polynomial_eval_vec(MbsPolynomial *poly, int nx, double *vx, double **p_vy, int deriv)
Evaluate the polynomial (or its nth derivative) at the provided coordinates vector.
Definition: mbs_polynomial.c:356
mbs_polynomial_delete
void * mbs_polynomial_delete(MbsPolynomial *poly)
Free a polynomial and return NULL.
Definition: mbs_polynomial.c:92
mbs_polynomial_constrained
MbsPolynomial * mbs_polynomial_constrained(int nb_pos, double **pos_xy, int nb_deriv, double **deriv_xyp)
Create a polynomial fulfilling the position and first derivative.
Definition: mbs_polynomial.c:103
mbs_polynomial_eval
int mbs_polynomial_eval(MbsPolynomial *poly, double x, double *y, int deriv)
Evaluate the polynomial (or its nth derivative) at the provided coordinate.
Definition: mbs_polynomial.c:303
MbsPolynomial::coef
double * coef
Array containing the coefficients, the number of coefficient is order + 1.
Definition: mbs_polynomial.h:31
MbsPolynomial
Definition: mbs_polynomial.h:22
mbs_polynomial_constrained
MbsPolynomial * mbs_polynomial_constrained(int nb_pos, double **pos_xy, int nb_deriv, double **deriv_xyp)
Create a polynomial fulfilling the position and first derivative.
Definition: mbs_polynomial.c:103
nrfct.h
mbs_message.h
mbs_polynomial_delete
void * mbs_polynomial_delete(MbsPolynomial *poly)
Free a polynomial and return NULL.
Definition: mbs_polynomial.c:92
mbs_polynomial_check
int mbs_polynomial_check(MbsPolynomial *poly)
Check the validity of the provided polynomial.
Definition: mbs_polynomial.c:43
get_ivec_0
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
mbs_polynomial_print
int mbs_polynomial_print(MbsPolynomial *poly)
Print information about the polynomial.
Definition: mbs_polynomial.c:333
mbs_polynomial_new
MbsPolynomial * mbs_polynomial_new(int order)
Allocate a polynomial.
Definition: mbs_polynomial.c:63
factorial
int factorial(int n)
Definition: mbs_polynomial.c:21
copy_dvec_0
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
free_dvec_0
void free_dvec_0(double *vec)
release memory for a vector of doubles, starting at index 0
Definition: mbs_1D_array.c:971
mbs_polynomial_new
MbsPolynomial * mbs_polynomial_new(int order)
Allocate a polynomial.
Definition: mbs_polynomial.c:63
mbs_polynomial_get_value
double mbs_polynomial_get_value(MbsPolynomial *poly, double x, int deriv)
Evaluate the polynomial without any checks.
Definition: mbs_polynomial.c:267
mbs_polynomial.h
mbs_polynomial_eval_vec
int mbs_polynomial_eval_vec(MbsPolynomial *poly, int nx, double *vx, double **p_vy, int deriv)
Evaluate the polynomial (or its nth derivative) at the provided coordinates vector.
Definition: mbs_polynomial.c:356