Graphviz 12.0.1~dev.20240716.0800
Loading...
Searching...
No Matches
sgd.c File Reference
#include <assert.h>
#include <cgraph/alloc.h>
#include <cgraph/bitarray.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 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)
 
static graph_sgdextract_adjacency (graph_t *G, int model)
 
static void free_adjacency (graph_sgd *graph)
 
void sgd (graph_t *G, int model)
 

Variables

static rk_state rstate
 

Function Documentation

◆ calculate_stress()

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

Definition at line 14 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 41 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 
)
static

Definition at line 27 of file sgd.c.

References rk_interval(), and rstate.

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 138 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 147 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(), rstate, 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:

Variable Documentation

◆ rstate

rk_state rstate
static

Definition at line 26 of file sgd.c.

Referenced by fisheryates_shuffle(), and sgd().