Dip
0.92.4
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
tmp
Dip-0.92.4
SYMPHONY
Applications
SPP
include
spp_types.h
Go to the documentation of this file.
1
/*===========================================================================*/
2
/* */
3
/* This file is part of a demonstration application for use with the */
4
/* SYMPHONY Branch, Cut, and Price Library. This application is a solver for */
5
/* the Set Partitioning Problem. */
6
/* */
7
/* (c) Copyright 2005-2013 Marta Eso and Ted Ralphs. All Rights Reserved. */
8
/* */
9
/* This application was originally developed by Marta Eso and was modified */
10
/* Ted Ralphs (ted@lehigh.edu) */
11
/* */
12
/* This software is licensed under the Eclipse Public License. Please see */
13
/* accompanying file for terms. */
14
/* */
15
/*===========================================================================*/
16
17
#ifndef _SPP_TYPES_H_
18
#define _SPP_TYPES_H_
19
20
#define row_ind_type short
21
22
typedef
struct
STATISTICS
{
23
int
freq
;
/* how many times the routine was invoked */
24
double
time
;
/* how much time was spent in this routine */
25
}
statistics
;
26
27
28
typedef
struct
COL_ORDERED
{
29
int
colnum
;
/* number of columns when this column
30
ordered matrix was created */
31
int
rownum
;
/* same for number of rows */
32
int
active_colnum
;
/* number of cols not marked for del */
33
int
nzcnt
;
/* number of nonzeros in the matrix */
34
int
*
colnames
;
35
char
*
col_deleted
;
/* a sequence of bits indicating which
36
columns are deleted */
37
double
*
obj
;
/* obj function coeffs */
38
int
*
matbeg
;
/* pos of beginning of cols in matind */
39
row_ind_type
*
matind
;
/* indices of rows listed for each col */
40
}
col_ordered
;
41
42
43
typedef
struct
ROW_ORDERED
{
44
int
rownum
;
/* number of rows when this row ordered
45
matrix was created. */
46
int
colnum
;
/* same for cols */
47
int
active_rownum
;
/* number of rows not marked for del */
48
int
nzcnt
;
/* nonzero_count */
49
int
*
rownames
;
50
char
*
row_deleted
;
/* delete bits */
51
int
*
rmatbeg
;
/* pos of beginning of rows in rmatind */
52
int
*
rmatind
;
/* indices of cols listed for each row */
53
}
row_ordered
;
54
55
56
/* define bit manipulating macros. (a,i): starting at the memory location
57
where a points to, find bit i; the order of bits is the following:
58
7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 23 22 ...
59
setbit sets this bit to 1; clrbit clears this bit; isset returns 0 (false)
60
if the bit is not set, and non-zero if it is set; isclr returns 1 (true)
61
if the bit is not set and 0 (false) if the bit is set. */
62
#ifndef setbit
63
#define setbit(a,i) ((a)[(i)/BITSPERBYTE] |= 1<<((i)%BITSPERBYTE))
64
#define clrbit(a,i) ((a)[(i)/BITSPERBYTE] &= ~(1<<((i)%BITSPERBYTE)))
65
#define isset(a,i) ((a)[(i)/BITSPERBYTE] & (1<<((i)%BITSPERBYTE)))
66
#define isclr(a,i) (((a)[(i)/BITSPERBYTE] & (1<<((i)%BITSPERBYTE))) == 0)
67
#endif
68
69
70
#endif
COL_ORDERED::col_deleted
char * col_deleted
Definition:
spp_types.h:35
COL_ORDERED::nzcnt
int nzcnt
Definition:
spp_types.h:33
ROW_ORDERED::rmatbeg
int * rmatbeg
Definition:
spp_types.h:51
row_ordered
struct ROW_ORDERED row_ordered
STATISTICS::freq
int freq
Definition:
spp_types.h:23
ROW_ORDERED::rownames
int * rownames
Definition:
spp_types.h:49
ROW_ORDERED::active_rownum
int active_rownum
Definition:
spp_types.h:47
COL_ORDERED::colnames
int * colnames
Definition:
spp_types.h:34
COL_ORDERED
Definition:
spp_types.h:28
ROW_ORDERED::colnum
int colnum
Definition:
spp_types.h:46
row_ind_type
#define row_ind_type
Definition:
spp_types.h:20
col_ordered
struct COL_ORDERED col_ordered
statistics
struct STATISTICS statistics
STATISTICS::time
double time
Definition:
spp_types.h:24
ROW_ORDERED
Definition:
spp_types.h:43
ROW_ORDERED::nzcnt
int nzcnt
Definition:
spp_types.h:48
COL_ORDERED::matind
row_ind_type * matind
Definition:
spp_types.h:39
STATISTICS
Definition:
spp_types.h:22
ROW_ORDERED::row_deleted
char * row_deleted
Definition:
spp_types.h:50
ROW_ORDERED::rmatind
int * rmatind
Definition:
spp_types.h:52
COL_ORDERED::obj
double * obj
Definition:
spp_types.h:37
COL_ORDERED::rownum
int rownum
Definition:
spp_types.h:31
COL_ORDERED::active_colnum
int active_colnum
Definition:
spp_types.h:32
COL_ORDERED::matbeg
int * matbeg
Definition:
spp_types.h:38
ROW_ORDERED::rownum
int rownum
Definition:
spp_types.h:44
COL_ORDERED::colnum
int colnum
Definition:
spp_types.h:29
Generated by
1.8.5