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

Go to the source code of this file.

Data Structures

struct  spring_electrical_control_struct
 

Macros

#define AUTOP   -1.0001234
 

Typedefs

typedef struct spring_electrical_control_structspring_electrical_control
 

Enumerations

enum  { ERROR_NOT_SQUARE_MATRIX = -100 }
 
enum  {
  SMOOTHING_NONE , SMOOTHING_STRESS_MAJORIZATION_GRAPH_DIST , SMOOTHING_STRESS_MAJORIZATION_AVG_DIST , SMOOTHING_STRESS_MAJORIZATION_POWER_DIST ,
  SMOOTHING_SPRING , SMOOTHING_TRIANGLE , SMOOTHING_RNG
}
 
enum  { QUAD_TREE_HYBRID_SIZE = 10000 }
 
enum  { QUAD_TREE_NONE = 0 , QUAD_TREE_NORMAL , QUAD_TREE_FAST , QUAD_TREE_HYBRID }
 

Functions

spring_electrical_control spring_electrical_control_new (void)
 
void spring_electrical_control_print (spring_electrical_control ctrl)
 
void spring_electrical_embedding (int dim, SparseMatrix A0, spring_electrical_control ctrl, double *x, int *flag)
 
void spring_electrical_embedding_fast (int dim, SparseMatrix A0, spring_electrical_control ctrl, double *x, int *flag)
 
void multilevel_spring_electrical_embedding (int dim, SparseMatrix A0, spring_electrical_control ctrl, double *label_sizes, double *x, int n_edge_label_nodes, int *edge_label_nodes, int *flag)
 
void spring_electrical_control_delete (spring_electrical_control ctrl)
 
double average_edge_length (SparseMatrix A, int dim, double *coord)
 
void spring_electrical_spring_embedding (int dim, SparseMatrix A, SparseMatrix D, spring_electrical_control ctrl, double *x, int *flag)
 
void pcp_rotate (int n, int dim, double *x)
 

Macro Definition Documentation

◆ AUTOP

#define AUTOP   -1.0001234

Definition at line 19 of file spring_electrical.h.

Typedef Documentation

◆ spring_electrical_control

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ERROR_NOT_SQUARE_MATRIX 

Definition at line 16 of file spring_electrical.h.

◆ anonymous enum

anonymous enum
Enumerator
SMOOTHING_NONE 
SMOOTHING_STRESS_MAJORIZATION_GRAPH_DIST 
SMOOTHING_STRESS_MAJORIZATION_AVG_DIST 
SMOOTHING_STRESS_MAJORIZATION_POWER_DIST 
SMOOTHING_SPRING 
SMOOTHING_TRIANGLE 
SMOOTHING_RNG 

Definition at line 21 of file spring_electrical.h.

◆ anonymous enum

anonymous enum
Enumerator
QUAD_TREE_HYBRID_SIZE 

Definition at line 23 of file spring_electrical.h.

◆ anonymous enum

anonymous enum
Enumerator
QUAD_TREE_NONE 
QUAD_TREE_NORMAL 
QUAD_TREE_FAST 
QUAD_TREE_HYBRID 

Definition at line 25 of file spring_electrical.h.

Function Documentation

◆ average_edge_length()

double average_edge_length ( SparseMatrix  A,
int  dim,
double *  coord 
)

Definition at line 155 of file spring_electrical.c.

References A, coord(), dist(), and SparseMatrix_is_symmetric().

Referenced by spring_electrical_embedding(), spring_electrical_embedding_fast(), spring_electrical_embedding_slow(), and spring_electrical_spring_embedding().

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

◆ multilevel_spring_electrical_embedding()

void multilevel_spring_electrical_embedding ( int  dim,
SparseMatrix  A0,
spring_electrical_control  ctrl,
double *  label_sizes,
double *  x,
int  n_edge_label_nodes,
int *  edge_label_nodes,
int *  flag 
)

Definition at line 1081 of file spring_electrical.c.

References A, spring_electrical_control_struct::adaptive_cooling, attach_edge_label_coordinates(), AUTOP, spring_electrical_control_struct::do_shrinking, spring_electrical_control_struct::edge_labeling_scheme, ELSCHEME_STRAIGHTLINE_PENALTY, ELSCHEME_STRAIGHTLINE_PENALTY2, free(), grid, gv_calloc(), spring_electrical_control_struct::initial_scaling, spring_electrical_control_struct::K, MATRIX_TYPE_REAL, Multilevel_control::maxlevel, Multilevel_delete(), Multilevel_get_coarsest(), Multilevel_is_coarsest, Multilevel_is_finest, Multilevel_new(), multilevel_spring_electrical_embedding(), spring_electrical_control_struct::multilevels, NULL, spring_electrical_control_struct::overlap, spring_electrical_control_struct::p, pcp_rotate(), post_process_smoothing(), power_law_graph(), print_padding(), prolongate(), QUAD_TREE_FAST, QUAD_TREE_HYBRID, QUAD_TREE_HYBRID_SIZE, QUAD_TREE_NONE, spring_electrical_control_struct::random_start, remove_overlap(), RETURN, rotate(), spring_electrical_control_struct::rotation, shorting_edge_label_nodes(), SparseMatrix_delete(), SparseMatrix_get_real_adjacency_matrix_symmetrized(), SparseMatrix_is_symmetric(), SparseMatrix_remove_diagonal(), spring_electrical_embedding(), spring_electrical_embedding_fast(), spring_electrical_embedding_slow(), spring_electrical_control_struct::step, spring_electrical_control_struct::tscheme, and Verbose.

Referenced by multilevel_spring_electrical_embedding(), and sfdpLayout().

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

◆ pcp_rotate()

void pcp_rotate ( int  n,
int  dim,
double *  x 
)

Definition at line 890 of file spring_electrical.c.

References center(), and dist().

Referenced by multilevel_spring_electrical_embedding().

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

◆ spring_electrical_control_delete()

void spring_electrical_control_delete ( spring_electrical_control  ctrl)

Definition at line 72 of file spring_electrical.c.

References free().

Referenced by sfdp_layout(), and SpringSmoother_delete().

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

◆ spring_electrical_control_new()

◆ spring_electrical_control_print()

◆ spring_electrical_embedding()

◆ spring_electrical_embedding_fast()

◆ spring_electrical_spring_embedding()

void spring_electrical_spring_embedding ( int  dim,
SparseMatrix  A,
SparseMatrix  D,
spring_electrical_control  ctrl,
double *  x,
int *  flag 
)