TwiceAsNice  2019-02-18
Macros | Functions
poly.c File Reference
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "poly.h"
Include dependency graph for poly.c:

Macros

#define QCALLOC(ptr, typ, nel)
 
#define QMALLOC(ptr, typ, nel)
 
#define QMEMCPY(ptrin, ptrout, typ, nel)
 

Functions

void qerror (char *msg1, char *msg2)
 
polystructpoly_init (int *group, int ndim, int *degree, int ngroup)
 
void poly_end (polystruct *poly)
 
polystructpoly_copy (polystruct *poly)
 
double poly_func (polystruct *poly, double *pos)
 
double poly_cfunc (polystruct *poly, double *pos)
 
int poly_fit (polystruct *poly, double *x, double *y, double *w, int ndata, double *extbasis, double regul)
 
void poly_addcste (polystruct *poly, double *cste)
 
int poly_solve (double *a, double *b, int n)
 
int cholsolve (double *a, double *b, int n)
 
int * poly_powers (polystruct *poly)
 
void poly_initortho (polystruct *poly, double *data, int ndata)
 
double * poly_ortho (polystruct *poly, double *datain, double *dataout)
 
double * poly_deortho (polystruct *poly, double *datain, double *dataout)
 

Macro Definition Documentation

◆ QCALLOC

#define QCALLOC (   ptr,
  typ,
  nel 
)
Value:
{if (!(ptr = (typ *)calloc((size_t)(nel),sizeof(typ)))) \
qerror("Not enough memory for ", \
#ptr " (" #nel " elements) !");;}
typ
Definition: setTargets.py:74

◆ QMALLOC

#define QMALLOC (   ptr,
  typ,
  nel 
)
Value:
{if (!(ptr = (typ *)malloc((size_t)(nel)*sizeof(typ)))) \
qerror("Not enough memory for ", \
#ptr " (" #nel " elements) !");;}
typ
Definition: setTargets.py:74

◆ QMEMCPY

#define QMEMCPY (   ptrin,
  ptrout,
  typ,
  nel 
)
Value:
{if (ptrin) \
{if (!(ptrout = (typ *)malloc((size_t)(nel)*sizeof(typ)))) \
qerror("Not enough memory for ", \
#ptrout " (" #nel " elements) !"); \
memcpy(ptrout, ptrin, (size_t)(nel)*sizeof(typ));};;}
typ
Definition: setTargets.py:74

Function Documentation

◆ cholsolve()

int cholsolve ( double *  a,
double *  b,
int  n 
)

◆ poly_addcste()

void poly_addcste ( polystruct poly,
double *  cste 
)

◆ poly_cfunc()

double poly_cfunc ( polystruct poly,
double *  pos 
)

◆ poly_copy()

polystruct* poly_copy ( polystruct poly)

◆ poly_deortho()

double* poly_deortho ( polystruct poly,
double *  datain,
double *  dataout 
)

◆ poly_end()

void poly_end ( polystruct poly)

◆ poly_fit()

int poly_fit ( polystruct poly,
double *  x,
double *  y,
double *  w,
int  ndata,
double *  extbasis,
double  regul 
)

◆ poly_func()

double poly_func ( polystruct poly,
double *  pos 
)

◆ poly_init()

polystruct* poly_init ( int *  group,
int  ndim,
int *  degree,
int  ngroup 
)

◆ poly_initortho()

void poly_initortho ( polystruct poly,
double *  data,
int  ndata 
)

◆ poly_ortho()

double* poly_ortho ( polystruct poly,
double *  datain,
double *  dataout 
)

◆ poly_powers()

int* poly_powers ( polystruct poly)

◆ poly_solve()

int poly_solve ( double *  a,
double *  b,
int  n 
)

◆ qerror()

void qerror ( char *  msg1,
char *  msg2 
)