Graphviz
2.41.20171026.1811
|
#include "general.h"
#include "geom.h"
#include "arith.h"
#include "math.h"
#include "LinkedList.h"
#include "QuadTree.h"
Go to the source code of this file.
Data Structures | |
struct | node_data_struct |
Macros | |
#define | node_data_get_data(d) (((node_data) (d))->data) |
Typedefs | |
typedef struct node_data_struct * | node_data |
Functions | |
real | distance_cropped (real *x, int dim, int i, int j) |
void | node_data_delete (void *d) |
real | node_data_get_weight (void *d) |
real * | node_data_get_coord (void *d) |
int | node_data_get_id (void *d) |
void | check_or_realloc_arrays (int dim, int *nsuper, int *nsupermax, real **center, real **supernode_wgts, real **distances) |
void | QuadTree_get_supernodes_internal (QuadTree qt, real bh, real *point, int nodeid, int *nsuper, int *nsupermax, real **center, real **supernode_wgts, real **distances, real *counts, int *flag) |
void | QuadTree_get_supernodes (QuadTree qt, real bh, real *point, int nodeid, int *nsuper, int *nsupermax, real **center, real **supernode_wgts, real **distances, double *counts, int *flag) |
void | QuadTree_get_repulsive_force (QuadTree qt, real *force, real *x, real bh, real p, real KP, real *counts, int *flag) |
QuadTree | QuadTree_new_from_point_list (int dim, int n, int max_level, real *coord, real *weight) |
QuadTree | QuadTree_new (int dim, real *center, real width, int max_level) |
void | QuadTree_delete (QuadTree q) |
QuadTree | QuadTree_new_in_quadrant (int dim, real *center, real width, int max_level, int i) |
QuadTree | QuadTree_add (QuadTree q, real *coord, real weight, int id) |
void | QuadTree_print (FILE *fp, QuadTree q) |
void | QuadTree_get_nearest (QuadTree qt, real *x, real *ymin, int *imin, real *min, int *flag) |
Definition at line 67 of file QuadTree.c.
typedef struct node_data_struct* node_data |
Definition at line 30 of file QuadTree.c.
void check_or_realloc_arrays | ( | int | dim, |
int * | nsuper, | ||
int * | nsupermax, | ||
real ** | center, | ||
real ** | supernode_wgts, | ||
real ** | distances | ||
) |
Definition at line 70 of file QuadTree.c.
References MAX, real, and REALLOC.
Referenced by QuadTree_get_supernodes_internal().
Definition at line 27 of file layout_similarity.c.
References dist(), MAX, MINDIST, and real.
Referenced by main(), spring_electrical_embedding(), spring_electrical_embedding_slow(), spring_electrical_spring_embedding(), spring_maxent_embedding(), StressMajorizationSmoother2_new(), and TriangleSmoother_new().
void node_data_delete | ( | void * | d | ) |
Definition at line 45 of file QuadTree.c.
References node_data_struct::coord, and FREE.
Referenced by QuadTree_delete().
real* node_data_get_coord | ( | void * | d | ) |
Definition at line 57 of file QuadTree.c.
References node_data_struct::coord.
Referenced by QuadTree_get_supernodes_internal().
int node_data_get_id | ( | void * | d | ) |
Definition at line 62 of file QuadTree.c.
References node_data_struct::id.
Referenced by QuadTree_get_supernodes_internal().
real node_data_get_weight | ( | void * | d | ) |
Definition at line 52 of file QuadTree.c.
References node_data_struct::node_weight.
Referenced by QuadTree_get_supernodes_internal().
Definition at line 554 of file QuadTree.c.
Referenced by QuadTree_new_from_point_list().
void QuadTree_delete | ( | QuadTree | q | ) |
Definition at line 421 of file QuadTree.c.
References QuadTree_struct::average, QuadTree_struct::center, QuadTree_struct::data, QuadTree_struct::dim, FREE, QuadTree_struct::l, node_data_delete(), QuadTree_struct::qts, QuadTree_delete(), and SingleLinkedList_delete().
Referenced by QuadTree_delete(), spring_electrical_embedding(), spring_electrical_embedding_fast(), spring_electrical_embedding_slow(), spring_electrical_spring_embedding(), and spring_maxent_embedding().
void QuadTree_get_nearest | ( | QuadTree | qt, |
real * | x, | ||
real * | ymin, | ||
int * | imin, | ||
real * | min, | ||
int * | flag | ||
) |
Definition at line 727 of file QuadTree.c.
void QuadTree_get_repulsive_force | ( | QuadTree | qt, |
real * | force, | ||
real * | x, | ||
real | bh, | ||
real | p, | ||
real | KP, | ||
real * | counts, | ||
int * | flag | ||
) |
Definition at line 317 of file QuadTree.c.
References QuadTree_struct::dim, and QuadTree_struct::n.
Referenced by spring_electrical_embedding_fast().
void QuadTree_get_supernodes | ( | QuadTree | qt, |
real | bh, | ||
real * | point, | ||
int | nodeid, | ||
int * | nsuper, | ||
int * | nsupermax, | ||
real ** | center, | ||
real ** | supernode_wgts, | ||
real ** | distances, | ||
double * | counts, | ||
int * | flag | ||
) |
Definition at line 126 of file QuadTree.c.
References QuadTree_struct::dim, MALLOC, QuadTree_get_supernodes_internal(), and real.
Referenced by spring_electrical_embedding(), spring_electrical_embedding_slow(), spring_electrical_spring_embedding(), and spring_maxent_embedding().
void QuadTree_get_supernodes_internal | ( | QuadTree | qt, |
real | bh, | ||
real * | point, | ||
int | nodeid, | ||
int * | nsuper, | ||
int * | nsupermax, | ||
real ** | center, | ||
real ** | supernode_wgts, | ||
real ** | distances, | ||
real * | counts, | ||
int * | flag | ||
) |
Definition at line 80 of file QuadTree.c.
References QuadTree_struct::average, QuadTree_struct::center, check_or_realloc_arrays(), coord(), QuadTree_struct::dim, dist(), QuadTree_struct::l, node_data_get_coord(), node_data_get_id(), node_data_get_weight(), point_distance(), QuadTree_struct::qts, real, SingleLinkedList_get_data(), SingleLinkedList_get_next(), QuadTree_struct::total_weight, and QuadTree_struct::width.
Referenced by QuadTree_get_supernodes().
Definition at line 402 of file QuadTree.c.
References assert, QuadTree_struct::average, QuadTree_struct::center, QuadTree_struct::data, QuadTree_struct::dim, QuadTree_struct::l, MALLOC, QuadTree_struct::max_level, QuadTree_struct::n, NULL, QuadTree_struct::qts, real, QuadTree_struct::total_weight, and QuadTree_struct::width.
Referenced by QuadTree_new_from_point_list(), and QuadTree_new_in_quadrant().
QuadTree QuadTree_new_from_point_list | ( | int | dim, |
int | n, | ||
int | max_level, | ||
real * | coord, | ||
real * | weight | ||
) |
Definition at line 347 of file QuadTree.c.
References FREE, MALLOC, MAX, MIN, NULL, QuadTree_add(), QuadTree_new(), real, xmax, and xmin.
Referenced by spring_electrical_embedding(), spring_electrical_embedding_fast(), spring_electrical_embedding_slow(), spring_electrical_spring_embedding(), and spring_maxent_embedding().
Definition at line 455 of file QuadTree.c.
References QuadTree_struct::center, and QuadTree_new().
void QuadTree_print | ( | FILE * | fp, |
QuadTree | q | ||
) |
Definition at line 654 of file QuadTree.c.
References QuadTree_struct::dim.