DDD
1.9.0.20240826145154
|
This class is a very basic implementation of DataSet interface based on std::std::vector<int> and a unicity table. More...
#include <IntDataSet.h>
Public Types | |
typedef std::vector< int >::const_iterator | const_iterator |
typedef IntDataSet::const_iterator More... | |
Public Member Functions | |
const_iterator | begin () const |
read-only iterator interface More... | |
const_iterator | end () const |
IntDataSet (const std::vector< int > &ddata) | |
public constructor from non unique std::vector<int> More... | |
IntDataSet (const std::vector< int >::iterator &begin, const std::vector< int >::iterator &end) | |
public constructor from iterator (begin,end) More... | |
IntDataSet () | |
public deafult constructor = empty set More... | |
virtual | ~IntDataSet () |
destructor More... | |
DataSet * | newcopy () const |
returns a new instance copy of this More... | |
DataSet * | set_intersect (const DataSet &b) const |
returns a new instance with elements = this inter b More... | |
DataSet * | set_union (const DataSet &b) const |
returns a new instance with elements = this union b More... | |
DataSet * | set_minus (const DataSet &b) const |
returns a new instance with elements = this setminus b More... | |
bool | empty () const |
returns true if this is the empty set More... | |
DataSet * | empty_set () const |
returns a pointer to an instance of the empty set More... | |
bool | set_equal (const DataSet &b) const |
Compares two sets for equality. More... | |
bool | set_less_than (const DataSet &b) const |
Compares two sets for equality. More... | |
long double | set_size () const |
virtual size_t | set_hash () const |
returns a hash function, used in the SDD hash function computation More... | |
virtual void | set_print (std::ostream &os) const |
returns a formatted string description of the set More... | |
void | mark () const |
for memory management : if your DataSet references no GDD,GHom,GSDD,GShom, mark() should do nothing More... | |
Static Public Member Functions | |
static void | garbage () |
Private Types | |
typedef UniqueTable< std::vector< int > > | canonical_t |
typedef canonical_t::Table::iterator | canonical_it |
typedef std::set< const std::vector< int > * > | marktable_t |
typedef marktable_t::const_iterator | marktable_it |
Private Member Functions | |
IntDataSet (const std::vector< int > *ddata) | |
Private Attributes | |
const std::vector< int > * | data |
Static Private Attributes | |
static canonical_t | canonical = UniqueTable<std::vector<int> > () |
static marktable_t | marktable = marktable_t() |
static const std::vector< int > * | empty_ = canonical(std::vector<int>(0)) |
This class is a very basic implementation of DataSet interface based on std::std::vector<int> and a unicity table.
|
private |
|
private |
typedef std::vector<int>::const_iterator IntDataSet::const_iterator |
typedef IntDataSet::const_iterator
|
private |
|
private |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
public deafult constructor = empty set
Referenced by empty_set(), newcopy(), set_intersect(), set_minus(), and set_union().
|
inlinevirtual |
destructor
|
inline |
|
inlinevirtual |
|
inlinevirtual |
|
inline |
References data.
Referenced by IntDataSet().
|
static |
References canonical, marktable, and UniqueTable< T >::table.
Referenced by MemoryManager::garbage().
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
returns a new instance with elements = this inter b
Implements DataSet.
References canonical, data, and IntDataSet().
|
inlinevirtual |
returns a new instance with elements = this setminus b
Implements DataSet.
References canonical, data, and IntDataSet().
|
inlinevirtual |
|
inlinevirtual |
returns a new instance with elements = this union b
Implements DataSet.
References canonical, data, and IntDataSet().
|
staticprivate |
Referenced by garbage(), IntDataSet(), set_intersect(), set_minus(), and set_union().
|
private |
Referenced by begin(), empty(), end(), IntDataSet(), mark(), newcopy(), set_equal(), set_hash(), set_intersect(), set_less_than(), set_minus(), set_print(), set_size(), and set_union().
|
staticprivate |
Referenced by empty(), and IntDataSet().
|
staticprivate |