PLplot  5.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
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)
nnpinnpi_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)
nnhpinnhpi_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

#define BIGNUMBER   1.0e+100

Definition at line 85 of file nnpi.c.

#define EPS_SHIFT   1.0e-9

Definition at line 83 of file nnpi.c.

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

Definition at line 88 of file nnpi.c.

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

Definition at line 87 of file nnpi.c.

#define N_SEARCH_TURNON   20

Definition at line 84 of file nnpi.c.

#define NINC   10

Definition at line 82 of file nnpi.c.

#define NSTART   10

Definition at line 81 of file nnpi.c.

Function Documentation

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

Definition at line 68 of file nncommon.c.

int circle_contains ( circle c,
point p 
)

Definition at line 98 of file nncommon.c.

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

Definition at line 677 of file delaunay.c.

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

Definition at line 627 of file delaunay.c.

static void free_nn_weights ( void data)
static

Definition at line 492 of file nnpi.c.

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

Definition at line 53 of file nncommon.c.

nnhpi* nnhpi_create ( delaunay d,
int  size 
)

Definition at line 475 of file nnpi.c.

void nnhpi_destroy ( nnhpi nn)

Definition at line 505 of file nnpi.c.

void nnhpi_interpolate ( nnhpi nnhp,
point p 
)

Definition at line 518 of file nnpi.c.

void nnhpi_modify_data ( nnhpi nnhp,
point p 
)

Definition at line 620 of file nnpi.c.

void nnhpi_setwmin ( nnhpi nn,
double  wmin 
)

Definition at line 632 of file nnpi.c.

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

Definition at line 129 of file nnpi.c.

void nnpi_calculate_weights ( nnpi nn)

Definition at line 259 of file nnpi.c.

nnpi* nnpi_create ( delaunay d)

Definition at line 95 of file nnpi.c.

void nnpi_destroy ( nnpi nn)

Definition at line 115 of file nnpi.c.

int nnpi_get_nvertices ( nnpi nn)

Definition at line 429 of file nnpi.c.

int* nnpi_get_vertices ( nnpi nn)

Definition at line 437 of file nnpi.c.

double* nnpi_get_weights ( nnpi nn)

Definition at line 445 of file nnpi.c.

void nnpi_interpolate_point ( nnpi nn,
point p 
)

Definition at line 297 of file nnpi.c.

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

Definition at line 370 of file nnpi.c.

void nnpi_normalize_weights ( nnpi nn)

Definition at line 279 of file nnpi.c.

void nnpi_reset ( nnpi nn)

Definition at line 122 of file nnpi.c.

void nnpi_set_point ( nnpi nn,
point p 
)

Definition at line 421 of file nnpi.c.

void nnpi_setwmin ( nnpi nn,
double  wmin 
)

Definition at line 412 of file nnpi.c.

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

Definition at line 189 of file nnpi.c.

static double triangle_scale_get ( delaunay d,
triangle t 
)
static

Definition at line 168 of file nnpi.c.