Scroll to navigation

index_set(7) rheolef-7.0 index_set(7)

NAME

index_set - a set of indexes (rheolef-7.0)

SYNOPSIS

A class for: l = {1,3,...9} i.e. a wrapper for STL set<size_t> with some assignment operators, such as l1 += l2. This class is suitable for use with the disarray<T> class, as disarray<index_set> (see disarray(2)).

IMPLEMENTATION

class index_set : public std::set<std::size_t> {
public:
// typedefs:

typedef std::set<std::size_t> base;
typedef std::size_t value_type;
typedef std::size_t size_type; // allocators:
index_set ();
index_set (const index_set& x);
index_set& operator= (const index_set& x);
template <int N>
index_set& operator= (size_type x[N]);
void clear (); // basic algebra:
void insert (size_type dis_i); // a := a union {dis_i}
index_set& operator+= (size_type dis_i); // idem
index_set& operator+= (const index_set& b); // a := a union b
// a := a union b
void inplace_union (const index_set& b);
void inplace_intersection (const index_set& b);
// c := a union b
friend void set_union (const index_set& a, const index_set& b, index_set& c);
friend void set_intersection (const index_set& a, const index_set& b, index_set& c); // io:
friend std::istream& operator>> (std::istream& is, index_set& x);
friend std::ostream& operator<< (std::ostream& os, const index_set& x); // boost mpi: #ifdef _RHEOLEF_INDEX_SET_H #ifdef _RHEOLEF_HAVE_MPI
template <class Archive>
void serialize (Archive& ar, const unsigned int version); #endif // _RHEOLEF_HAVE_MPI #endif // _RHEOLEF_INDEX_SET_H };

SEE ALSO

disarray(2)

COPYRIGHT

Copyright (C) 2000-2018 Pierre Saramito <Pierre.Saramito@imag.fr> GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

rheolef-7.0 rheolef-7.0