33 #ifndef SPARSE_VECTOR_H_
34 #define SPARSE_VECTOR_H_
49 using container::const_iterator::operator *;
52 const T &
value()
const {
return (
operator *()).second; }
53 size_t index()
const {
return (
operator *()).first; }
58 using container::iterator::operator *;
61 const T &
value()
const {
return (
operator *()).second; }
62 T &
value() {
return (
operator *())->second; }
63 size_t index()
const {
return (
operator *()).first; }
108 UG_LOG(
"(" << it.index() <<
" -> " << it.value() <<
")");
Definition: sparse_vector.h:48
const T & value() const
Definition: sparse_vector.h:52
size_t index() const
Definition: sparse_vector.h:53
const_iterator(typename container::const_iterator it)
Definition: sparse_vector.h:51
Definition: sparse_vector.h:57
size_t index() const
Definition: sparse_vector.h:63
iterator(typename container::iterator it)
Definition: sparse_vector.h:60
T & value()
Definition: sparse_vector.h:62
const T & value() const
Definition: sparse_vector.h:61
Definition: sparse_vector.h:41
const_iterator begin() const
Definition: sparse_vector.h:69
container data
Definition: sparse_vector.h:44
bool has_connection(size_t c) const
Definition: sparse_vector.h:89
void print() const
Definition: sparse_vector.h:103
size_t size()
Definition: sparse_vector.h:94
T & operator()(size_t c)
Definition: sparse_vector.h:84
SparseVector(size_t s)
Definition: sparse_vector.h:66
const T & operator()(size_t c) const
Definition: sparse_vector.h:79
const_iterator end() const
Definition: sparse_vector.h:74
size_t m_size
Definition: sparse_vector.h:42
std::map< size_t, T > container
Definition: sparse_vector.h:43
T value_type
Definition: sparse_vector.h:46
size_t num_connections() const
Definition: sparse_vector.h:98
#define UG_LOG(msg)
Definition: log.h:367