fwd.hpp 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  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. /// \file fwd.hpp is essentially used to forward declare the main types
  13. #ifndef BOOST_UBLAS_FWD_H
  14. #define BOOST_UBLAS_FWD_H
  15. #include <memory>
  16. #ifdef BOOST_UBLAS_CPP_GE_2011
  17. #include <array>
  18. #endif
  19. namespace boost { namespace numeric { namespace ublas {
  20. // Storage types
  21. template<class T, class ALLOC = std::allocator<T> >
  22. class unbounded_array;
  23. template<class T, std::size_t N, class ALLOC = std::allocator<T> >
  24. class bounded_array;
  25. template <class Z = std::size_t, class D = std::ptrdiff_t>
  26. class basic_range;
  27. template <class Z = std::size_t, class D = std::ptrdiff_t>
  28. class basic_slice;
  29. typedef basic_range<> range;
  30. typedef basic_slice<> slice;
  31. template<class A = unbounded_array<std::size_t> >
  32. class indirect_array;
  33. template<class I, class T, class ALLOC = std::allocator<std::pair<const I, T> > >
  34. class map_std;
  35. template<class I, class T, class ALLOC = std::allocator<std::pair<I, T> > >
  36. class map_array;
  37. // Expression types
  38. struct scalar_tag {};
  39. struct vector_tag {};
  40. template<class E>
  41. class vector_expression;
  42. template<class C>
  43. class vector_container;
  44. template<class E>
  45. class vector_reference;
  46. struct matrix_tag {};
  47. template<class E>
  48. class matrix_expression;
  49. template<class C>
  50. class matrix_container;
  51. template<class E>
  52. class matrix_reference;
  53. template<class V>
  54. class vector_range;
  55. template<class V>
  56. class vector_slice;
  57. template<class V, class IA = indirect_array<> >
  58. class vector_indirect;
  59. template<class M>
  60. class matrix_row;
  61. template<class M>
  62. class matrix_column;
  63. template<class M>
  64. class matrix_vector_range;
  65. template<class M>
  66. class matrix_vector_slice;
  67. template<class M, class IA = indirect_array<> >
  68. class matrix_vector_indirect;
  69. template<class M>
  70. class matrix_range;
  71. template<class M>
  72. class matrix_slice;
  73. template<class M, class IA = indirect_array<> >
  74. class matrix_indirect;
  75. template<class T, class A = unbounded_array<T> >
  76. class vector;
  77. #ifdef BOOST_UBLAS_CPP_GE_2011
  78. template<class T, std::size_t N, class A = std::array<T, N> >
  79. class fixed_vector;
  80. #endif
  81. template<class T, std::size_t N>
  82. class bounded_vector;
  83. template<class T = int, class ALLOC = std::allocator<T> >
  84. class unit_vector;
  85. template<class T = int, class ALLOC = std::allocator<T> >
  86. class zero_vector;
  87. template<class T = int, class ALLOC = std::allocator<T> >
  88. class scalar_vector;
  89. template<class T, std::size_t N>
  90. class c_vector;
  91. // Sparse vectors
  92. template<class T, class A = map_std<std::size_t, T> >
  93. class mapped_vector;
  94. template<class T, std::size_t IB = 0, class IA = unbounded_array<std::size_t>, class TA = unbounded_array<T> >
  95. class compressed_vector;
  96. template<class T, std::size_t IB = 0, class IA = unbounded_array<std::size_t>, class TA = unbounded_array<T> >
  97. class coordinate_vector;
  98. // Matrix orientation type
  99. struct unknown_orientation_tag {};
  100. struct row_major_tag {};
  101. struct column_major_tag {};
  102. // Matrix storage layout parameterisation
  103. template <class Z = std::size_t, class D = std::ptrdiff_t>
  104. struct basic_row_major;
  105. typedef basic_row_major<> row_major;
  106. template <class Z = std::size_t, class D = std::ptrdiff_t>
  107. struct basic_column_major;
  108. typedef basic_column_major<> column_major;
  109. template<class T, class L = row_major, class A = unbounded_array<T> >
  110. class matrix;
  111. #ifdef BOOST_UBLAS_CPP_GE_2011
  112. template<class T, std::size_t M, std::size_t N, class L = row_major, class A = std::array<T, M*N> >
  113. class fixed_matrix;
  114. #endif
  115. template<class T, std::size_t M, std::size_t N, class L = row_major>
  116. class bounded_matrix;
  117. template<class T = int, class ALLOC = std::allocator<T> >
  118. class identity_matrix;
  119. template<class T = int, class ALLOC = std::allocator<T> >
  120. class zero_matrix;
  121. template<class T = int, class ALLOC = std::allocator<T> >
  122. class scalar_matrix;
  123. template<class T, std::size_t M, std::size_t N>
  124. class c_matrix;
  125. template<class T, class L = row_major, class A = unbounded_array<unbounded_array<T> > >
  126. class vector_of_vector;
  127. template<class T, class L = row_major, class A = vector<compressed_vector<T> > >
  128. class generalized_vector_of_vector;
  129. // Triangular matrix type
  130. struct lower_tag {};
  131. struct upper_tag {};
  132. struct unit_lower_tag : public lower_tag {};
  133. struct unit_upper_tag : public upper_tag {};
  134. struct strict_lower_tag : public lower_tag {};
  135. struct strict_upper_tag : public upper_tag {};
  136. // Triangular matrix parameterisation
  137. template <class Z = std::size_t>
  138. struct basic_full;
  139. typedef basic_full<> full;
  140. template <class Z = std::size_t>
  141. struct basic_lower;
  142. typedef basic_lower<> lower;
  143. template <class Z = std::size_t>
  144. struct basic_upper;
  145. typedef basic_upper<> upper;
  146. template <class Z = std::size_t>
  147. struct basic_unit_lower;
  148. typedef basic_unit_lower<> unit_lower;
  149. template <class Z = std::size_t>
  150. struct basic_unit_upper;
  151. typedef basic_unit_upper<> unit_upper;
  152. template <class Z = std::size_t>
  153. struct basic_strict_lower;
  154. typedef basic_strict_lower<> strict_lower;
  155. template <class Z = std::size_t>
  156. struct basic_strict_upper;
  157. typedef basic_strict_upper<> strict_upper;
  158. // Special matrices
  159. template<class T, class L = row_major, class A = unbounded_array<T> >
  160. class banded_matrix;
  161. template<class T, class L = row_major, class A = unbounded_array<T> >
  162. class diagonal_matrix;
  163. template<class T, class TRI = lower, class L = row_major, class A = unbounded_array<T> >
  164. class triangular_matrix;
  165. template<class M, class TRI = lower>
  166. class triangular_adaptor;
  167. template<class T, class TRI = lower, class L = row_major, class A = unbounded_array<T> >
  168. class symmetric_matrix;
  169. template<class M, class TRI = lower>
  170. class symmetric_adaptor;
  171. template<class T, class TRI = lower, class L = row_major, class A = unbounded_array<T> >
  172. class hermitian_matrix;
  173. template<class M, class TRI = lower>
  174. class hermitian_adaptor;
  175. // Sparse matrices
  176. template<class T, class L = row_major, class A = map_std<std::size_t, T> >
  177. class mapped_matrix;
  178. template<class T, class L = row_major, class A = map_std<std::size_t, map_std<std::size_t, T> > >
  179. class mapped_vector_of_mapped_vector;
  180. template<class T, class L = row_major, std::size_t IB = 0, class IA = unbounded_array<std::size_t>, class TA = unbounded_array<T> >
  181. class compressed_matrix;
  182. template<class T, class L = row_major, std::size_t IB = 0, class IA = unbounded_array<std::size_t>, class TA = unbounded_array<T> >
  183. class coordinate_matrix;
  184. }}}
  185. #endif