1 | // |
2 | // Copyright (c) 2000-2010 |
3 | // Joerg Walter, Mathias Koch, David Bellot |
4 | // |
5 | // Distributed under the Boost Software License, Version 1.0. (See |
6 | // accompanying file LICENSE_1_0.txt or copy at |
7 | // http://www.boost.org/LICENSE_1_0.txt) |
8 | // |
9 | // The authors gratefully acknowledge the support of |
10 | // GeNeSys mbH & Co. KG in producing this work. |
11 | // |
12 | |
13 | /// \file fwd.hpp is essentially used to forward declare the main types |
14 | |
15 | #ifndef BOOST_UBLAS_FWD_H |
16 | #define BOOST_UBLAS_FWD_H |
17 | |
18 | #include <memory> |
19 | |
20 | #ifdef BOOST_UBLAS_CPP_GE_2011 |
21 | #include <array> |
22 | #endif |
23 | |
24 | namespace boost { namespace numeric { namespace ublas { |
25 | |
26 | // Storage types |
27 | template<class T, class ALLOC = std::allocator<T> > |
28 | class unbounded_array; |
29 | |
30 | template<class T, std::size_t N, class ALLOC = std::allocator<T> > |
31 | class bounded_array; |
32 | |
33 | template <class Z = std::size_t, class D = std::ptrdiff_t> |
34 | class basic_range; |
35 | template <class Z = std::size_t, class D = std::ptrdiff_t> |
36 | class basic_slice; |
37 | typedef basic_range<> range; |
38 | typedef basic_slice<> slice; |
39 | template<class A = unbounded_array<std::size_t> > |
40 | class indirect_array; |
41 | |
42 | template<class I, class T, class ALLOC = std::allocator<std::pair<const I, T> > > |
43 | class map_std; |
44 | template<class I, class T, class ALLOC = std::allocator<std::pair<I, T> > > |
45 | class map_array; |
46 | |
47 | // Expression types |
48 | struct scalar_tag {}; |
49 | |
50 | struct vector_tag {}; |
51 | template<class E> |
52 | class vector_expression; |
53 | template<class C> |
54 | class vector_container; |
55 | |
56 | template<class E> |
57 | class vector_reference; |
58 | |
59 | struct matrix_tag {}; |
60 | |
61 | template<class E> |
62 | class matrix_expression; |
63 | template<class C> |
64 | class matrix_container; |
65 | |
66 | template<class E> |
67 | class matrix_reference; |
68 | |
69 | template<class V> |
70 | class vector_range; |
71 | template<class V> |
72 | class vector_slice; |
73 | template<class V, class IA = indirect_array<> > |
74 | class vector_indirect; |
75 | |
76 | template<class M> |
77 | class matrix_row; |
78 | template<class M> |
79 | class matrix_column; |
80 | template<class M> |
81 | class matrix_vector_range; |
82 | template<class M> |
83 | class matrix_vector_slice; |
84 | template<class M, class IA = indirect_array<> > |
85 | class matrix_vector_indirect; |
86 | template<class M> |
87 | class matrix_range; |
88 | template<class M> |
89 | class matrix_slice; |
90 | template<class M, class IA = indirect_array<> > |
91 | class matrix_indirect; |
92 | |
93 | template<class T, class A = unbounded_array<T> > |
94 | class vector; |
95 | #ifdef BOOST_UBLAS_CPP_GE_2011 |
96 | template<class T, std::size_t N, class A = std::array<T, N> > |
97 | class fixed_vector; |
98 | #endif |
99 | template<class T, std::size_t N> |
100 | class bounded_vector; |
101 | |
102 | template<class T = int, class ALLOC = std::allocator<T> > |
103 | class unit_vector; |
104 | template<class T = int, class ALLOC = std::allocator<T> > |
105 | class zero_vector; |
106 | template<class T = int, class ALLOC = std::allocator<T> > |
107 | class scalar_vector; |
108 | |
109 | template<class T, std::size_t N> |
110 | class c_vector; |
111 | |
112 | // Sparse vectors |
113 | template<class T, class A = map_std<std::size_t, T> > |
114 | class mapped_vector; |
115 | template<class T, std::size_t IB = 0, class IA = unbounded_array<std::size_t>, class TA = unbounded_array<T> > |
116 | class compressed_vector; |
117 | template<class T, std::size_t IB = 0, class IA = unbounded_array<std::size_t>, class TA = unbounded_array<T> > |
118 | class coordinate_vector; |
119 | |
120 | // Matrix orientation type |
121 | struct unknown_orientation_tag {}; |
122 | struct row_major_tag {}; |
123 | struct column_major_tag {}; |
124 | |
125 | // Matrix storage layout parameterisation |
126 | template <class Z = std::size_t, class D = std::ptrdiff_t> |
127 | struct basic_row_major; |
128 | typedef basic_row_major<> row_major; |
129 | |
130 | template <class Z = std::size_t, class D = std::ptrdiff_t> |
131 | struct basic_column_major; |
132 | typedef basic_column_major<> column_major; |
133 | |
134 | template<class T, class L = row_major, class A = unbounded_array<T> > |
135 | class matrix; |
136 | #ifdef BOOST_UBLAS_CPP_GE_2011 |
137 | template<class T, std::size_t M, std::size_t N, class L = row_major, class A = std::array<T, M*N> > |
138 | class fixed_matrix; |
139 | #endif |
140 | template<class T, std::size_t M, std::size_t N, class L = row_major> |
141 | class bounded_matrix; |
142 | |
143 | template<class T = int, class ALLOC = std::allocator<T> > |
144 | class identity_matrix; |
145 | template<class T = int, class ALLOC = std::allocator<T> > |
146 | class zero_matrix; |
147 | template<class T = int, class ALLOC = std::allocator<T> > |
148 | class scalar_matrix; |
149 | |
150 | template<class T, std::size_t M, std::size_t N> |
151 | class c_matrix; |
152 | |
153 | template<class T, class L = row_major, class A = unbounded_array<unbounded_array<T> > > |
154 | class vector_of_vector; |
155 | |
156 | template<class T, class L = row_major, class A = vector<compressed_vector<T> > > |
157 | class generalized_vector_of_vector; |
158 | |
159 | // Triangular matrix type |
160 | struct lower_tag {}; |
161 | struct upper_tag {}; |
162 | struct unit_lower_tag : public lower_tag {}; |
163 | struct unit_upper_tag : public upper_tag {}; |
164 | struct strict_lower_tag : public lower_tag {}; |
165 | struct strict_upper_tag : public upper_tag {}; |
166 | |
167 | // Triangular matrix parameterisation |
168 | template <class Z = std::size_t> |
169 | struct basic_full; |
170 | typedef basic_full<> full; |
171 | |
172 | template <class Z = std::size_t> |
173 | struct basic_lower; |
174 | typedef basic_lower<> lower; |
175 | |
176 | template <class Z = std::size_t> |
177 | struct basic_upper; |
178 | typedef basic_upper<> upper; |
179 | |
180 | template <class Z = std::size_t> |
181 | struct basic_unit_lower; |
182 | typedef basic_unit_lower<> unit_lower; |
183 | |
184 | template <class Z = std::size_t> |
185 | struct basic_unit_upper; |
186 | typedef basic_unit_upper<> unit_upper; |
187 | |
188 | template <class Z = std::size_t> |
189 | struct basic_strict_lower; |
190 | typedef basic_strict_lower<> strict_lower; |
191 | |
192 | template <class Z = std::size_t> |
193 | struct basic_strict_upper; |
194 | typedef basic_strict_upper<> strict_upper; |
195 | |
196 | // Special matrices |
197 | template<class T, class L = row_major, class A = unbounded_array<T> > |
198 | class banded_matrix; |
199 | template<class T, class L = row_major, class A = unbounded_array<T> > |
200 | class diagonal_matrix; |
201 | |
202 | template<class T, class TRI = lower, class L = row_major, class A = unbounded_array<T> > |
203 | class triangular_matrix; |
204 | template<class M, class TRI = lower> |
205 | class triangular_adaptor; |
206 | |
207 | template<class T, class TRI = lower, class L = row_major, class A = unbounded_array<T> > |
208 | class symmetric_matrix; |
209 | template<class M, class TRI = lower> |
210 | class symmetric_adaptor; |
211 | |
212 | template<class T, class TRI = lower, class L = row_major, class A = unbounded_array<T> > |
213 | class hermitian_matrix; |
214 | template<class M, class TRI = lower> |
215 | class hermitian_adaptor; |
216 | |
217 | // Sparse matrices |
218 | template<class T, class L = row_major, class A = map_std<std::size_t, T> > |
219 | class mapped_matrix; |
220 | template<class T, class L = row_major, class A = map_std<std::size_t, map_std<std::size_t, T> > > |
221 | class mapped_vector_of_mapped_vector; |
222 | template<class T, class L = row_major, std::size_t IB = 0, class IA = unbounded_array<std::size_t>, class TA = unbounded_array<T> > |
223 | class compressed_matrix; |
224 | template<class T, class L = row_major, std::size_t IB = 0, class IA = unbounded_array<std::size_t>, class TA = unbounded_array<T> > |
225 | class coordinate_matrix; |
226 | |
227 | }}} |
228 | |
229 | #endif |
230 | |