Graphviz  2.41.20171026.1811
stress.h
Go to the documentation of this file.
1 /* $Id$ $Revision$ */
2 /* vim:set shiftwidth=4 ts=8: */
3 
4 /*************************************************************************
5  * Copyright (c) 2011 AT&T Intellectual Property
6  * All rights reserved. This program and the accompanying materials
7  * are made available under the terms of the Eclipse Public License v1.0
8  * which accompanies this distribution, and is available at
9  * http://www.eclipse.org/legal/epl-v10.html
10  *
11  * Contributors: See CVS logs. Details at http://www.graphviz.org/
12  *************************************************************************/
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 
19 #ifndef STRESS_H
20 #define STRESS_H
21 
22 #include "defs.h"
23 
24 #define tolerance_cg 1e-3
25 
26 #define DFLT_ITERATIONS 200
27 
28 #define DFLT_TOLERANCE 1e-4
29 
30  /* some possible values for 'num_pivots_stress' */
31 #define num_pivots_stress 40
32 #define num_pivots_smart_ini 0
33 #define num_pivots_no_ini 50
34 
35  /* relevant when using sparse distance matrix
36  * when optimizing within subspace it can be set to 0
37  * otherwise, recommended value is above zero (usually around 3-6)
38  * some possible values for 'neighborhood_radius'
39  */
40 #define neighborhood_radius_unrestricted 4
41 #define neighborhood_radius_subspace 0
42 
43 #define opt_smart_init 0x4
44 #define opt_exp_flag 0x3
45 
46  /* Full dense stress optimization (equivalent to Kamada-Kawai's energy) */
47  /* Slowest and most accurate optimization */
48  extern int stress_majorization_kD_mkernel(vtx_data * graph, /* Input graph in sparse representation */
49  int n, /* Number of nodes */
50  int nedges_graph, /* Number of edges */
51  double **coords, /* coordinates of nodes (output layout) */
52  node_t **nodes, /* original nodes */
53  int dim, /* dimemsionality of layout */
54  int opts, /* option flags */
55  int model, /* model */
56  int maxi /* max iterations */
57  );
58 
59 extern float *compute_apsp_packed(vtx_data * graph, int n);
61 extern float* circuitModel(vtx_data * graph, int nG);
62 extern float* mdsModel (vtx_data * graph, int nG);
63 extern int initLayout(vtx_data * graph, int n, int dim, double **coords, node_t** nodes);
64 
65 #endif
66 
67 #ifdef __cplusplus
68 }
69 #endif
int initLayout(vtx_data *graph, int n, int dim, double **coords, node_t **nodes)
Definition: stress.c:159
int stress_majorization_kD_mkernel(vtx_data *graph, int n, int nedges_graph, double **d_coords, node_t **nodes, int dim, int opts, int model, int maxi)
Definition: stress.c:889
float * circuitModel(vtx_data *graph, int nG)
Definition: stress.c:199
float * compute_apsp_packed(vtx_data *graph, int n)
Definition: stress.c:772
Agraph_t * graph(char *name)
Definition: gv.cpp:38
float * compute_apsp_artifical_weights_packed(vtx_data *graph, int n)
Definition: stress.c:796
float * mdsModel(vtx_data *graph, int nG)
Definition: stress.c:739