24 #ifndef PPL_DB_Matrix_defs_hh
25 #define PPL_DB_Matrix_defs_hh 1
38 namespace IO_Operators {
40 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
43 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
46 operator<<(std::ostream& s, const DB_Matrix<T>&
c);
53 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
60 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
92 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
95 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
104 typedef typename std::iterator_traits<Iter>::value_type
value_type;
105 typedef typename std::iterator_traits<Iter>::difference_type
107 typedef typename std::iterator_traits<Iter>::pointer
pointer;
108 typedef typename std::iterator_traits<Iter>::reference
reference;
233 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
236 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
237 template <
typename T>
240 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
243 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
244 template <
typename T>
247 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
250 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
251 template <
typename T>
254 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
266 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
267 template <
typename Temp,
typename To,
typename T>
276 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
288 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
289 template <
typename Temp,
typename To,
typename T>
298 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
310 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
311 template <
typename Temp,
typename To,
typename T>
325 #endif // !defined(PPL_DB_Matrix_defs_hh)
bool operator!=(const const_iterator &y) const
Returns true if and only if *this and y are different.
bool operator!=(const Box< ITV > &x, const Box< ITV > &y)
A read-only iterator over the rows of the matrix.
void swap(CO_Tree &x, CO_Tree &y)
size_t dimension_type
An unsigned integral type for representing space dimensions.
Iter i
The const iterator on the rows' vector rows.
memory_size_type external_memory_in_bytes() const
Returns the size in bytes of the memory managed by *this.
std::vector< DB_Row< T > >::const_iterator Iter
Rounding_Dir
Rounding directions for arithmetic computations.
std::iterator_traits< Iter >::difference_type difference_type
const_iterator()
Default constructor.
const_iterator end() const
Returns the past-the-end const_iterator.
std::vector< DB_Row< T > > rows
The rows of the matrix.
reference operator*() const
Dereference operator.
const_iterator & operator=(const const_iterator &y)
Assignment operator.
void grow(dimension_type new_n_rows)
Makes the matrix grow by adding more rows and more columns.
DB_Matrix()
Builds an empty matrix.
DB_Matrix & operator=(const DB_Matrix &y)
Assignment operator.
const_iterator begin() const
Returns the const_iterator pointing to the first row, if *this is not empty; otherwise, returns the past-the-end const_iterator.
void resize_no_copy(dimension_type new_n_rows)
Resizes the matrix without worrying about the old contents.
The base class for the single rows of matrices.
bool OK() const
Checks if all the invariants are satisfied.
A wrapper for numeric types implementing a given policy.
#define PPL_OUTPUT_DECLARATIONS
static dimension_type max_num_rows()
Returns the maximum number of rows a DB_Matrix can handle.
dimension_type row_size
Size of the initialized part of each row.
std::iterator_traits< Iter >::pointer pointer
DB_Row< T > & operator[](dimension_type k)
Returns a reference to the k-th row of the matrix.
const_iterator & operator++()
Prefix increment operator.
bool operator==(const const_iterator &y) const
Returns true if and only if *this and y are identical.
bool ascii_load(std::istream &s)
Loads from s an ASCII representation (as produced by ascii_dump(std::ostream&) const) and sets *this ...
dimension_type num_rows() const
Returns the number of rows in the matrix.
dimension_type row_capacity
Capacity allocated for each row, i.e., number of long objects that each row can contain.
std::iterator_traits< Iter >::value_type value_type
void m_swap(DB_Matrix &y)
Swaps *this with y.
The entire library is confined to this namespace.
std::forward_iterator_tag iterator_category
static dimension_type max_num_columns()
Returns the maximum number of columns a DB_Matrix can handle.
pointer operator->() const
Indirect member selector.
memory_size_type total_memory_in_bytes() const
Returns the total size in bytes of the memory occupied by *this.
bool operator==(const Box< ITV > &x, const Box< ITV > &y)
size_t memory_size_type
An unsigned integral type for representing memory size in bytes.
The base class for the square matrices.
std::iterator_traits< Iter >::reference reference