|
souffle
2.0.2-371-g6315b36
|
A relation, composed of a collection of indexes. More...
#include <Relation.h>


Data Structures | |
| class | iterator_base |
Public Types | |
| using | Attribute = uint32_t |
| using | AttributeSet = std::set< Attribute > |
| using | Index = interpreter::Index< Arity, Structure > |
| using | iterator = typename Index::iterator |
| using | Tuple = souffle::Tuple< RamDomain, Arity > |
| using | View = typename Index::View |
Public Types inherited from souffle::interpreter::RelationWrapper | |
| using | arity_type = souffle::Relation::arity_type |
| using | IndexViewPtr = Own< ViewWrapper > |
Public Member Functions | |
| void | __purge () |
| Clear all indexes. More... | |
| size_t | __size () const |
| Return number of tuples in relation (full-order) More... | |
| Iterator | begin () const override |
| bool | contains (const RamDomain *data) const override |
| bool | contains (const size_t &indexPos, const Tuple &low, const Tuple &high) const |
| Tests whether this relation contains any element between the given boundaries. More... | |
| bool | contains (const Tuple &tuple) const |
| Tests whether this relation contains the given tuple. More... | |
| IndexViewPtr | createView (const size_t &indexPos) const override |
| Obtains a view on an index of this relation, facilitating hint-supported accesses. More... | |
| bool | empty () const |
| Check if the relation is empty. More... | |
| Iterator | end () const override |
| bool | exists (const Tuple &tuple) const |
| Check if a tuple exists in relation. More... | |
| Index * | getIndex (size_t idx) |
| Order | getIndexOrder (size_t idx) const override |
| Return the order of an index. More... | |
| void | insert (const RamDomain *data) override |
| void | insert (const Relation< Arity, Structure > &other) |
| Add all entries of the given relation to this relation. More... | |
| bool | insert (const Tuple &tuple) |
| Add the given tuple to this relation. More... | |
| std::vector< souffle::range< iterator > > | partitionRange (const size_t &indexPos, const Tuple &low, const Tuple &high, size_t partitionCount) const |
| Returns a partitioned list of iterators coving elements in range [low, high]. More... | |
| std::vector< souffle::range< iterator > > | partitionScan (size_t partitionCount) const |
| Returns a partitioned list of iterators for parallel computation. More... | |
| void | purge () override |
| souffle::range< iterator > | range (const size_t &indexPos, const Tuple &low, const Tuple &high) const |
| Obtains a pair of iterators covering the interval between the two given entries. More... | |
| Relation (Relation &other)=delete | |
| Relation (size_t auxiliaryArity, std::string name, const ram::analysis::MinIndexSelection &orderSet) | |
| Creates a relation, build all necessary indexes. More... | |
| souffle::range< iterator > | scan () const |
| Obtains a pair of iterators to scan the entire relation. More... | |
| size_t | size () const override |
| void | swap (Relation< Arity, Structure > &other) |
| Swaps the content of this and the given relation, including the installed indexes. More... | |
Public Member Functions inherited from souffle::interpreter::RelationWrapper | |
| arity_type | getArity () const |
| arity_type | getAuxiliaryArity () const |
| const std::string & | getName () const |
| RelationWrapper (arity_type arity, arity_type auxiliaryArity, std::string relName) | |
| virtual | ~RelationWrapper ()=default |
Static Public Member Functions | |
| static View * | castView (ViewWrapper *view) |
| Cast an abstract view into a view of Index::View type. More... | |
| static Tuple | constructTuple (const RamDomain *data) |
| Construct a typed tuple from a raw data. More... | |
Static Public Attributes | |
| static constexpr size_t | Arity = _Arity |
Protected Attributes | |
| size_t | auxiliaryArity |
| VecOwn< Index > | indexes |
| Index * | main |
Protected Attributes inherited from souffle::interpreter::RelationWrapper | |
| arity_type | arity |
| arity_type | auxiliaryArity |
| std::string | relName |
A relation, composed of a collection of indexes.
Definition at line 160 of file Relation.h.
| using souffle::interpreter::Relation< _Arity, Structure >::Attribute = uint32_t |
Definition at line 163 of file Relation.h.
| using souffle::interpreter::Relation< _Arity, Structure >::AttributeSet = std::set<Attribute> |
Definition at line 164 of file Relation.h.
| using souffle::interpreter::Relation< _Arity, Structure >::Index = interpreter::Index<Arity, Structure> |
Definition at line 165 of file Relation.h.
| using souffle::interpreter::Relation< _Arity, Structure >::iterator = typename Index::iterator |
Definition at line 168 of file Relation.h.
| using souffle::interpreter::Relation< _Arity, Structure >::Tuple = souffle::Tuple<RamDomain, Arity> |
Definition at line 166 of file Relation.h.
| using souffle::interpreter::Relation< _Arity, Structure >::View = typename Index::View |
Definition at line 167 of file Relation.h.
|
inline |
|
delete |
|
inline |
Clear all indexes.
Definition at line 381 of file Relation.h.
|
inline |
Return number of tuples in relation (full-order)
Definition at line 367 of file Relation.h.
|
inlineoverridevirtual |
Implements souffle::interpreter::RelationWrapper.
Definition at line 274 of file Relation.h.
|
inlinestatic |
|
inlinestatic |
|
inlineoverridevirtual |
|
inline |
Tests whether this relation contains any element between the given boundaries.
Definition at line 321 of file Relation.h.
|
inline |
Tests whether this relation contains the given tuple.
Definition at line 314 of file Relation.h.
|
inlineoverridevirtual |
Obtains a view on an index of this relation, facilitating hint-supported accesses.
This function is virtual because view creation require at least one indirect dispatch.
Implements souffle::interpreter::RelationWrapper.
Definition at line 227 of file Relation.h.
|
inline |
|
inlineoverridevirtual |
Implements souffle::interpreter::RelationWrapper.
Definition at line 278 of file Relation.h.
|
inline |
Check if a tuple exists in relation.
Definition at line 390 of file Relation.h.
|
inline |
Definition at line 394 of file Relation.h.
|
inlineoverridevirtual |
Return the order of an index.
Implements souffle::interpreter::RelationWrapper.
Definition at line 235 of file Relation.h.
|
inlineoverridevirtual |
|
inline |
Add all entries of the given relation to this relation.
Definition at line 305 of file Relation.h.
|
inline |
Add the given tuple to this relation.
Definition at line 292 of file Relation.h.
|
inline |
Returns a partitioned list of iterators coving elements in range [low, high].
Definition at line 351 of file Relation.h.
|
inline |
Returns a partitioned list of iterators for parallel computation.
Definition at line 337 of file Relation.h.
|
inlineoverridevirtual |
|
inline |
Obtains a pair of iterators covering the interval between the two given entries.
Definition at line 344 of file Relation.h.
|
inline |
Obtains a pair of iterators to scan the entire relation.
Return 'raw iterator' that returns tuples in undecoded form.
Definition at line 330 of file Relation.h.
|
inlineoverridevirtual |
Implements souffle::interpreter::RelationWrapper.
Definition at line 231 of file Relation.h.
|
inline |
Swaps the content of this and the given relation, including the installed indexes.
Definition at line 360 of file Relation.h.
|
staticconstexpr |
Definition at line 162 of file Relation.h.
|
protected |
Definition at line 400 of file Relation.h.
|
protected |
Definition at line 403 of file Relation.h.
Referenced by souffle::interpreter::Relation< 2, Eqrel >::contains(), souffle::interpreter::Relation< 2, Eqrel >::empty(), souffle::interpreter::Relation< 2, Eqrel >::end(), souffle::interpreter::Relation< 2, Eqrel >::partitionRange(), souffle::interpreter::Relation< 2, Eqrel >::partitionScan(), and souffle::interpreter::Relation< 2, Eqrel >::range().
|
protected |
Definition at line 406 of file Relation.h.
Referenced by souffle::interpreter::Relation< 2, Eqrel >::__purge(), souffle::interpreter::Relation< 2, Eqrel >::__size(), souffle::interpreter::Relation< 2, Eqrel >::contains(), souffle::interpreter::Relation< 2, Eqrel >::end(), souffle::interpreter::Relation< 2, Eqrel >::insert(), souffle::interpreter::Relation< 2, Eqrel >::scan(), and souffle::interpreter::Relation< 2, Eqrel >::swap().
1.8.17