Graphviz 12.0.1~dev.20240716.0800
Loading...
Searching...
No Matches
QuadTree.h File Reference
#include <stdio.h>
Include dependency graph for QuadTree.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  node_data_struct
 
struct  QuadTree_struct
 

Typedefs

typedef struct node_data_structnode_data
 
typedef struct QuadTree_structQuadTree
 

Functions

QuadTree QuadTree_new (int dim, double *center, double width, int max_level)
 
void QuadTree_delete (QuadTree q)
 
QuadTree QuadTree_add (QuadTree q, double *coord, double weight, int id)
 
void QuadTree_print (FILE *fp, QuadTree q)
 
QuadTree QuadTree_new_from_point_list (int dim, int n, int max_level, double *coord)
 
double point_distance (double *p1, double *p2, int dim)
 
void QuadTree_get_supernodes (QuadTree qt, double bh, double *pt, int nodeid, int *nsuper, int *nsupermax, double **center, double **supernode_wgts, double **distances, double *counts)
 
void QuadTree_get_repulsive_force (QuadTree qt, double *force, double *x, double bh, double p, double KP, double *counts)
 
void QuadTree_get_nearest (QuadTree qt, double *x, double *ymin, int *imin, double *min)
 
QuadTree QuadTree_new_in_quadrant (int dim, double *center, double width, int max_level, int i)
 

Typedef Documentation

◆ node_data

typedef struct node_data_struct* node_data

Definition at line 19 of file QuadTree.h.

◆ QuadTree

typedef struct QuadTree_struct* QuadTree

Definition at line 29 of file QuadTree.h.

Function Documentation

◆ point_distance()

double point_distance ( double *  p1,
double *  p2,
int  dim 
)

Definition at line 153 of file general.c.

References dist().

Referenced by QuadTree_get_nearest_internal(), QuadTree_get_supernodes_internal(), and QuadTree_repulsive_force_interact().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ QuadTree_add()

QuadTree QuadTree_add ( QuadTree  q,
double *  coord,
double  weight,
int  id 
)

Definition at line 514 of file QuadTree.c.

References coord(), and QuadTree_add_internal().

Referenced by QuadTree_new_from_point_list().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ QuadTree_delete()

void QuadTree_delete ( QuadTree  q)

Definition at line 374 of file QuadTree.c.

References QuadTree_struct::average, QuadTree_struct::center, QuadTree_struct::data, QuadTree_struct::dim, free(), QuadTree_struct::l, node_data_struct::next, node_data_delete(), QuadTree_struct::qts, and QuadTree_delete().

Referenced by furtherest_point(), node_distinct_coloring(), QuadTree_delete(), spring_electrical_embedding(), spring_electrical_embedding_fast(), and spring_electrical_spring_embedding().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ QuadTree_get_nearest()

void QuadTree_get_nearest ( QuadTree  qt,
double *  x,
double *  ymin,
int *  imin,
double *  min 
)

Definition at line 681 of file QuadTree.c.

References imin(), QuadTree_get_nearest_internal(), and ymin.

Referenced by make_map_internal(), and node_distinct_coloring_internal2().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ QuadTree_get_repulsive_force()

void QuadTree_get_repulsive_force ( QuadTree  qt,
double *  force,
double *  x,
double  bh,
double  p,
double  KP,
double *  counts 
)

Definition at line 280 of file QuadTree.c.

References bh, QuadTree_struct::dim, QuadTree_struct::n, QuadTree_repulsive_force_accumulate(), and QuadTree_repulsive_force_interact().

Referenced by spring_electrical_embedding_fast().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ QuadTree_get_supernodes()

void QuadTree_get_supernodes ( QuadTree  qt,
double  bh,
double *  pt,
int  nodeid,
int *  nsuper,
int *  nsupermax,
double **  center,
double **  supernode_wgts,
double **  distances,
double *  counts 
)

Definition at line 93 of file QuadTree.c.

References bh, center(), QuadTree_struct::dim, gv_calloc(), and QuadTree_get_supernodes_internal().

Referenced by spring_electrical_embedding(), and spring_electrical_spring_embedding().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ QuadTree_new()

QuadTree QuadTree_new ( int  dim,
double *  center,
double  width,
int  max_level 
)

Definition at line 356 of file QuadTree.c.

References QuadTree_struct::average, QuadTree_struct::center, center(), QuadTree_struct::data, QuadTree_struct::dim, gv_alloc(), gv_calloc(), QuadTree_struct::l, QuadTree_struct::max_level, QuadTree_struct::n, NULL, QuadTree_struct::qts, QuadTree_struct::total_weight, and QuadTree_struct::width.

Referenced by furtherest_point(), QuadTree_new_from_point_list(), and QuadTree_new_in_quadrant().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ QuadTree_new_from_point_list()

QuadTree QuadTree_new_from_point_list ( int  dim,
int  n,
int  max_level,
double *  coord 
)

Definition at line 308 of file QuadTree.c.

References center(), coord(), free(), gv_calloc(), NULL, QuadTree_add(), QuadTree_new(), xmax, and xmin.

Referenced by lab_gamut_quadtree(), make_map_internal(), node_distinct_coloring(), spring_electrical_embedding(), spring_electrical_embedding_fast(), and spring_electrical_spring_embedding().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ QuadTree_new_in_quadrant()

QuadTree QuadTree_new_in_quadrant ( int  dim,
double *  center,
double  width,
int  max_level,
int  i 
)

Definition at line 412 of file QuadTree.c.

References QuadTree_struct::center, center(), and QuadTree_new().

Referenced by furtherest_point(), and QuadTree_add_internal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ QuadTree_print()

void QuadTree_print ( FILE *  fp,
QuadTree  q 
)

Definition at line 614 of file QuadTree.c.

References QuadTree_struct::dim, and QuadTree_print_internal().

Here is the call graph for this function: