File interval.hpp

Functions

static inline Tuple<uint32> getStartAndEndOfOpenInterval(const Interval &interval, uint32 maxIndex)

Returns the start and end index of an open interval [0, interval.end] or [interval.start, maxIndex], depending on a given Interval.

Parameters:
  • interval – A reference to an object of type Interval

  • maxIndex – The maximum index of an open interval

Returns:

A Tuple that stores the start and end index

struct Interval
#include <interval.hpp>

Specifies the boundaries of an interval that includes/excludes certain elements in a vector.

Subclassed by Condition

Public Functions

inline Interval()
inline Interval(uint32 start, uint32 end, bool inverse = false)
Parameters:
  • start – The index of the first element to be included

  • end – The index of the last elements to be included (exclusive)

  • inverse – True, if the elements in the range [start, end) should be excluded, rather than included, false otherwise

inline virtual ~Interval()
inline Interval &operator=(const Interval &rhs)

Assigns the properties of an existing interval to this interval.

Parameters:

rhs – A reference to the existing interval

Returns:

A reference to the modified interval

Public Members

uint32 start

The index of the first element to be included.

uint32 end

The index of the last element to be included (exclusive).

bool inverse

True, if the elements in the range [start, end) should be excluded, rather than included, false otherwise.