PIPS-NLP
graphPart.h
Go to the documentation of this file.
1 /* PIPS-NLP *
2  * Authors: Nai-Yuan Chiang *
3  * (C) 2015 Argonne National Laboratory */
4 
5 #ifndef graphPart_H
6 #define graphPart_H
7 
8 //#include "metis.h"
9 
10 //typedef int idxtype;
11 
12 
13 class graphPart{
14 
15  public:
16  int npartsReq; // number of partition asked for
17  int actparts; // actrual number of partitions
18  int ncut_line; // number of line cuts
19 
20  int *vtxdist; // how to seperate the points in parmetis
21  int *xadj; // see Metis manual
22  int *adjncy; // see Metis manual
23  int *id_part; // part that each node should belong to
24 
25  int num_node;
26  int num_line;
27  int num_balCon; // number of balancing constraints. It should be at least 1. See Metis manual
28 
29  // weight of lines/nodes
30  int *vwgt;
31  int *adjwgt;
32 
33  int *vsize;
34  double *ubvec;
35  double *tpwgts;
36 
37 
38  char *gname;
39  char *dataname;
40 
41  int *line_status; // part that each line should belong to: -1, cut by metis; others: local line and part ID
42  int *line_start;
43  int *line_end;
44  char **line_name;
45  int *bus_name;
46  int *line_ID; // corresponding line ID in oops, convert the line order in Metis graph file to the one used in mps file
47 
48 
49  int *gen_status; // part that each generator should belong to
50  int *gen_bus; // connected bus
51  int num_gen; // number of generators
52 
53 
55 
56 
59  int *local_xadj;
61 
63 
64  int *local_vwgt;
66 
68 
69  /*---------------------------------------------------------------------------
70  Methods
71  ---------------------------------------------------------------------------*/
72 
73  /* ------------------- constructors and destructors ---------------------- */
74  graphPart();
75  ~graphPart();
76 
77 
78  /* ---------------------------------- methods ------------------------------ */
79 
80  public:
81  void computeGPfromGraphFile(const char gfilename[]);
82 
83  private:
84 
85  void _ReadGraph(const char gfilename[]);
87 
88 
89 
90 };
91 
92 
93 #endif
int * local_vwgt
Definition: graphPart.h:64
int ncut_line
Definition: graphPart.h:18
int * adjncy
Definition: graphPart.h:22
int * id_part
Definition: graphPart.h:23
int * vwgt
Definition: graphPart.h:30
int * line_end
Definition: graphPart.h:43
void _ReadGraph(const char gfilename[])
Definition: graphPart.cpp:91
Definition: graphPart.h:13
void distributeLocalAndGlobalVar()
Definition: graphPart.cpp:155
int * adjwgt
Definition: graphPart.h:31
int * vtxdist
Definition: graphPart.h:20
double * ubvec
Definition: graphPart.h:34
int DefineBlkFlag
Definition: graphPart.h:54
void computeGPfromGraphFile(const char gfilename[])
Definition: graphPart.cpp:228
int num_gen
Definition: graphPart.h:51
int local_gvnTxs
Definition: graphPart.h:57
int actparts
Definition: graphPart.h:17
char * dataname
Definition: graphPart.h:39
~graphPart()
Definition: graphPart.cpp:71
double * tpwgts
Definition: graphPart.h:35
int * vsize
Definition: graphPart.h:33
int * gen_bus
Definition: graphPart.h:50
int * local_id_part
Definition: graphPart.h:67
int * local_adjncy
Definition: graphPart.h:60
int * line_status
Definition: graphPart.h:41
int * local_xadj
Definition: graphPart.h:59
graphPart()
Definition: graphPart.cpp:34
char * gname
Definition: graphPart.h:38
int * line_start
Definition: graphPart.h:42
int * local_adjwgt
Definition: graphPart.h:62
int * xadj
Definition: graphPart.h:21
int npartsReq
Definition: graphPart.h:16
int local_numTxs
Definition: graphPart.h:58
int num_node
Definition: graphPart.h:25
int * line_ID
Definition: graphPart.h:46
int num_balCon
Definition: graphPart.h:27
int * bus_name
Definition: graphPart.h:45
char ** line_name
Definition: graphPart.h:44
int num_line
Definition: graphPart.h:26
int * gen_status
Definition: graphPart.h:49
int * local_vsize
Definition: graphPart.h:65