remove \r
[extl.git] / extl / container / sparse_matrix.h
blob9281d7c74e712e0211ab3d51dd55e4695c6ec786
1 /* ///////////////////////////////////////////////////////////////////////
2 * File: sparse_matrix.h
4 * Created: 08.12.07
5 * Updated: 08.12.07
7 * Brief: sparse_matrix class
9 * [<Home>]
10 * Copyright (c) 2008-2020, Waruqi All rights reserved.
11 * //////////////////////////////////////////////////////////////////// */
13 #ifndef EXTL_CONTAINER_SPARSE_MATRIX_H
14 #define EXTL_CONTAINER_SPARSE_MATRIX_H
16 /*!\file sparse_matrix.h
17 * \brief sparse_matrix class
20 /* ///////////////////////////////////////////////////////////////////////
21 * Includes
23 #include "prefix.h"
24 #include "sparse_matrix_base.h"
26 /* ///////////////////////////////////////////////////////////////////////
27 * ::extl namespace
29 EXTL_BEGIN_NAMESPACE
32 /*!\brief: sparse_matrix class
34 * \param Val The element type
36 * \ingroup extl_group_container
38 template<typename_param_k Val>
39 class sparse_matrix
40 : public sparse_matrix_base < sparse_matrix<Val>
41 , Val
44 private:
45 typedef sparse_matrix_base < sparse_matrix<Val>
46 , Val
47 > base_type;
49 /// \name Types
50 /// @{
51 public:
52 typedef sparse_matrix class_type;
53 typedef typename_type_k base_type::buffer_type buffer_type;
54 typedef typename_type_k base_type::allocator_type allocator_type;
55 typedef typename_type_k base_type::value_type value_type;
56 typedef typename_type_k base_type::pointer pointer;
57 typedef typename_type_k base_type::const_pointer const_pointer;
58 typedef typename_type_k base_type::reference reference;
59 typedef typename_type_k base_type::const_reference const_reference;
60 typedef typename_type_k base_type::size_type size_type;
61 typedef typename_type_k base_type::bool_type bool_type;
62 typedef typename_type_k base_type::difference_type difference_type;
63 typedef typename_type_k base_type::int_type int_type;
64 typedef typename_type_k base_type::index_type index_type;
65 /// @}
67 /// \name Constructors
68 /// @{
69 public:
70 sparse_matrix()
71 : base_type()
74 sparse_matrix(class_type const& rhs)
75 : base_type(rhs)
78 sparse_matrix(index_type d0, index_type d1)
79 : base_type(d0, d1)
82 /// @}
84 /// \name Operators
85 /// @{
86 public:
87 class_type& operator=(class_type const& rhs) { return base_type::operator=(rhs); }
88 /// @}
92 /* ///////////////////////////////////////////////////////////////////////
93 * ::extl namespace
95 EXTL_END_NAMESPACE
97 /* //////////////////////////////////////////////////////////////////// */
98 #endif /* EXTL_CONTAINER_SPARSE_MATRIX_H */
99 /* //////////////////////////////////////////////////////////////////// */