Class SortingStatus

Class Documentation

class brille::SortingStatus

A type to hold sorting status information for an object.

Every vertex/node/etc. in a grid-like object will have sorting information associated with it. Notably, whether or not it is considered sorted, if it is allowed to be further modified, and how many times its sorting permutation has been changed. The first two are flags and the last a positive integer, so this information could all be stored in a single unsigned N-bit integer with the visit count occupying only N-2 bits. This is probably overkill

Public Types

using status_t = unsigned int

Public Functions

SortingStatus(status_t s = 0u)
SortingStatus(bool s, bool f, unsigned int v)
bool sorted() const
bool locked() const
bool queued() const
bool claimed() const
bool visited() const
status_t visits() const
bool sorted(bool s)
bool locked(bool l)
bool queued(bool q)
bool claimed(bool c)
template<typename T>
status_t visits(T v)
status_t addvisit()
template<class T>
status_t addvisit(const T max_visits)
template<class T>
bool unlocked_addvisit_unsorted(const T max_visits)
std::string to_string() const
bool is_queable() const