#include "BCP_vector.hpp"
Go to the source code of this file.
Functions | |
void | BCP_vec_sanity_check (BCP_vec< int >::const_iterator firstpos, BCP_vec< int >::const_iterator lastpos, const int maxsize) |
A helper function to test whether a set positions is sane for a vector. More... | |
void BCP_vec_sanity_check | ( | BCP_vec< int >::const_iterator | firstpos, |
BCP_vec< int >::const_iterator | lastpos, | ||
const int | maxsize | ||
) |
A helper function to test whether a set positions is sane for a vector.
The set of positions consists of the entries in [firstpos,lastpos)
. The length of the vector is maxsize
.
The set of positions is defined to be sane if and only if the entries are in increasing order, there are no duplicate entries, no negative entries and the largest entry is smaller than maxsize
.
If the sanity check fails the function throws a [BCP_fatal_error
]{BCP_fatal_error.html} exception.
Definition at line 8 of file BCP_vector_sanity.cpp.