Graphviz  2.29.20120524.0446
lib/neatogen/stress.h
Go to the documentation of this file.
00001 /* $Id$ $Revision$ */
00002 /* vim:set shiftwidth=4 ts=8: */
00003 
00004 /*************************************************************************
00005  * Copyright (c) 2011 AT&T Intellectual Property 
00006  * All rights reserved. This program and the accompanying materials
00007  * are made available under the terms of the Eclipse Public License v1.0
00008  * which accompanies this distribution, and is available at
00009  * http://www.eclipse.org/legal/epl-v10.html
00010  *
00011  * Contributors: See CVS logs. Details at http://www.graphviz.org/
00012  *************************************************************************/
00013 
00014 #ifdef __cplusplus
00015 extern "C" {
00016 #endif
00017 
00018 
00019 #ifndef STRESS_H
00020 #define STRESS_H
00021 
00022 #include "defs.h"
00023 
00024 #define tolerance_cg 1e-3
00025 
00026 #define DFLT_ITERATIONS 200
00027 
00028 #define DFLT_TOLERANCE 1e-4
00029 
00030     /* some possible values for 'num_pivots_stress' */
00031 #define num_pivots_stress 40
00032 #define num_pivots_smart_ini   0
00033 #define num_pivots_no_ini   50
00034 
00035     /* relevant when using sparse distance matrix
00036      * when optimizing within subspace it can be set to 0
00037      * otherwise, recommended value is above zero (usually around 3-6)
00038      * some possible values for 'neighborhood_radius'
00039      */
00040 #define neighborhood_radius_unrestricted  4
00041 #define neighborhood_radius_subspace 0
00042 
00043 #define opt_smart_init 0x4
00044 #define opt_exp_flag   0x3
00045 
00046     /* Full dense stress optimization (equivalent to Kamada-Kawai's energy) */
00047     /* Slowest and most accurate optimization */
00048     extern int stress_majorization_kD_mkernel(vtx_data * graph, /* Input graph in sparse representation */
00049                                               int n,    /* Number of nodes */
00050                                               int nedges_graph, /* Number of edges */
00051                                               double **coords,  /* coordinates of nodes (output layout)  */
00052                                               node_t **nodes,   /* original nodes  */
00053                                               int dim,  /* dimemsionality of layout */
00054                                               int opts, /* option flags */
00055                                               int model,        /* model */
00056                                               int maxi  /* max iterations */
00057         );
00058 
00059 extern float *compute_apsp_packed(vtx_data * graph, int n);
00060 extern float *compute_apsp_artifical_weights_packed(vtx_data * graph, int n);
00061 extern float* circuitModel(vtx_data * graph, int nG);
00062 extern float* mdsModel (vtx_data * graph, int nG);
00063 extern int initLayout(vtx_data * graph, int n, int dim, double **coords, node_t** nodes);
00064 
00065 #endif
00066 
00067 #ifdef __cplusplus
00068 }
00069 #endif