2 // Copyright (c) 2000-2010
3 // Joerg Walter, Mathias Koch, David Bellot
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)
9 // The authors gratefully acknowledge the support of
10 // GeNeSys mbH & Co. KG in producing this work.
13 /// \file fwd.hpp is essentially used to forward declare the main types
15 #ifndef BOOST_UBLAS_FWD_H
16 #define BOOST_UBLAS_FWD_H
20 #ifdef BOOST_UBLAS_CPP_GE_2011
24 namespace boost { namespace numeric { namespace ublas {
27 template<class T, class ALLOC = std::allocator<T> >
28 class unbounded_array;
30 template<class T, std::size_t N, class ALLOC = std::allocator<T> >
33 template <class Z = std::size_t, class D = std::ptrdiff_t>
35 template <class Z = std::size_t, class D = std::ptrdiff_t>
37 typedef basic_range<> range;
38 typedef basic_slice<> slice;
39 template<class A = unbounded_array<std::size_t> >
42 template<class I, class T, class ALLOC = std::allocator<std::pair<const I, T> > >
44 template<class I, class T, class ALLOC = std::allocator<std::pair<I, T> > >
52 class vector_expression;
54 class vector_container;
57 class vector_reference;
62 class matrix_expression;
64 class matrix_container;
67 class matrix_reference;
73 template<class V, class IA = indirect_array<> >
74 class vector_indirect;
81 class matrix_vector_range;
83 class matrix_vector_slice;
84 template<class M, class IA = indirect_array<> >
85 class matrix_vector_indirect;
90 template<class M, class IA = indirect_array<> >
91 class matrix_indirect;
93 template<class T, class A = unbounded_array<T> >
95 #ifdef BOOST_UBLAS_CPP_GE_2011
96 template<class T, std::size_t N, class A = std::array<T, N> >
99 template<class T, std::size_t N>
100 class bounded_vector;
102 template<class T = int, class ALLOC = std::allocator<T> >
104 template<class T = int, class ALLOC = std::allocator<T> >
106 template<class T = int, class ALLOC = std::allocator<T> >
109 template<class T, std::size_t N>
113 template<class T, class A = map_std<std::size_t, T> >
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;
120 // Matrix orientation type
121 struct unknown_orientation_tag {};
122 struct row_major_tag {};
123 struct column_major_tag {};
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;
130 template <class Z = std::size_t, class D = std::ptrdiff_t>
131 struct basic_column_major;
132 typedef basic_column_major<> column_major;
134 template<class T, class L = row_major, class A = unbounded_array<T> >
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> >
140 template<class T, std::size_t M, std::size_t N, class L = row_major>
141 class bounded_matrix;
143 template<class T = int, class ALLOC = std::allocator<T> >
144 class identity_matrix;
145 template<class T = int, class ALLOC = std::allocator<T> >
147 template<class T = int, class ALLOC = std::allocator<T> >
150 template<class T, std::size_t M, std::size_t N>
153 template<class T, class L = row_major, class A = unbounded_array<unbounded_array<T> > >
154 class vector_of_vector;
156 template<class T, class L = row_major, class A = vector<compressed_vector<T> > >
157 class generalized_vector_of_vector;
159 // Triangular matrix type
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 {};
167 // Triangular matrix parameterisation
168 template <class Z = std::size_t>
170 typedef basic_full<> full;
172 template <class Z = std::size_t>
174 typedef basic_lower<> lower;
176 template <class Z = std::size_t>
178 typedef basic_upper<> upper;
180 template <class Z = std::size_t>
181 struct basic_unit_lower;
182 typedef basic_unit_lower<> unit_lower;
184 template <class Z = std::size_t>
185 struct basic_unit_upper;
186 typedef basic_unit_upper<> unit_upper;
188 template <class Z = std::size_t>
189 struct basic_strict_lower;
190 typedef basic_strict_lower<> strict_lower;
192 template <class Z = std::size_t>
193 struct basic_strict_upper;
194 typedef basic_strict_upper<> strict_upper;
197 template<class T, class L = row_major, class A = unbounded_array<T> >
199 template<class T, class L = row_major, class A = unbounded_array<T> >
200 class diagonal_matrix;
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;
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;
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;
218 template<class T, class L = row_major, class A = map_std<std::size_t, T> >
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;