PLplot: nnpi.c File Reference

PLplot 5.15.0

Classes | Macros | Functions
nnpi.c File Reference
`#include <stdlib.h>`
`#include <stdio.h>`
`#include <limits.h>`
`#include <float.h>`
`#include <string.h>`
`#include <assert.h>`
`#include <math.h>`
`#include "nn.h"`
`#include "delaunay.h"`
`#include "nan.h"`
`#include "hash.h"`

Go to the source code of this file.

## Classes
struct | nnpi
struct | nnhpi
struct | nn_weights

## Macros
#define | NSTART 10
#define | NINC 10
#define | EPS_SHIFT 1.0e-9
#define | N_SEARCH_TURNON 20
#define | BIGNUMBER 1.0e+100
#define | min(x, y) ( ( x ) < ( y ) ? ( x ) : ( y ) )
#define | max(x, y) ( ( x ) > ( y ) ? ( x ) : ( y ) )

## Functions
int | circle_build (circle *c, point *p0, point *p1, point *p2)
int | circle_contains (circle *c, point *p)
void | delaunay_circles_find (delaunay *d, point *p, int *n, int **out)
int | delaunay_xytoi (delaunay *d, point *p, int seed)
void | nn_quit (const char *format,...)
void | nnpi_reset (nnpi *nn)
void | nnpi_calculate_weights (nnpi *nn)
void | nnpi_normalize_weights (nnpi *nn)
void | nnpi_set_point (nnpi *nn, point *p)
int | nnpi_get_nvertices (nnpi *nn)
int * | nnpi_get_vertices (nnpi *nn)
double * | nnpi_get_weights (nnpi *nn)
nnpi * | nnpi_create (delaunay *d)
void | nnpi_destroy (nnpi *nn)
static void | nnpi_add_weight (nnpi *nn, int vertex, double w)
static double | triangle_scale_get (delaunay *d, triangle *t)
static void | nnpi_triangle_process (nnpi *nn, point *p, int i)
void | nnpi_interpolate_point (nnpi *nn, point *p)
void | nnpi_interpolate_points (int nin, point pin[], double wmin, int nout, point pout[])
void | nnpi_setwmin (nnpi *nn, double wmin)
nnhpi * | nnhpi_create (delaunay *d, int size)
static void | free_nn_weights (void *data)
void | nnhpi_destroy (nnhpi *nn)
void | nnhpi_interpolate (nnhpi *nnhp, point *p)
void | nnhpi_modify_data (nnhpi *nnhp, point *p)
void | nnhpi_setwmin (nnhpi *nn, double wmin)

## Macro Definition Documentation

## ◆ BIGNUMBER

#define BIGNUMBER 1.0e+100

Definition at line 85 of file nnpi.c.

## ◆ EPS_SHIFT

#define EPS_SHIFT 1.0e-9

Definition at line 83 of file nnpi.c.

## ◆ max

#define max | ( |  | x,
|  |  | y
| ) |  | ( ( x ) > ( y ) ? ( x ) : ( y ) )

Definition at line 88 of file nnpi.c.

## ◆ min

#define min | ( |  | x,
|  |  | y
| ) |  | ( ( x ) < ( y ) ? ( x ) : ( y ) )

Definition at line 87 of file nnpi.c.

## ◆ N_SEARCH_TURNON

#define N_SEARCH_TURNON 20

Definition at line 84 of file nnpi.c.

## ◆ NINC

#define NINC 10

Definition at line 82 of file nnpi.c.

## ◆ NSTART

#define NSTART 10

Definition at line 81 of file nnpi.c.

## Function Documentation

## ◆ circle_build()

int circle_build | ( | circle * | c,
|  | point * | p0,
|  | point * | p1,
|  | point * | p2
| ) |  |

Definition at line 68 of file nncommon.c.

## ◆ circle_contains()

int circle_contains | ( | circle * | c,
|  | point * | p
| ) |  |

Definition at line 98 of file nncommon.c.

## ◆ delaunay_circles_find()

void delaunay_circles_find | ( | delaunay * | d,
|  | point * | p,
|  | int * | n,
|  | int ** | out
| ) |  |

Definition at line 681 of file delaunay.c.

## ◆ delaunay_xytoi()

int delaunay_xytoi | ( | delaunay * | d,
|  | point * | p,
|  | int | seed
| ) |  |

Definition at line 631 of file delaunay.c.

## ◆ free_nn_weights()

static void free_nn_weights | ( | void * | data | ) |
| static

Definition at line 492 of file nnpi.c.

## ◆ nn_quit()

void nn_quit | ( | const char * | format,
|  |  | ...
| ) |  |

Definition at line 53 of file nncommon.c.

## ◆ nnhpi_create()

nnhpi* nnhpi_create | ( | delaunay * | d,
|  | int | size
| ) |  |

Definition at line 475 of file nnpi.c.

## ◆ nnhpi_destroy()

void nnhpi_destroy | ( | nnhpi * | nn | ) |

Definition at line 505 of file nnpi.c.

## ◆ nnhpi_interpolate()

void nnhpi_interpolate | ( | nnhpi * | nnhp,
|  | point * | p
| ) |  |

Definition at line 518 of file nnpi.c.

## ◆ nnhpi_modify_data()

void nnhpi_modify_data | ( | nnhpi * | nnhp,
|  | point * | p
| ) |  |

Definition at line 620 of file nnpi.c.

## ◆ nnhpi_setwmin()

void nnhpi_setwmin | ( | nnhpi * | nn,
|  | double | wmin
| ) |  |

Definition at line 632 of file nnpi.c.

## ◆ nnpi_add_weight()

static void nnpi_add_weight | ( | nnpi * | nn,
|  | int | vertex,
|  | double | w
| ) |  |
| static

Definition at line 129 of file nnpi.c.

## ◆ nnpi_calculate_weights()

void nnpi_calculate_weights | ( | nnpi * | nn | ) |

Definition at line 259 of file nnpi.c.

## ◆ nnpi_create()

nnpi* nnpi_create | ( | delaunay * | d | ) |

Definition at line 95 of file nnpi.c.

## ◆ nnpi_destroy()

void nnpi_destroy | ( | nnpi * | nn | ) |

Definition at line 115 of file nnpi.c.

## ◆ nnpi_get_nvertices()

int nnpi_get_nvertices | ( | nnpi * | nn | ) |

Definition at line 429 of file nnpi.c.

## ◆ nnpi_get_vertices()

int* nnpi_get_vertices | ( | nnpi * | nn | ) |

Definition at line 437 of file nnpi.c.

## ◆ nnpi_get_weights()

double* nnpi_get_weights | ( | nnpi * | nn | ) |

Definition at line 445 of file nnpi.c.

## ◆ nnpi_interpolate_point()

void nnpi_interpolate_point | ( | nnpi * | nn,
|  | point * | p
| ) |  |

Definition at line 297 of file nnpi.c.

## ◆ nnpi_interpolate_points()

void nnpi_interpolate_points | ( | int | nin,
|  | point | pin[],
|  | double | wmin,
|  | int | nout,
|  | point | pout[]
| ) |  |

Definition at line 370 of file nnpi.c.

## ◆ nnpi_normalize_weights()

void nnpi_normalize_weights | ( | nnpi * | nn | ) |

Definition at line 279 of file nnpi.c.

## ◆ nnpi_reset()

void nnpi_reset | ( | nnpi * | nn | ) |

Definition at line 122 of file nnpi.c.

## ◆ nnpi_set_point()

void nnpi_set_point | ( | nnpi * | nn,
|  | point * | p
| ) |  |

Definition at line 421 of file nnpi.c.

## ◆ nnpi_setwmin()

void nnpi_setwmin | ( | nnpi * | nn,
|  | double | wmin
| ) |  |

Definition at line 412 of file nnpi.c.

## ◆ nnpi_triangle_process()

static void nnpi_triangle_process | ( | nnpi * | nn,
|  | point * | p,
|  | int | i
| ) |  |
| static

Definition at line 189 of file nnpi.c.

## ◆ triangle_scale_get()

static double triangle_scale_get | ( | delaunay * | d,
|  | triangle * | t
| ) |  |
| static

Definition at line 168 of file nnpi.c.