TaPAS  0.2
vsp.h
Go to the documentation of this file.
1 /*
2  * vsp.h -- Vector spaces
3  *
4  * This file is a part of the Talence Linear Algebra Library.
5  *
6  * Copyright (C) 2010 CNRS UMR 5800 & Université Bordeaux I (see AUTHORS file).
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21  * 02110-1301 USA
22  */
23 
29 #ifndef __VSP_H__
30 # define __VSP_H__
31 
32 # include <talalib/common.h>
33 # include <talalib/vec.h>
34 # include <talalib/matrix.h>
35 
36 BEGIN_C_DECLS
37 
38 typedef struct tla_vsp_st {
39  int size;
40  int dim;
41  struct {
42  int i;
43  tla_vec_t v;
44  } *gen;
45 } tla_vsp_t[1];
46 
47 extern void
48 tla_vsp_init (tla_vsp_t vsp, int size);
49 extern void
50 tla_vsp_clear (tla_vsp_t vsp);
51 # define tla_vsp_get_size(vsp) ((vsp)->size)
52 # define tla_vsp_get_dim(vsp) ((vsp)->dim)
53 extern void
54 tla_vsp_canonicalize (tla_vsp_t vsp);
55 extern void
56 tla_vsp_set (tla_vsp_t vsp, const tla_vsp_t other);
57 extern void
58 tla_vsp_set_zero (tla_vsp_t vsp);
59 extern int
60 tla_vsp_are_equal (const tla_vsp_t vsp, const tla_vsp_t other);
61 extern void
62 tla_vsp_inv_gamma0 (tla_vsp_t res, const tla_vsp_t v);
63 extern void
64 tla_vsp_get_base (tla_vec_t *base, int *base_size, const tla_vsp_t V);
65 extern int
66 tla_vsp_add_generator (tla_vsp_t res, const tla_vsp_t vsp, const tla_vec_t x);
67 extern void
68 tla_vsp_to_alphas (const tla_vsp_t V, tla_matrix_t R);
69 extern int
70 tla_vsp_has (const tla_vsp_t V, const tla_vec_t x);
71 extern int
72 tla_vsp_is_included_in (const tla_vsp_t V1, const tla_vsp_t V2);
73 extern int
74 tla_vsp_get_integral (const tla_vsp_t V, const tla_vec_t x, tla_vec_t y);
75 
76 extern void
77 tla_vsp_compute_y (tla_vec_t y, const tla_vsp_t V, const tla_vec_t x);
78 
79 extern void
80 tla_vsp_add_generator_with_y (tla_vsp_t res, const tla_vsp_t vsp,
81  const tla_vec_t y, tla_vec_t yy);
82 
83 END_C_DECLS
84 
85 #endif /* ! __VSP_H__ */