File body_empty.hpp¶
-
class EmptyBody : public IBody¶
- #include <body_empty.hpp>
An empty body that does not contain any conditions and therefore covers any examples.
Public Functions
-
virtual bool covers(View<const float32>::const_iterator begin, View<const float32>::const_iterator end) const override¶
Returns whether an individual example, which is stored in a C-contiguous matrix, is covered or not.
- Parameters:
begin – An iterator to the beginning of the example’s feature values
end – An iterator to the end of the example’s feature values
- Returns:
True, if the example is covered, false otherwise
-
virtual bool covers(View<uint32>::const_iterator indicesBegin, View<uint32>::const_iterator indicesEnd, View<float32>::const_iterator valuesBegin, View<float32>::const_iterator valuesEnd, float32 sparseValue, View<float32>::iterator tmpArray1, View<uint32>::iterator tmpArray2, uint32 n) const override¶
Returns whether an individual example, which is stored in a CSR sparse matrix, is covered or not.
- Parameters:
indicesBegin – An iterator to the beginning of the example’s feature values
indicesEnd – An iterator to the end of the example’s feature values
valuesBegin – An iterator to the beginning of the example’s feature_indices
valuesEnd – An iterator to the end of the example’s feature indices
sparseValue – The value that should be used for sparse feature values
tmpArray1 – An iterator that is used to temporarily store non-zero feature values. May contain arbitrary values
tmpArray2 – An iterator that is used to temporarily keep track of the feature indices with non-zero feature values. Must not contain any elements with value
n
n – An arbitrary number. If this function is called multiple times for different examples, but using the same
tmpArray2
, the number must be unique for each of the function invocations
- Returns:
True, if the example is covered, false otherwise
-
virtual void visit(EmptyBodyVisitor emptyBodyVisitor, ConjunctiveBodyVisitor conjunctiveBodyVisitor) const override¶
Invokes one of the given visitor functions, depending on which one is able to handle this particular type of body.
- Parameters:
emptyBodyVisitor – The visitor function for handling objects of the type
EmptyBody
conjunctiveBodyVisitor – The visitor function for handling objects of the type
ConjunctiveBody
-
virtual bool covers(View<const float32>::const_iterator begin, View<const float32>::const_iterator end) const override¶