24 #ifndef PPL_Sparse_Row_templates_hh
25 #define PPL_Sparse_Row_templates_hh 1
30 template <
typename Func1,
typename Func2>
33 const Func1& f,
const Func2& g) {
47 while (i != i_end && j != j_end) {
84 template <
typename Func1,
typename Func2>
99 template <
typename Func1,
typename Func2,
typename Func3>
102 const Func2& g,
const Func3& h) {
116 while (i != i_end && j != j_end) {
150 PPL_ASSERT(i == i_end || j == j_end);
173 #endif // !defined(PPL_Sparse_Row_templates_hh)
dimension_type index() const
Returns the index of the element pointed to by *this.
void combine_needs_first(const Sparse_Row &y, const Func1 &f, const Func2 &g)
Calls g(x[i],y[i]), for each i.
void combine_needs_second(const Sparse_Row &y, const Func1 &g, const Func2 &h)
Calls g(x[i],y[i]), for each i.
iterator reset(iterator i)
Resets to zero the value pointed to by i.
A finite sparse sequence of coefficients.
An iterator on the tree elements, ordered by key.
const iterator & end()
Returns an iterator that points after the last stored element.
iterator insert(dimension_type i, Coefficient_traits::const_reference x)
Equivalent to (*this)[i] = x; find(i), but faster.
The entire library is confined to this namespace.
A const iterator on the tree elements, ordered by key.
iterator lower_bound(dimension_type i)
Lower bound of index i.
iterator begin()
Returns an iterator that points at the first stored element.
dimension_type index() const
Returns the index of the element pointed to by *this.
void combine(const Sparse_Row &y, const Func1 &f, const Func2 &g, const Func3 &h)
Calls g(x[i],y[i]), for each i.