.\" .de Id .. .de Sp .if n .sp .if t .sp 0.4 .. .TH pair_set 7rheolef "rheolef-6.5" "rheolef-6.5" "rheolef-6.5" .\" label: /*Class: .SH NAME pair_set - a set of (index,value) pair (rheolef-6.5) .SH SYNOPSYS A class for: l = {(0,3.3),...(7,8.2)} i.e. a wrapper for STL \fBmap\fP with some assignment operators, such as l1 += l2. This class is suitable for use with the \fBarray\fP class, as \fBarray\fP (see array(2)). .SH TODO template with A=std::allocator or heap_allocator .\" skip start:AUTHOR: .\" skip start:DATE: .\" END .SH IMPLEMENTATION .\" begin_example .Sp .nf template > > class pair_set: public std::map, A> { public: // typedefs: typedef std::size_t size_type; typedef std::pair pair_type; typedef std::pair const_pair_type; typedef pair_type value_type; typedef A allocator_type; typedef std::map, allocator_type> base; typedef typename base::iterator iterator; typedef typename base::const_iterator const_iterator; // allocators: pair_set (const A& alloc = A()); pair_set (const pair_set& x, const A& alloc = A()); pair_set& operator= (const pair_set& x); void clear (); // basic algebra: semantic of a sparse vector pair_set& operator+= (const pair_type& x); // c := a union {x} template pair_set& operator+= (const pair_set& b); // c := a union b // boost mpi: template void serialize (Archive& ar, const unsigned int version); }; // io: template std::istream& operator>> (std::istream& is, pair_set& a); template std::ostream& operator<< (std::ostream& os, const pair_set& b); .Sp .fi .\" end_example .\" LENGTH = 1 .SH SEE ALSO array(2)