Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
sgd.c File Reference
#include <assert.h>
#include <limits.h>
#include <neatogen/neato.h>
#include <neatogen/sgd.h>
#include <neatogen/dijkstra.h>
#include <neatogen/randomkit.h>
#include <neatogen/neatoprocs.h>
#include <math.h>
#include <stdlib.h>
#include <util/alloc.h>
#include <util/bitarray.h>
Include dependency graph for sgd.c:

Go to the source code of this file.

Functions

static float calculate_stress (float *pos, term_sgd *terms, int n_terms)
 
static void fisheryates_shuffle (term_sgd *terms, int n_terms, rk_state *rstate)
 
static graph_sgdextract_adjacency (graph_t *G, int model)
 
static void free_adjacency (graph_sgd *graph)
 
void sgd (graph_t *G, int model)
 

Function Documentation

◆ calculate_stress()

static float calculate_stress ( float *  pos,
term_sgd terms,
int  n_terms 
)
static

Definition at line 13 of file sgd.c.

References dx, dy, term_sgd::i, and term_sgd::j.

Referenced by sgd().

Here is the caller graph for this function:

◆ extract_adjacency()

static graph_sgd * extract_adjacency ( graph_t G,
int  model 
)
static

Definition at line 37 of file sgd.c.

References agfstedge(), agfstnode(), aghead, agnxtedge(), agnxtnode(), agtail, bitarray_get(), bitarray_new(), bitarray_reset(), bitarray_set(), ED_dist, G, graph(), gv_alloc(), gv_calloc(), intersect(), isFixed, MODEL_SHORTPATH, MODEL_SUBSET, and ND_id.

Referenced by sgd().

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

◆ fisheryates_shuffle()

static void fisheryates_shuffle ( term_sgd terms,
int  n_terms,
rk_state rstate 
)
static

Definition at line 25 of file sgd.c.

References rk_interval().

Referenced by sgd().

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

◆ free_adjacency()

static void free_adjacency ( graph_sgd graph)
static

Definition at line 134 of file sgd.c.

References bitarray_reset(), free(), and graph().

Referenced by sgd().

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

◆ sgd()

void sgd ( graph_t G,
int  model 
)

Definition at line 143 of file sgd.c.

References agnnodes(), agwarningf(), calculate_stress(), dijkstra_sgd(), dx, dy, elapsed_sec(), Epsilon, extract_adjacency(), fisheryates_shuffle(), free(), free_adjacency(), G, GD_neato_nlist, graph(), gv_calloc(), term_sgd::i, initial_positions(), isFixed, term_sgd::j, MaxIter, MODEL_CIRCUIT, MODEL_MDS, MODEL_SHORTPATH, mu, ND_pos, offset, rk_seed(), start_timer(), Verbose, and term_sgd::w.

Referenced by neatoLayout().

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