PLplot: csa.c File Reference

PLplot 5.15.0

Classes | Macros | Typedefs | Functions | Variables
csa.c File Reference
`#include <stdlib.h>`
`#include <stdio.h>`
`#include <stdarg.h>`
`#include <limits.h>`
`#include <float.h>`
`#include <math.h>`
`#include <assert.h>`
`#include <string.h>`
`#include <errno.h>`
`#include "version.h"`
`#include "nan.h"`
`#include "csa.h"`

Go to the source code of this file.

## Classes
struct | triangle
struct | square
struct | csa

## Macros
#define | NPASTART 5
#define | SVD_NMAX 30
#define | NPMIN_DEF 3
#define | NPMAX_DEF 40
#define | K_DEF 140
#define | NPPC_DEF 5

## Typedefs
typedef struct square | square

## Functions
void | csa_setnppc (csa *a, double nppc)
static void | csa_quit (const char *format,...)
static void * | alloc2d (int n1, int n2, size_t unitsize)
static void | free2d (void *pp)
static triangle * | triangle_create (square *s, point vertices[], int index)
static void | triangle_addpoint (triangle *t, point *p)
static void | triangle_destroy (triangle *t)
static void | triangle_calculatebc (triangle *t, point *p, double bc[])
static square * | square_create (csa *parent, double xmin, double ymin, int i, int j)
static void | square_destroy (square *s)
static void | square_addpoint (square *s, point *p)
csa * | csa_create ()
void | csa_destroy (csa *a)
void | csa_addpoints (csa *a, int n, point points[])
static void | csa_setprimaryflag (csa *a)
static void | csa_squarize (csa *a)
static void | getsquares (csa *a, triangle *t, int *n, square ***squares)
static double | distance (point *p1, point *p2)
static void | thindata (triangle *t, int npmax)
static void | csa_attachpoints (csa *a)
static int | n2q (int n)
static void | svd (double **a, int n, int m, double *w, double **v)
static void | lsq (double **A, int ni, int nj, double *z, double *w, double *sol)
static void | csa_findprimarycoeffs (csa *a)
static void | csa_findsecondarycoeffs (csa *a)
static void | csa_sethascoeffsflag (csa *a)
void | csa_calculatespline (csa *a)
void | csa_approximate_point (csa *a, point *p)
void | csa_approximate_points (csa *a, int n, point *points)
void | csa_setnpmin (csa *a, int npmin)
void | csa_setnpmax (csa *a, int npmax)
void | csa_setk (csa *a, int k)

## Variables
int | csa_verbose = 0
static int | i300 [] = { 12, 12, 12, 12 }
static int | i030 [] = { 3, 24, 21, 0 }
static int | i003 [] = { 0, 3, 24, 21 }
static int | i210 [] = { 9, 16, 15, 8 }
static int | i021 [] = { 2, 17, 22, 7 }
static int | i102 [] = { 4, 6, 20, 18 }
static int | i120 [] = { 6, 20, 18, 4 }
static int | i012 [] = { 1, 10, 23, 14 }
static int | i201 [] = { 8, 9, 16, 15 }
static int | i111 [] = { 5, 13, 19, 11 }
static int * | iall [] = { i300, i030, i003, i210, i021, i102, i120, i012, i201, i111 }

## Macro Definition Documentation

## ◆ K_DEF

#define K_DEF 140

Definition at line 49 of file csa.c.

## ◆ NPASTART

#define NPASTART 5

Definition at line 43 of file csa.c.

## ◆ NPMAX_DEF

#define NPMAX_DEF 40

Definition at line 48 of file csa.c.

## ◆ NPMIN_DEF

#define NPMIN_DEF 3

Definition at line 47 of file csa.c.

## ◆ NPPC_DEF

#define NPPC_DEF 5

Definition at line 50 of file csa.c.

## ◆ SVD_NMAX

#define SVD_NMAX 30

Definition at line 44 of file csa.c.

## Typedef Documentation

## ◆ square

typedef struct square square

Definition at line 53 of file csa.c.

## Function Documentation

## ◆ alloc2d()

static void* alloc2d | ( | int | n1,
|  | int | n2,
|  | size_t | unitsize
| ) |  |
| static

Definition at line 158 of file csa.c.

## ◆ csa_addpoints()

void csa_addpoints | ( | csa * | a,
|  | int | n,
|  | point | points[]
| ) |  |

Definition at line 398 of file csa.c.

## ◆ csa_approximate_point()

void csa_approximate_point | ( | csa * | a,
|  | point * | p
| ) |  |

Definition at line 1674 of file csa.c.

## ◆ csa_approximate_points()

void csa_approximate_points | ( | csa * | a,
|  | int | n,
|  | point * | points
| ) |  |

Definition at line 1747 of file csa.c.

## ◆ csa_attachpoints()

static void csa_attachpoints | ( | csa * | a | ) |
| static

Definition at line 716 of file csa.c.

## ◆ csa_calculatespline()

void csa_calculatespline | ( | csa * | a | ) |

Definition at line 1665 of file csa.c.

## ◆ csa_create()

csa* csa_create | ( | void |  | ) |

Definition at line 351 of file csa.c.

## ◆ csa_destroy()

void csa_destroy | ( | csa * | a | ) |

Definition at line 380 of file csa.c.

## ◆ csa_findprimarycoeffs()

static void csa_findprimarycoeffs | ( | csa * | a | ) |
| static

Definition at line 1195 of file csa.c.

## ◆ csa_findsecondarycoeffs()

static void csa_findsecondarycoeffs | ( | csa * | a | ) |
| static

Definition at line 1469 of file csa.c.

## ◆ csa_quit()

static void csa_quit | ( | const char * | format,
|  |  | ...
| ) |  |
| static

Definition at line 137 of file csa.c.

## ◆ csa_sethascoeffsflag()

static void csa_sethascoeffsflag | ( | csa * | a | ) |
| static

Definition at line 1638 of file csa.c.

## ◆ csa_setk()

void csa_setk | ( | csa * | a,
|  | int | k
| ) |  |

Definition at line 1765 of file csa.c.

## ◆ csa_setnpmax()

void csa_setnpmax | ( | csa * | a,
|  | int | npmax
| ) |  |

Definition at line 1760 of file csa.c.

## ◆ csa_setnpmin()

void csa_setnpmin | ( | csa * | a,
|  | int | npmin
| ) |  |

Definition at line 1755 of file csa.c.

## ◆ csa_setnppc()

void csa_setnppc | ( | csa * | a,
|  | double | nppc
| ) |  |

Definition at line 1770 of file csa.c.

## ◆ csa_setprimaryflag()

static void csa_setprimaryflag | ( | csa * | a | ) |
| static

Definition at line 437 of file csa.c.

## ◆ csa_squarize()

static void csa_squarize | ( | csa * | a | ) |
| static

Definition at line 472 of file csa.c.

## ◆ distance()

static double distance | ( | point * | p1,
|  | point * | p2
| ) |  |
| static

Definition at line 645 of file csa.c.

## ◆ free2d()

static void free2d | ( | void * | pp | ) |
| static

Definition at line 187 of file csa.c.

## ◆ getsquares()

static void getsquares | ( | csa * | a,
|  | triangle * | t,
|  | int * | n,
|  | square *** | squares
| ) |  |
| static

Definition at line 610 of file csa.c.

## ◆ lsq()

static void lsq | ( | double ** | A,
|  | int | ni,
|  | int | nj,
|  | double * | z,
|  | double * | w,
|  | double * | sol
| ) |  |
| static

Definition at line 1144 of file csa.c.

## ◆ n2q()

static int n2q | ( | int | n | ) |
| static

Definition at line 806 of file csa.c.

## ◆ square_addpoint()

static void square_addpoint | ( | square * | s,
|  | point * | p
| ) |  |
| static

Definition at line 331 of file csa.c.

## ◆ square_create()

static square* square_create | ( | csa * | parent,
|  | double | xmin,
|  | double | ymin,
|  | int | i,
|  | int | j
| ) |  |
| static

Definition at line 281 of file csa.c.

## ◆ square_destroy()

static void square_destroy | ( | square * | s | ) |
| static

Definition at line 320 of file csa.c.

## ◆ svd()

static void svd | ( | double ** | a,
|  | int | n,
|  | int | m,
|  | double * | w,
|  | double ** | v
| ) |  |
| static

Definition at line 828 of file csa.c.

## ◆ thindata()

static void thindata | ( | triangle * | t,
|  | int | npmax
| ) |  |
| static

Definition at line 658 of file csa.c.

## ◆ triangle_addpoint()

static void triangle_addpoint | ( | triangle * | t,
|  | point * | p
| ) |  |
| static

Definition at line 220 of file csa.c.

## ◆ triangle_calculatebc()

static void triangle_calculatebc | ( | triangle * | t,
|  | point * | p,
|  | double | bc[]
| ) |  |
| static

Definition at line 253 of file csa.c.

## ◆ triangle_create()

static triangle* triangle_create | ( | square * | s,
|  | point | vertices[],
|  | int | index
| ) |  |
| static

Definition at line 198 of file csa.c.

## ◆ triangle_destroy()

static void triangle_destroy | ( | triangle * | t | ) |
| static

Definition at line 240 of file csa.c.

## Variable Documentation

## ◆ csa_verbose

int csa_verbose = 0

Definition at line 41 of file csa.c.

## ◆ i003

int i003[] = { 0, 3, 24, 21 }
| static

Definition at line 1627 of file csa.c.

## ◆ i012

int i012[] = { 1, 10, 23, 14 }
| static

Definition at line 1632 of file csa.c.

## ◆ i021

int i021[] = { 2, 17, 22, 7 }
| static

Definition at line 1629 of file csa.c.

## ◆ i030

int i030[] = { 3, 24, 21, 0 }
| static

Definition at line 1626 of file csa.c.

## ◆ i102

int i102[] = { 4, 6, 20, 18 }
| static

Definition at line 1630 of file csa.c.

## ◆ i111

int i111[] = { 5, 13, 19, 11 }
| static

Definition at line 1634 of file csa.c.

## ◆ i120

int i120[] = { 6, 20, 18, 4 }
| static

Definition at line 1631 of file csa.c.

## ◆ i201

int i201[] = { 8, 9, 16, 15 }
| static

Definition at line 1633 of file csa.c.

## ◆ i210

int i210[] = { 9, 16, 15, 8 }
| static

Definition at line 1628 of file csa.c.

## ◆ i300

int i300[] = { 12, 12, 12, 12 }
| static

Definition at line 1625 of file csa.c.

## ◆ iall

int* iall[] = { i300, i030, i003, i210, i021, i102, i120, i012, i201, i111 }
| static

Definition at line 1636 of file csa.c.