Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
rescale_layout.c File Reference
#include <assert.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include <neatogen/matrix_ops.h>
#include <neatogen/delaunay.h>
#include <common/arith.h>
#include <topfish/hierarchy.h>
#include <util/alloc.h>
#include <util/sort.h>
Include dependency graph for rescale_layout.c:

Go to the source code of this file.

Macros

#define DIST(x1, y1, x2, y2)   hypot((x1) - (x2), (y1) - (y2))
 

Functions

static double * compute_densities (v_data *graph, size_t n, double *x, double *y)
 
static double * smooth_vec (double *vec, int *ordering, size_t n, int interval)
 
static int cmp (const void *a, const void *b, void *context)
 
void quicksort_place (double *place, int *ordering, size_t size)
 
static void rescale_layout_polarFocus (v_data *graph, size_t n, double *x_coords, double *y_coords, double x_focus, double y_focus, int interval, double distortion)
 
void rescale_layout_polar (double *x_coords, double *y_coords, double *x_foci, double *y_foci, int num_foci, size_t n, int interval, double width, double height, double distortion)
 

Macro Definition Documentation

◆ DIST

#define DIST (   x1,
  y1,
  x2,
  y2 
)    hypot((x1) - (x2), (y1) - (y2))

Definition at line 109 of file rescale_layout.c.

Function Documentation

◆ cmp()

static int cmp ( const void *  a,
const void *  b,
void *  context 
)
static

Definition at line 91 of file rescale_layout.c.

Referenced by quicksort_place().

Here is the caller graph for this function:

◆ compute_densities()

static double * compute_densities ( v_data graph,
size_t  n,
double *  x,
double *  y 
)
static

Definition at line 38 of file rescale_layout.c.

References graph(), gv_calloc(), and neighbor.

Referenced by rescale_layout_polarFocus().

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

◆ quicksort_place()

void quicksort_place ( double *  place,
int *  ordering,
size_t  size 
)

Definition at line 105 of file rescale_layout.c.

References cmp(), and gv_sort().

Referenced by maxmatch(), rescale_layout_polarFocus(), and set_active_levels().

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

◆ rescale_layout_polar()

void rescale_layout_polar ( double *  x_coords,
double *  y_coords,
double *  x_foci,
double *  y_foci,
int  num_foci,
size_t  n,
int  interval,
double  width,
double  height,
double  distortion 
)

Definition at line 194 of file rescale_layout.c.

References copy_vector(), free(), graph(), gv_calloc(), MIN, rescale_layout_polarFocus(), scadd(), and UG_graph().

Referenced by positionAllItems().

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

◆ rescale_layout_polarFocus()

static void rescale_layout_polarFocus ( v_data graph,
size_t  n,
double *  x_coords,
double *  y_coords,
double  x_focus,
double  y_focus,
int  interval,
double  distortion 
)
static

Definition at line 111 of file rescale_layout.c.

References compute_densities(), copy_vector(), DIST, free(), graph(), gv_calloc(), NULL, quicksort_place(), and smooth_vec().

Referenced by rescale_layout_polar().

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

◆ smooth_vec()

static double * smooth_vec ( double *  vec,
int *  ordering,
size_t  n,
int  interval 
)
static

Definition at line 56 of file rescale_layout.c.

References gv_calloc(), len(), MAX, and MIN.

Referenced by rescale_layout_polarFocus().

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