X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=vector.h;h=b9cce52eef1bcfe58ea6b8a22f0cea8113d6f9d8;hb=616077bdd98fa8b5bb9c1a12102d54b016d91d86;hp=3ab5bc67e3286603ea7f6c6526510367366020b2;hpb=724875e6dd0a014986b5b279266e40e0187aba2a;p=libfirm diff --git a/vector.h b/vector.h index 3ab5bc67e..b9cce52ee 100644 --- a/vector.h +++ b/vector.h @@ -1,8 +1,36 @@ +/* + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. + * + * This file is part of libFirm. + * + * This file may be distributed and/or modified under the terms of the + * GNU General Public License version 2 as published by the Free Software + * Foundation and appearing in the file LICENSE.GPL included in the + * packaging of this file. + * + * Licensees holding valid libFirm Professional Edition licenses may use + * this file in accordance with the libFirm Commercial License. + * Agreement provided with the Software. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE. + */ + +/** + * @file + * @brief PBQP vector. + * @date 02.10.2008 + * @author Sebastian Buchwald + * @version $Id$ + */ #ifndef KAPS_VECTOR_H #define KAPS_VECTOR_H #include "vector_t.h" +num pbqp_add(num x, num y); + vector *vector_alloc(pbqp *pbqp, unsigned length); /* Copy the given vector. */ @@ -13,8 +41,16 @@ void vector_add(vector *sum, vector *summand); void vector_set(vector *vec, unsigned index, num value); -#if EXT_GRS_DEBUG -void vector_set_description(vector *vec, unsigned index, char *name); +#if KAPS_ENABLE_VECTOR_NAMES +void vector_set_description(vector *vec, unsigned index, const char *name); #endif +void vector_add_value(vector *vec, num value); + +void vector_add_matrix_col(vector *vec, pbqp_matrix *mat, unsigned col_index); +void vector_add_matrix_row(vector *vec, pbqp_matrix *mat, unsigned row_index); + +num vector_get_min(vector *vec); +unsigned vector_get_min_index(vector *vec); + #endif /* KAPS_VECTOR_H */