File: dstruct.h

package info (click to toggle)
qsopt-ex 2.5.10.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,152 kB
  • sloc: ansic: 43,343; sh: 427; makefile: 212
file content (134 lines) | stat: -rw-r--r-- 5,476 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/****************************************************************************/
/*                                                                          */
/*  This file is part of QSopt_ex.                                          */
/*                                                                          */
/*  (c) Copyright 2006 by David Applegate, William Cook, Sanjeeb Dash,      */
/*  and Daniel Espinoza                                                     */
/*                                                                          */
/*  Sanjeeb Dash ownership of copyright in QSopt_ex is derived from his     */
/*  copyright in QSopt.                                                     */
/*                                                                          */
/*  This code may be used under the terms of the GNU General Public License */
/*  (Version 2.1 or later) as published by the Free Software Foundation.    */
/*                                                                          */
/*  Alternatively, use is granted for research purposes only.               */
/*                                                                          */
/*  It is your choice of which of these two licenses you are operating      */
/*  under.                                                                  */
/*                                                                          */
/*  We make no guarantees about the correctness or usefulness of this code. */
/*                                                                          */
/****************************************************************************/

/* RCSINFO $Id: dstruct_EGLPNUM_TYPENAME.h,v 1.3 2003/11/05 16:57:39 meven Exp $ */
/****************************************************************************/
/*                                                                          */
/*                           EGLPNUM_TYPENAME_svector.h                                      */
/*                                                                          */
/****************************************************************************/

#ifndef EGLPNUM_TYPENAME___SVECTOR_H
#define EGLPNUM_TYPENAME___SVECTOR_H

#include "eg_io.h"

typedef struct EGLPNUM_TYPENAME_svector
{
	int nzcnt;
	int *indx;
	int size;
	EGLPNUM_TYPE *coef;
}
EGLPNUM_TYPENAME_svector;

void EGLPNUM_TYPENAME_ILLsvector_init (
	EGLPNUM_TYPENAME_svector * s),
  EGLPNUM_TYPENAME_ILLsvector_free (
	EGLPNUM_TYPENAME_svector * s);

int EGLPNUM_TYPENAME_ILLsvector_alloc (
	EGLPNUM_TYPENAME_svector * s,
	int nzcnt),
  EGLPNUM_TYPENAME_ILLsvector_copy (
	const EGLPNUM_TYPENAME_svector * s_in,
	EGLPNUM_TYPENAME_svector * s_out);

#endif /* EGLPNUM_TYPENAME___SVECTOR_H */

/****************************************************************************/
/*                                                                          */
/*                           EGLPNUM_TYPENAME_heap.h                                         */
/*                                                                          */
/****************************************************************************/

#ifndef EGLPNUM_TYPENAME___HEAP_H
#define EGLPNUM_TYPENAME___HEAP_H

typedef struct
{
	int *entry;
	int *loc;
	EGLPNUM_TYPE *key;
	int hexist;
	int maxsize;
	int size;
}
EGLPNUM_TYPENAME_heap;

void EGLPNUM_TYPENAME_ILLheap_insert (
	EGLPNUM_TYPENAME_heap * const h,
	int const ix),
  EGLPNUM_TYPENAME_ILLheap_modify (
	EGLPNUM_TYPENAME_heap * const h,
	int const ix),
  EGLPNUM_TYPENAME_ILLheap_delete (
	EGLPNUM_TYPENAME_heap * const h,
	int const ix),
  EGLPNUM_TYPENAME_ILLheap_init (
	EGLPNUM_TYPENAME_heap * const h),
  EGLPNUM_TYPENAME_ILLheap_free (
	EGLPNUM_TYPENAME_heap * const h);

int EGLPNUM_TYPENAME_ILLheap_findmin (
	EGLPNUM_TYPENAME_heap * const h),
  EGLPNUM_TYPENAME_ILLheap_build (
	EGLPNUM_TYPENAME_heap * const h,
	int const nelems,
	EGLPNUM_TYPE * key);

#endif /* EGLPNUM_TYPENAME___HEAP_H */

/****************************************************************************/
/*                                                                          */
/*                         matrix.h                                         */
/*                                                                          */
/****************************************************************************/

#ifndef EGLPNUM_TYPENAME___MATRIX_H
#define EGLPNUM_TYPENAME___MATRIX_H

typedef struct EGLPNUM_TYPENAME_ILLmatrix
{
	EGLPNUM_TYPE *matval;						/* The coefficients.                       */
	int *matcnt;									/* Number of coefs in each col.            */
	int *matind;									/* The row indices of the coefs.           */
	int *matbeg;									/* The start of each col.                  */
	int matcols;									/* Number of columns.                      */
	int matrows;
	int matcolsize;								/* Length of matbeg and matcnt.            */
	int matsize;									/* Length of matind and matval.            */
	int matfree;									/* Free space at end of matind.            */
	/* Note: free elements marked by -1 in     */
	/* matind; we keep at least 1 free at end. */
}
EGLPNUM_TYPENAME_ILLmatrix;

void EGLPNUM_TYPENAME_ILLmatrix_init (
	EGLPNUM_TYPENAME_ILLmatrix * A);
void EGLPNUM_TYPENAME_ILLmatrix_free (
	EGLPNUM_TYPENAME_ILLmatrix * A);
void EGLPNUM_TYPENAME_ILLmatrix_prt (
	EGioFile_t * fd,
	EGLPNUM_TYPENAME_ILLmatrix * A);

#endif /* EGLPNUM_TYPENAME___MATRIX_H */