~ubuntu-branches/ubuntu/trusty/scotch/trusty

« back to all changes in this revision

Viewing changes to src/libscotch/bgraph_bipart_gg.h

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme
  • Date: 2008-01-25 09:13:53 UTC
  • Revision ID: james.westby@ubuntu.com-20080125091353-zghdao60dfsyc2bt
Tags: upstream-5.0.1.dfsg
ImportĀ upstreamĀ versionĀ 5.0.1.dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright 2004,2007 ENSEIRB, INRIA & CNRS
 
2
**
 
3
** This file is part of the Scotch software package for static mapping,
 
4
** graph partitioning and sparse matrix ordering.
 
5
**
 
6
** This software is governed by the CeCILL-C license under French law
 
7
** and abiding by the rules of distribution of free software. You can
 
8
** use, modify and/or redistribute the software under the terms of the
 
9
** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following
 
10
** URL: "http://www.cecill.info".
 
11
** 
 
12
** As a counterpart to the access to the source code and rights to copy,
 
13
** modify and redistribute granted by the license, users are provided
 
14
** only with a limited warranty and the software's author, the holder of
 
15
** the economic rights, and the successive licensors have only limited
 
16
** liability.
 
17
** 
 
18
** In this respect, the user's attention is drawn to the risks associated
 
19
** with loading, using, modifying and/or developing or reproducing the
 
20
** software by the user in light of its specific status of free software,
 
21
** that may mean that it is complicated to manipulate, and that also
 
22
** therefore means that it is reserved for developers and experienced
 
23
** professionals having in-depth computer knowledge. Users are therefore
 
24
** encouraged to load and test the software's suitability as regards
 
25
** their requirements in conditions enabling the security of their
 
26
** systems and/or data to be ensured and, more generally, to use and
 
27
** operate it in the same conditions as regards security.
 
28
** 
 
29
** The fact that you are presently reading this means that you have had
 
30
** knowledge of the CeCILL-C license and that you accept its terms.
 
31
*/
 
32
/************************************************************/
 
33
/**                                                        **/
 
34
/**   NAME       : bgraph_bipart_gg.h                      **/
 
35
/**                                                        **/
 
36
/**   AUTHOR     : Francois PELLEGRINI                     **/
 
37
/**                Luca SCARANO (v3.1)                     **/
 
38
/**                                                        **/
 
39
/**   FUNCTION   : This module contains the function       **/
 
40
/**                declarations for the greedy graph       **/
 
41
/**                growing bipartitioning method.          **/
 
42
/**                                                        **/
 
43
/**   DATES      : # Version 3.1  : from : 07 jan 1996     **/
 
44
/**                                 to     29 apr 1996     **/
 
45
/**                # Version 3.2  : from : 20 sep 1996     **/
 
46
/**                                 to     13 sep 1998     **/
 
47
/**                # Version 3.3  : from : 01 oct 1998     **/
 
48
/**                                 to     01 oct 1998     **/
 
49
/**                # Version 4.0  : from : 09 jan 2004     **/
 
50
/**                                 to     09 jan 2004     **/
 
51
/**                                                        **/
 
52
/************************************************************/
 
53
 
 
54
/*
 
55
**  The defines.
 
56
*/
 
57
 
 
58
/*+ System-defined constants. +*/
 
59
 
 
60
#define BGRAPHBIPARTGGGAINTABLSUBBITS 1
 
61
 
 
62
#define BGRAPHBIPARTGGSTATEFREE     ((GainLink *) 0) /*+ Vertex in initial state (TRICK: must be 0) +*/
 
63
#define BGRAPHBIPARTGGSTATEUSED     ((GainLink *) 1) /*+ Swapped vertex                             +*/
 
64
#define BGRAPHBIPARTGGSTATELINK     ((GainLink *) 2) /*+ Currently in gain table if higher          +*/
 
65
 
 
66
/*
 
67
**  The type and structure definitions.
 
68
*/
 
69
 
 
70
/** Method parameters. **/
 
71
 
 
72
typedef struct BgraphBipartGgParam_ {
 
73
  INT                       passnbr;              /*+ Number of passes to do +*/
 
74
} BgraphBipartGgParam;
 
75
 
 
76
/*+ The complementary vertex structure. For
 
77
    trick reasons, the gain table data structure
 
78
    must be the first field of the structure.    +*/
 
79
 
 
80
typedef struct BgraphBipartGgVertex_ {
 
81
  GainLink                  gainlink;             /*+ Gain link: FIRST                       +*/
 
82
  Gnum                      commgain0;            /*+ Gain if vertex and neighbors in part 0 +*/
 
83
  Gnum                      commgain;             /*+ Gain value                             +*/
 
84
} BgraphBipartGgVertex;
 
85
 
 
86
/*
 
87
**  The function prototypes.
 
88
*/
 
89
 
 
90
#ifndef BGRAPH_BIPART_GG
 
91
#define static
 
92
#endif
 
93
 
 
94
int                         bgraphBipartGg      (Bgraph * restrict const, const BgraphBipartGgParam * const);
 
95
 
 
96
#undef static