Graphviz 14.0.2~dev.20251015.0935
Loading...
Searching...
No Matches
stress.h
Go to the documentation of this file.
1/*************************************************************************
2 * Copyright (c) 2011 AT&T Intellectual Property
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * https://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors: Details at https://graphviz.org
9 *************************************************************************/
10
11#pragma once
12
13#include <util/api.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19#include <neatogen/defs.h>
20
21#define tolerance_cg 1e-3
22
23#define DFLT_ITERATIONS 200
24
25#define DFLT_TOLERANCE 1e-4
26
27 /* some possible values for 'num_pivots_stress' */
28#define num_pivots_stress 40
29
30#define opt_smart_init 0x4
31#define opt_exp_flag 0x3
32
33 /* Full dense stress optimization (equivalent to Kamada-Kawai's energy) */
34 /* Slowest and most accurate optimization */
35PRIVATE int stress_majorization_kD_mkernel(vtx_data * graph, /* Input graph in sparse representation */
36 int n, /* Number of nodes */
37 double **coords, /* coordinates of nodes (output layout) */
38 node_t **nodes, /* original nodes */
39 int dim, /* dimemsionality of layout */
40 int opts, /* option flags */
41 int model, /* model */
42 int maxi /* max iterations */
43 );
44
47PRIVATE float* circuitModel(vtx_data * graph, int nG);
48PRIVATE float* mdsModel (vtx_data * graph, int nG);
49PRIVATE int initLayout(int n, int dim, double **coords, node_t **nodes);
50
51#ifdef __cplusplus
52}
53#endif
macro for API hiding/exposing
#define PRIVATE
Definition api.h:16
Agraph_t * graph(char *name)
Definition gv.cpp:32
static opts_t opts
Definition gvgen.c:399
static const int dim
PRIVATE int initLayout(int n, int dim, double **coords, node_t **nodes)
Definition stress.c:130
PRIVATE float * mdsModel(vtx_data *graph, int nG)
Definition stress.c:667
PRIVATE int stress_majorization_kD_mkernel(vtx_data *graph, int n, double **coords, node_t **nodes, int dim, int opts, int model, int maxi)
Definition stress.c:801
PRIVATE float * circuitModel(vtx_data *graph, int nG)
Definition stress.c:168
PRIVATE float * compute_apsp_packed(vtx_data *graph, int n)
Definition stress.c:700
PRIVATE float * compute_apsp_artificial_weights_packed(vtx_data *graph, int n)
Definition stress.c:718