souffle  2.0.2-371-g6315b36
Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends
souffle::detail::brie::SparseBitMapIter< SparseBitMap > Class Template Reference

Iterator type for souffle::SparseArray. More...

#include <Brie.h>

Collaboration diagram for souffle::detail::brie::SparseBitMapIter< SparseBitMap >:
Collaboration graph

Public Member Functions

bool isEnd () const
 
bool operator!= (const SparseBitMapIter &other) const
 
const value_typeoperator* () const
 
SparseBitMapIteroperator++ ()
 
SparseBitMapIter operator++ (int)
 
const value_typeoperator-> () const
 
SparseBitMapIteroperator= (const SparseBitMapIter &)=default
 
bool operator== (const SparseBitMapIter &other) const
 
void print (std::ostream &out) const
 
 SparseBitMapIter ()=default
 
 SparseBitMapIter (const nested_iterator &iter)
 
 SparseBitMapIter (const nested_iterator &iter, uint64_t m, value_type value)
 
 SparseBitMapIter (const SparseBitMapIter &)=default
 

Private Types

using data_store_t = typename SparseBitMap::data_store_t
 
using nested_iterator = typename data_store_t::iterator
 
using value_t = typename SparseBitMap::value_t
 
using value_type = typename SparseBitMap::index_type
 

Private Member Functions

bool moveToNextInMask ()
 

Private Attributes

nested_iterator iter
 
uint64_t mask = 0
 
value_type value {}
 

Friends

std::ostream & operator<< (std::ostream &out, const SparseBitMapIter &iter)
 

Detailed Description

template<typename SparseBitMap>
class souffle::detail::brie::SparseBitMapIter< SparseBitMap >

Iterator type for souffle::SparseArray.

It enumerates the indices set to 1.

Definition at line 1518 of file Brie.h.

Member Typedef Documentation

◆ data_store_t

template<typename SparseBitMap >
using souffle::detail::brie::SparseBitMapIter< SparseBitMap >::data_store_t = typename SparseBitMap::data_store_t
private

Definition at line 1521 of file Brie.h.

◆ nested_iterator

template<typename SparseBitMap >
using souffle::detail::brie::SparseBitMapIter< SparseBitMap >::nested_iterator = typename data_store_t::iterator
private

Definition at line 1522 of file Brie.h.

◆ value_t

template<typename SparseBitMap >
using souffle::detail::brie::SparseBitMapIter< SparseBitMap >::value_t = typename SparseBitMap::value_t
private

Definition at line 1519 of file Brie.h.

◆ value_type

template<typename SparseBitMap >
using souffle::detail::brie::SparseBitMapIter< SparseBitMap >::value_type = typename SparseBitMap::index_type
private

Definition at line 1520 of file Brie.h.

Constructor & Destructor Documentation

◆ SparseBitMapIter() [1/4]

template<typename SparseBitMap >
souffle::detail::brie::SparseBitMapIter< SparseBitMap >::SparseBitMapIter ( )
default

◆ SparseBitMapIter() [2/4]

template<typename SparseBitMap >
souffle::detail::brie::SparseBitMapIter< SparseBitMap >::SparseBitMapIter ( const SparseBitMapIter< SparseBitMap > &  )
default

◆ SparseBitMapIter() [3/4]

template<typename SparseBitMap >
souffle::detail::brie::SparseBitMapIter< SparseBitMap >::SparseBitMapIter ( const nested_iterator iter)
inline

Definition at line 1538 of file Brie.h.

1538  {
1539  return !(*this == other);
1540  }
1541 
1542  // the deref operator as required by the iterator concept

◆ SparseBitMapIter() [4/4]

template<typename SparseBitMap >
souffle::detail::brie::SparseBitMapIter< SparseBitMap >::SparseBitMapIter ( const nested_iterator iter,
uint64_t  m,
value_type  value 
)
inline

Definition at line 1544 of file Brie.h.

1548  {

Member Function Documentation

◆ isEnd()

template<typename SparseBitMap >
bool souffle::detail::brie::SparseBitMapIter< SparseBitMap >::isEnd ( ) const
inline

Definition at line 1593 of file Brie.h.

◆ moveToNextInMask()

template<typename SparseBitMap >
bool souffle::detail::brie::SparseBitMapIter< SparseBitMap >::moveToNextInMask ( )
inlineprivate

Definition at line 1608 of file Brie.h.

1621  {
1622  template <typename A>
1623  friend class detail::brie::SparseBitMapIter;
1624 

◆ operator!=()

template<typename SparseBitMap >
bool souffle::detail::brie::SparseBitMapIter< SparseBitMap >::operator!= ( const SparseBitMapIter< SparseBitMap > &  other) const
inline

Definition at line 1554 of file Brie.h.

1561  {

◆ operator*()

template<typename SparseBitMap >
const value_type& souffle::detail::brie::SparseBitMapIter< SparseBitMap >::operator* ( ) const
inline

Definition at line 1559 of file Brie.h.

1561  {

References souffle::SparseBitMap< BITS >::LEAF_INDEX_WIDTH, and souffle::SparseBitMap< BITS >::toMask().

Here is the call graph for this function:

◆ operator++() [1/2]

template<typename SparseBitMap >
SparseBitMapIter& souffle::detail::brie::SparseBitMapIter< SparseBitMap >::operator++ ( )
inline

Definition at line 1569 of file Brie.h.

1571  {
1572  auto cpy = *this;
1573  ++(*this);
1574  return cpy;
1575  }
1576 
1577  bool isEnd() const {
1578  return iter.isEnd();
1579  }
1580 
1581  void print(std::ostream& out) const {
1582  out << "SparseBitMapIter(" << iter << " -> " << std::bitset<64>(mask) << " @ " << value << ")";
1583  }
1584 
1585  // enables this iterator core to be printed (for debugging)

◆ operator++() [2/2]

template<typename SparseBitMap >
SparseBitMapIter souffle::detail::brie::SparseBitMapIter< SparseBitMap >::operator++ ( int  )
inline

Definition at line 1587 of file Brie.h.

1591  :
1592  bool moveToNextInMask() {

◆ operator->()

template<typename SparseBitMap >
const value_type* souffle::detail::brie::SparseBitMapIter< SparseBitMap >::operator-> ( ) const
inline

Definition at line 1564 of file Brie.h.

1571  {

◆ operator=()

template<typename SparseBitMap >
SparseBitMapIter& souffle::detail::brie::SparseBitMapIter< SparseBitMap >::operator= ( const SparseBitMapIter< SparseBitMap > &  )
default

◆ operator==()

template<typename SparseBitMap >
bool souffle::detail::brie::SparseBitMapIter< SparseBitMap >::operator== ( const SparseBitMapIter< SparseBitMap > &  other) const
inline

Definition at line 1548 of file Brie.h.

1548  {
1549  return &value;
1550  }
1551 

◆ print()

template<typename SparseBitMap >
void souffle::detail::brie::SparseBitMapIter< SparseBitMap >::print ( std::ostream &  out) const
inline

Definition at line 1597 of file Brie.h.

Friends And Related Function Documentation

◆ operator<<

template<typename SparseBitMap >
std::ostream& operator<< ( std::ostream &  out,
const SparseBitMapIter< SparseBitMap > &  iter 
)
friend

Definition at line 1602 of file Brie.h.

1621  {

Field Documentation

◆ iter

template<typename SparseBitMap >
nested_iterator souffle::detail::brie::SparseBitMapIter< SparseBitMap >::iter
private

Definition at line 1525 of file Brie.h.

◆ mask

template<typename SparseBitMap >
uint64_t souffle::detail::brie::SparseBitMapIter< SparseBitMap >::mask = 0
private

Definition at line 1528 of file Brie.h.

◆ value

template<typename SparseBitMap >
value_type souffle::detail::brie::SparseBitMapIter< SparseBitMap >::value {}
private

Definition at line 1531 of file Brie.h.


The documentation for this class was generated from the following file:
souffle::detail::brie::SparseBitMapIter::value
value_type value
Definition: Brie.h:1531
souffle::detail::brie::SparseBitMapIter::mask
uint64_t mask
Definition: Brie.h:1528
souffle::detail::brie::SparseBitMapIter::iter
nested_iterator iter
Definition: Brie.h:1525
souffle::detail::brie::SparseBitMapIter::moveToNextInMask
bool moveToNextInMask()
Definition: Brie.h:1608
souffle::detail::brie::SparseBitMapIter::print
void print(std::ostream &out) const
Definition: Brie.h:1597
souffle::detail::brie::SparseBitMapIter::isEnd
bool isEnd() const
Definition: Brie.h:1593