File coverage_mask.hpp

class CoverageMask : public IterableVectorDecorator<AllocatedVector<uint32>>
#include <coverage_mask.hpp>

Allows to check whether individual examples are covered by a rule or not. For each example, an integer is stored in a vector that may be updated when the rule is refined. If the value that corresponds to a certain example is equal to the “indicator value”, it is considered to be covered, otherwise it is not.

Public Functions

CoverageMask(uint32 numElements)
Parameters:

numElements – The total number of examples

CoverageMask(const CoverageMask &other)
Parameters:

other – A reference to an object of type CoverageMask to be copied

void reset()

Resets the mask and the “indicator value” such that all examples are marked as covered.

bool operator[](uint32 index) const

Returns whether the example at a specific index is covered or not.

Parameters:

index – The index of the example

Returns:

True, if the example at the given index is covered, false otherwise

Public Members

uint32 indicatorValue

The “indicator value”.