DDD 1.9.0.20250409152518
|
This class is an abstraction of a set of data. More...
#include <DataSet.h>
Public Member Functions | |
virtual | ~DataSet () |
destructor | |
virtual DataSet * | newcopy () const =0 |
returns a new instance copy of this | |
virtual DataSet * | set_intersect (const DataSet &b) const =0 |
returns a new instance with elements = this inter b | |
virtual DataSet * | set_union (const DataSet &b) const =0 |
returns a new instance with elements = this union b | |
virtual DataSet * | set_minus (const DataSet &b) const =0 |
returns a new instance with elements = this setminus b | |
virtual bool | empty () const =0 |
returns true if this is the empty set | |
virtual DataSet * | empty_set () const =0 |
returns a pointer to an instance of the empty set | |
virtual bool | set_equal (const DataSet &b) const =0 |
Compares two sets for equality. | |
virtual bool | set_less_than (const DataSet &b) const =0 |
Compares two sets with a total order. | |
virtual long double | set_size () const =0 |
virtual size_t | set_hash () const =0 |
returns a hash function, used in the SDD hash function computation | |
virtual void | set_print (std::ostream &os) const =0 |
returns a formatted string description of the set | |
virtual void | mark () const =0 |
for memory management : if your DataSet references no GDD,GHom,GSDD,GShom, mark() should do nothing | |
This class is an abstraction of a set of data.
Set Decision Diagrams SDD arcs are labeled by a DataSet *, canonization of SDD requires a set-based interface (union, intersection, set difference), ability to compute a hash key and test two sets for equality for unicity table purposes, and test for emptiness as SDD are both zero suppresed (no path lead to GSDD::null), and empty-set suppressed (no arc labeled by empty_set is represented)
Additional interface is provided to query/examine the structure, in particular set_size to is required to compute the full set size of an SDD, and print (although this last is not essential)
Concrete DataSet classes should derive from DataSet and fulfill the contract FOR THEIR OWN TYPE hard or dynamic casting the argument into one's own type is the recommended behavior
|
inlinevirtual |
destructor
|
pure virtual |
returns true if this is the empty set
Implemented in DDD, IntDataSet, and GSDD.
Referenced by _SDED_Add::eval(), _SDED_Mult::eval(), _SDED_Minus::eval(), sns::Mult::eval(), GSDD::GSDD(), and GShom::GShom().
|
pure virtual |
returns a pointer to an instance of the empty set
Implemented in DDD, IntDataSet, and GSDD.
Referenced by _SDED_Add::eval().
|
pure virtual |
|
pure virtual |
returns a new instance copy of this
Implemented in DDD, IntDataSet, and GSDD.
Referenced by _SDED_Add::eval(), GSDD::GSDD(), and square_union().
|
pure virtual |
Compares two sets for equality.
Implemented in DDD, IntDataSet, and GSDD.
Referenced by _SDED_Add::eval().
|
pure virtual |
returns a hash function, used in the SDD hash function computation
Implemented in DDD, IntDataSet, and GSDD.
returns a new instance with elements = this inter b
Implemented in DDD, IntDataSet, and GSDD.
Referenced by _SDED_Add::eval(), _SDED_Mult::eval(), _SDED_Minus::eval(), and sns::Mult::eval().
|
pure virtual |
Compares two sets with a total order.
Implemented in DDD, IntDataSet, and GSDD.
returns a new instance with elements = this setminus b
Implemented in DDD, IntDataSet, and GSDD.
Referenced by _SDED_Add::eval(), and _SDED_Minus::eval().
|
pure virtual |
returns a formatted string description of the set
Implemented in DDD, IntDataSet, and GSDD.
|
pure virtual |
Implemented in DDD, IntDataSet, and GSDD.
returns a new instance with elements = this union b
Implemented in DDD, IntDataSet, and GSDD.
Referenced by square_union().