28 #ifndef GUM_LEARNING_ID_SET_H 29 #define GUM_LEARNING_ID_SET_H 34 #include <type_traits> 47 template <
template <
typename >
class ALLOC >
56 template <
template <
typename >
class ALLOC = std::allocator >
159 std::size_t
pos()
const;
164 #ifndef DOXYGEN_SHOULD_SKIP_THIS 171 std::size_t __index{std::size_t(0)};
196 template <
template <
typename >
class ALLOC = std::allocator >
197 class IdCondSet:
private ALLOC< NodeId > {
224 const bool ordered_ids,
235 const std::vector<
NodeId, ALLOC< NodeId > >& rhs_ids,
236 const bool ordered_rhs_ids =
false,
253 const std::vector<
NodeId, ALLOC< NodeId > >& rhs_ids,
254 const bool ordered_lhs_vars,
255 const bool ordered_rhs_ids =
false,
272 const std::vector<
NodeId, ALLOC< NodeId > >& rhs_ids,
273 const bool ordered_lhs_vars,
274 const bool ordered_rhs_ids =
false,
313 NodeId operator[](
const std::size_t index)
const;
368 std::size_t nbLHSIds()
const;
371 std::size_t nbRHSIds()
const;
380 std::size_t size()
const;
387 bool exists(
const NodeId id)
const;
392 void erase(
const NodeId id);
395 bool hasConditioningSet()
const;
401 std::string toString()
const;
409 #ifndef DOXYGEN_SHOULD_SKIP_THIS 416 std::size_t __nb_lhs_ids{std::size_t(0)};
426 template <
template <
typename >
class ALLOC >
427 std::ostream& operator<<(std::ostream& stream, const IdCondSet< ALLOC >& idset);
433 template <
template <
typename >
class ALLOC >
IdCondSetIterator< ALLOC > & operator+=(const std::size_t i)
Makes the iterator point to i elements further in the IdCondSet.
bool operator==(const IdCondSetIterator< ALLOC > &from) const
Checks whether two iterators point toward the same elements.
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
The generic class for storing (ordered) sequences of objects.
bool operator!=(const IdCondSetIterator< ALLOC > &from) const
Checks whether two iterators point toward different elements.
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
Class template representing hashing function of LpCol.
std::size_t pos() const
Returns the position of the iterator in the IdCondSet.
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
NodeId & reference
types for STL compliance
IdCondSetIterator()
default constructor
IdCondSetIterator< ALLOC > operator+(const std::size_t i)
Returns a new iterator pointing to i further elements in the IdCondSet.
NodeId value_type
types for STL compliance
NodeId * pointer
types for STL compliance
std::ptrdiff_t difference_type
types for STL compliance
std::forward_iterator_tag iterator_category
types for STL compliance
NodeId operator*() const
Gives access to the content of the iterator.
const NodeId & const_reference
types for STL compliance
virtual ~IdCondSetIterator()
destructor
All hash functions should inherit from this class.
The iterators for IdSets.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
const NodeId * const_pointer
types for STL compliance
IdCondSetIterator< ALLOC > & operator++()
Makes the iterator point to the next element in the IdCondSet.
Size NodeId
Type for node ids.
ALLOC< NodeId > allocator_type
type for the allocators passed in arguments of methods
A class for storing a pair of sets of NodeIds, the second one corresponding to a conditional set...
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
IdCondSetIterator< ALLOC > & operator=(const IdCondSetIterator< ALLOC > &from)
copy operator