samples.c
Go to the documentation of this file.
282 //fprintf(stderr," New step-> dg:%g (%g) st:%g tn:%g tg:%g (%g)\n",nt,DistanceTopology(m,tp,s2,s),nt,Norm(k,t_next),Norm(k,t_goal),Distance(k,t_next,t_goal));
658 if ((lastPath!=NULL)&&(c<lastS-1)&&(lastNS<lastS-c+1)&&(nl<ll)) /* replace only if theres is a minimum gap and the num
735 /* Select the start/end of the tentative shortcuts (note that we can have repeated random numbers!) */
849 fprintf(stderr,"Test %u->%u. pl:%g st:%u -> nl:%g nst:%u %s\n",n1,n2,pl,n2-n1+2,nl,lns,(((reached)&&(nl<pl))?"(*)":" "));
1247 unsigned int ReadTwoSamples(Tparameters *p,char *fname,unsigned int nvs,double **s1,double **s2)
void ShortcutSmooth(Tparameters *pr, Tstatistics *stime, unsigned int *np, double ***point, TAtlasBase *w) Fixed-cut based smoothing. Definition: samples.c:590 void First(Titerator *i) Moves an iterator to the first position of its associated list. Definition: list.c:356 void PlotVect3d(unsigned int n, double *x, double *y, double *z, Tplot3d *p) Adds a polyline to the current object. Definition: plot3d.c:447 CBLAS_INLINE void ScaleVector(double f, unsigned int s, double *v) Scales a vector. Definition: basic_algebra.c:30 #define REP_JOINTS One of the possible values of the REPRESENTATION parameter. Definition: parameters.h:60 #define CS_WD_GENERATE_SIMPLIFIED_POINT(pr, p, r, wcs) Generates a simplified point from an original one. Definition: wcs.h:432 unsigned int ReadTwoSamples(Tparameters *p, char *fname, unsigned int nvs, double **s1, double **s2) Reads two samples from a file. Definition: samples.c:1247 double DistanceTopology(unsigned int s, unsigned int *tp, double *v1, double *v2) Computes the distance of two points. Definition: basic_algebra.c:382 double ConnectSamplesChart(Tparameters *pr, unsigned int *tp, Tbox *domain, unsigned int m, unsigned int n, double *s1, double *s2, double md, boolean checkCollisions, boolean *reached, boolean *collision, double *lastSample, unsigned int *ns, double ***path, TAtlasBase *w) Determines the connection between two points on the manifold. Definition: samples.c:172 Data structure to hold the information about the name of a file. Definition: filename.h:248 void ArrayPi2Pi(unsigned int n, unsigned int *t, double *a) Applies PI2PI to an array. Definition: basic_algebra.c:496 unsigned int randomMax(unsigned int m) Returns a random integer in the range [0,m]. Definition: random.c:77 void PlotSamples(Tparameters *p, Tplot3d *p3d, unsigned int xID, unsigned int yID, unsigned int zID, unsigned int ns, double **path) Plots a 3D projection of a path. Definition: samples.c:1399 void InitStatistics(unsigned int np, double v, Tstatistics *t) Constructor. Definition: statistics.c:21 CBLAS_INLINE double Norm(unsigned int s, double *v) Computes the norm of a vector. Definition: basic_algebra.c:265 void DifferenceVectorTopology(unsigned int s, unsigned int *tp, double *v1, double *v2, double *v) Substracts two vectors. Definition: basic_algebra.c:245 CBLAS_INLINE void AccumulateVector(unsigned int s, double *v1, double *v2) Adds a vector to another vectors. Definition: basic_algebra.c:55 void ReverseConcatSamples(unsigned int nvs, unsigned int ns1, double **path1, unsigned int ns2, double **path2, unsigned int *ns, double ***path) Reverses and concats a path. Definition: samples.c:1171 Definition of the Tfilename type and the associated functions. int cmpUInt(const void *a, const void *b) Compares two unsigned in integers. Definition: samples.c:574 void GradientSmooth(Tparameters *pr, unsigned int nCores, unsigned int maxIterations, Tstatistics *stime, unsigned int *np, double ***point, TAtlasBase *w) Gradient-based path smoothing. Definition: samples.c:909 double Chart2Manifold(Tparameters *pr, TJacobian *sJ, double *t, unsigned int *tp, double *pInit, double *p, Tchart *c) Returns the point in the manifold for a given set of parameteres. Definition: chart.c:1066 double PathLength(unsigned int *tp, unsigned int m, unsigned int np, double **point) Length of a path formed by a set of samples. Definition: samples.c:561 void GetJacobianSize(unsigned int *nr, unsigned int *nc, TJacobian *j) Returns the size of the Jacobian. Definition: jacobian.c:43 boolean ReadListOfBoxes(char *filename, Tlist *l) Reads a list of boxes from a file. Definition: box_list.c:286 void RandomSmooth(Tparameters *pr, unsigned int nCores, unsigned int maxIterations, Tstatistics *stime, unsigned int *np, double ***point, TAtlasBase *w) Random-based path smoothing. Definition: samples.c:688 boolean LoadSamples(Tfilename fname, unsigned int *nvs, unsigned int *ns, double ***path) Reads a set of samples from file. Definition: samples.c:1352 unsigned int InitChart(Tparameters *pr, boolean simple, Tbox *domain, unsigned int *tp, unsigned int m, unsigned int k, double *p, double e, double eCurv, double r, TJacobian *sJ, TAtlasBase *w, Tchart *c) Constructor. Definition: chart.c:792 boolean EndOfList(Titerator *i) Checks if an iterator is pointing at the end of the list. Definition: list.c:445 #define CS_WD_SIMP_INEQUALITIES_HOLD(pr, p, wcs) Cheks if all inequalities hold. Definition: wcs.h:207 void DifferenceVector(unsigned int s, double *v1, double *v2, double *v) Substracts two vectors. Definition: basic_algebra.c:223 Definition of the Tlist type and the associated functions. void SaveSamples(char *fname, boolean smooth, unsigned int nvs, unsigned int ns, double **path) Saves a set of samples to a file. Definition: samples.c:1318 #define CS_WD_NEWTON_IN_SIMP(pr, p, wcs) Applies a Newton procedure to move a point towads the manifold. Definition: wcs.h:488 A table of parameters. void CreateFileName(char *path, char *name, char *suffix, char *ext, Tfilename *fn) Constructor. Definition: filename.c:22 #define CS_WD_GET_SIMP_JACOBIAN(pr, J, wcs) Computes the Jacobian of the simplified system. Definition: wcs.h:474 void ConcatSamples(unsigned int nvs, unsigned int ns1, double **path1, unsigned int ns2, double **path2, unsigned int *ns, double ***path) Concats two path. Definition: samples.c:1150 char * GetFileFullName(Tfilename *fn) Gets the file full name (paht+name+extension). Definition: filename.c:151 CBLAS_INLINE void TMatrixVectorProduct(unsigned int r, unsigned int c, double *A, double *b, double *o) Product of a transposed matrix and a vector. Definition: basic_algebra.c:615 void SmoothSamples(Tparameters *pr, boolean parallel, int mode, unsigned int maxIterations, unsigned int ns, double **path, unsigned int *sns, double ***spath, TAtlasBase *w) Path smoothing. Definition: samples.c:1033 #define CS_WD_REGENERATE_ORIGINAL_POINT(pr, p, o, wcs) Completes an original point from a simplified one. Definition: wcs.h:279 double ConnectSamples(Tparameters *pr, unsigned int *tp, Tbox *domain, unsigned int m, unsigned int n, double *s1, double *s2, double md, boolean checkCollisions, boolean *reached, boolean *collision, double *lastSample, unsigned int *ns, double ***path, TAtlasBase *w) Determines the connection between two points on the manifold. Definition: samples.c:434 #define JOINTS_EXT File extension for files with samples represented by the joint values. Definition: filename.h:187 #define MEM_DUP(_var, _n, _type) Duplicates a previously allocated memory space. Definition: defines.h:414 CBLAS_INLINE void SumVectorScale(unsigned int s, double *v1, double w, double *v2, double *v) Adds two vectors with a scale. Definition: basic_algebra.c:86 void InitBoxFromPoint(unsigned int dim, double *p, Tbox *b) Initializes a box from a point. Definition: box.c:43 CBLAS_INLINE void SubtractVector(unsigned int s, double *v1, double *v2) Substracts a vector from another vector. Definition: basic_algebra.c:210 void DeleteSamples(unsigned int ns, double **path) Deletes the space used by a set of samples. Definition: samples.c:1495 unsigned int ReadOneSample(Tparameters *p, char *fname, unsigned int nvs, double **s) Reads one sample from a file. Definition: samples.c:1216 void SaveSamplesInt(Tfilename *fpath, unsigned int nvs, unsigned int ns, double **path) Internal function to save a set of samples to a file. Definition: samples.c:1284 double Manifold2Chart(double *p, unsigned int *tp, double *t, Tchart *c) Returns the parametrization of a point. Definition: chart.c:1036 double GetParameter(unsigned int n, Tparameters *p) Gets the value for a particular parameter. Definition: parameters.c:93 #define CS_WD_REGENERATE_SOLUTION_POINT(pr, p, r, wcs) Compleates a solution point with the dummy variables. Definition: wcs.h:417 #define CS_WD_IN_COLLISION(f, pr, s, sPrev, wcs) Checks if a configuration is in collision. Definition: wcs.h:319 #define CT_DELTA Size of the steps in the path connecting two configurations. Definition: parameters.h:282 #define CT_N_DOF Dimensionality of the solution space for the mechanism at hand. Definition: parameters.h:318 void GetBoxCenter(boolean *used, double *c, Tbox *b) Returns the box center along the selected dimensions. Definition: box.c:697 Auxiliary functions to deal with sets of samples. void InitSamples(unsigned int *ms, unsigned int *ns, double ***path) Initializes a set of samples. Definition: samples.c:143 Definition of basic randomization functions. #define CS_WD_GENERATE_SIMP_INITIAL_BOX(pr, b, wcs) Computes the global box for the simplified system. Definition: wcs.h:460 Definition of the Tparameters type and the associated functions. unsigned int StartNew3dObject(Tcolor *c, Tplot3d *p) Start a composed object. Definition: plot3d.c:157 void AddSample2Samples(unsigned int nv, double *sample, unsigned int nvs, boolean *systemVars, unsigned int *ms, unsigned int *ns, double ***path) Adds a sample to a set of samples. Definition: samples.c:150 #define LINKS_EXT File extension for files with samples represented by the link poses. Definition: filename.h:180 boolean Advance(Titerator *i) Moves an iterator to the next position of its associated list. Definition: list.c:373 #define CS_WD_GET_SIMP_TOPOLOGY(pr, tp, wcs) Gets the simplified variable topology. Definition: wcs.h:401 void SaveSamplesN(char *fname, boolean smooth, unsigned int n, unsigned int nvs, unsigned int ns, double **path) Saves a set of samples to a file. Definition: samples.c:1333 boolean PointInBoxTopology(boolean *used, boolean update, unsigned int n, double *v, double tol, unsigned int *tp, Tbox *b) Checks if a point is included in a(sub-) box. Definition: box.c:350 void ReverseSamples(unsigned int ns, double **path) Reverses a set of samples. Definition: samples.c:1196 |
Follow us!