| 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 |
| 16 |
extern "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 */ |
| 35 |
PRIVATE 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, /* dimensionality of layout */ |
| 40 |
int opts, /* option flags */ |
| 41 |
int model, /* model */ |
| 42 |
int maxi /* max iterations */ |
| 43 |
); |
| 44 |
|
| 45 |
PRIVATE float *compute_apsp_packed(vtx_data * graph, int n); |
| 46 |
PRIVATE float *compute_apsp_artificial_weights_packed(vtx_data *graph, int n); |
| 47 |
PRIVATE float* circuitModel(vtx_data * graph, int nG); |
| 48 |
PRIVATE float* mdsModel (vtx_data * graph, int nG); |
| 49 |
PRIVATE int initLayout(int n, int dim, double **coords, node_t **nodes); |
| 50 |
|
| 51 |
#ifdef __cplusplus |
| 52 |
} |
| 53 |
#endif |