DDD  1.9.0.20240425101308
Public Member Functions | List of all members
DataSet Class Referenceabstract

This class is an abstraction of a set of data. More...

#include <DataSet.h>

Inheritance diagram for DataSet:
Inheritance graph
Collaboration diagram for DataSet:
Collaboration graph

Public Member Functions

virtual ~DataSet ()
 destructor More...
 
virtual DataSetnewcopy () const =0
 returns a new instance copy of this More...
 
virtual DataSetset_intersect (const DataSet &b) const =0
 returns a new instance with elements = this inter b More...
 
virtual DataSetset_union (const DataSet &b) const =0
 returns a new instance with elements = this union b More...
 
virtual DataSetset_minus (const DataSet &b) const =0
 returns a new instance with elements = this setminus b More...
 
virtual bool empty () const =0
 returns true if this is the empty set More...
 
virtual DataSetempty_set () const =0
 returns a pointer to an instance of the empty set More...
 
virtual bool set_equal (const DataSet &b) const =0
 Compares two sets for equality. More...
 
virtual bool set_less_than (const DataSet &b) const =0
 Compares two sets with a total order. More...
 
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 More...
 
virtual void set_print (std::ostream &os) const =0
 returns a formatted string description of the set More...
 
virtual void mark () const =0
 for memory management : if your DataSet references no GDD,GHom,GSDD,GShom, mark() should do nothing More...
 

Detailed Description

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

Todo:
recent experiments with V. Beaudenon show maybe some behavior should be put here, for instance set_intersect is always empty if incompatible types are compared.

Constructor & Destructor Documentation

◆ ~DataSet()

virtual DataSet::~DataSet ( )
inlinevirtual

destructor

Member Function Documentation

◆ empty()

virtual bool DataSet::empty ( ) const
pure virtual

returns true if this is the empty set

Implemented in GSDD, IntDataSet, and DDD.

Referenced by _SDED_Add::eval(), _SDED_Mult::eval(), _SDED_Minus::eval(), sns::Mult::eval(), GSDD::GSDD(), and GShom::GShom().

◆ empty_set()

virtual DataSet* DataSet::empty_set ( ) const
pure virtual

returns a pointer to an instance of the empty set

Implemented in GSDD, IntDataSet, and DDD.

Referenced by _SDED_Add::eval().

◆ mark()

virtual void DataSet::mark ( ) const
pure virtual

for memory management : if your DataSet references no GDD,GHom,GSDD,GShom, mark() should do nothing

Implemented in GSDD, IntDataSet, and DDD.

◆ newcopy()

virtual DataSet* DataSet::newcopy ( ) const
pure virtual

returns a new instance copy of this

Implemented in GSDD, IntDataSet, and DDD.

Referenced by _SDED_Add::eval(), GSDD::GSDD(), and square_union().

◆ set_equal()

virtual bool DataSet::set_equal ( const DataSet b) const
pure virtual

Compares two sets for equality.

Implemented in GSDD, IntDataSet, and DDD.

Referenced by _SDED_Add::eval().

◆ set_hash()

virtual size_t DataSet::set_hash ( ) const
pure virtual

returns a hash function, used in the SDD hash function computation

Implemented in GSDD, IntDataSet, and DDD.

◆ set_intersect()

virtual DataSet* DataSet::set_intersect ( const DataSet b) const
pure virtual

returns a new instance with elements = this inter b

Implemented in GSDD, IntDataSet, and DDD.

Referenced by _SDED_Add::eval(), _SDED_Mult::eval(), _SDED_Minus::eval(), and sns::Mult::eval().

◆ set_less_than()

virtual bool DataSet::set_less_than ( const DataSet b) const
pure virtual

Compares two sets with a total order.

Implemented in GSDD, IntDataSet, and DDD.

◆ set_minus()

virtual DataSet* DataSet::set_minus ( const DataSet b) const
pure virtual

returns a new instance with elements = this setminus b

Implemented in GSDD, IntDataSet, and DDD.

Referenced by _SDED_Add::eval(), and _SDED_Minus::eval().

◆ set_print()

virtual void DataSet::set_print ( std::ostream &  os) const
pure virtual

returns a formatted string description of the set

Implemented in GSDD, IntDataSet, and DDD.

◆ set_size()

virtual long double DataSet::set_size ( ) const
pure virtual
Returns
the size (number of elements) in a set

Implemented in GSDD, IntDataSet, and DDD.

◆ set_union()

virtual DataSet* DataSet::set_union ( const DataSet b) const
pure virtual

returns a new instance with elements = this union b

Implemented in GSDD, IntDataSet, and DDD.

Referenced by square_union().


The documentation for this class was generated from the following file:

Please comment this page and report errors about it on the RefDocComments page.
Generated on Thu Apr 25 2024 10:15:16 for DDD by doxygen 1.9.1