Fixed some size_t related warnings.
[libfirm] / ir / kaps / vector.h
1 /*
2  * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
6  * This file may be distributed and/or modified under the terms of the
7  * GNU General Public License version 2 as published by the Free Software
8  * Foundation and appearing in the file LICENSE.GPL included in the
9  * packaging of this file.
10  *
11  * Licensees holding valid libFirm Professional Edition licenses may use
12  * this file in accordance with the libFirm Commercial License.
13  * Agreement provided with the Software.
14  *
15  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE.
18  */
19
20 /**
21  * @file
22  * @brief   PBQP vector.
23  * @date    02.10.2008
24  * @author  Sebastian Buchwald
25  * @version $Id$
26  */
27 #ifndef KAPS_VECTOR_H
28 #define KAPS_VECTOR_H
29
30 #include "vector_t.h"
31
32 num pbqp_add(num x, num y);
33
34 vector_t *vector_alloc(pbqp_t *pbqp, unsigned length);
35
36 /* Copy the given vector. */
37 vector_t *vector_copy(pbqp_t *pbqp, vector_t *v);
38
39 /* sum += summand */
40 void vector_add(vector_t *sum, vector_t *summand);
41
42 void vector_set(vector_t *vec, unsigned index, num value);
43
44 #if KAPS_ENABLE_VECTOR_NAMES
45 void vector_set_description(vector_t *vec, unsigned index, const char *name);
46 #endif
47
48 void vector_add_value(vector_t *vec, num value);
49
50 void vector_add_matrix_col(vector_t *vec, pbqp_matrix_t *mat, unsigned col_index);
51 void vector_add_matrix_row(vector_t *vec, pbqp_matrix_t *mat, unsigned row_index);
52
53 num vector_get_min(vector_t *vec);
54 unsigned vector_get_min_index(vector_t *vec);
55
56 #endif /* KAPS_VECTOR_H */