Adiar  2.1.0
An External Memory Decision Diagram Library
adiar::internal::dd Class Reference

Container for the files that represent a Decision Diagram. More...

#include <adiar/internal/dd.h>

Inheritance diagram for adiar::internal::dd:
[legend]

Public Types

using node_type = node
 Type of nodes of this diagram.
 
using pointer_type = node_type::pointer_type
 Type of pointers of this diagram.
 
using label_type = node_type::label_type
 Type of this node's variable label.
 
using signed_label_type = node_type::signed_label_type
 Type for difference between variable labels.
 
using id_type = node_type::id_type
 Type of this node's level identifier.
 
using terminal_type = typename node_type::terminal_type
 Type of a terminal value.
 
using node_file_type = levelized_file< node_type >
 File type for the file object representing the diagram.
 
using shared_node_file_type = shared_file_ptr< node_file_type >
 File type for the shared file object representing the diagram.
 

Public Member Functions

 dd (const shared_node_file_type &f, bool negate=false, signed_label_type shift=0)
 Constructor to wrap the node-based result of an algorithm.
 
 dd (const dd &dd)=default
 Copy construction, incrementing the reference count on the file underneath.
 
 dd (dd &&dd)=default
 Move construction, taking over ownership of the files underneath.
 
const shared_node_file_type file_ptr () const
 Read-only access to the raw files and meta information.
 
const node_file_typeoperator-> () const
 Read-only access to the members of the raw files and meta information, i.e. this is similar to writing .file_ptr()->.
 
bool is_negated () const
 Read-only access to the negation flag.
 
signed_label_type shift () const
 Read-only access to the number of levels to shift.
 
size_t size () const
 The number of elements in the node file.
 
size_t width () const
 The number of nodes on the widest level.
 
size_t number_of_terminals (const bool value) const
 Number of terminals of a certain value.
 
size_t number_of_terminals () const
 Number of terminals.
 

Static Public Attributes

static constexpr label_type max_label = node_type::max_label
 The maximal possible value for a unique identifier's label.
 
static constexpr id_type max_id = node_type::max_id
 The maximal possible value for this nodes level identifier.
 

Protected Member Functions

void deref ()
 Release the claim on the underlying file, thereby decreasing its reference counter. If this is the sole owner of that file object, then that object is destructed together with the physical files on disk (if temporary).
 

Protected Attributes

shared_node_file_type _file
 The file describing the actual DAG of the decision diagram.
 
bool _negate = false
 Whether to negate the leaves when reading nodes from the file.
 
signed_label_type _shift = 0
 Number of levels to shift by.
 

Detailed Description

Container for the files that represent a Decision Diagram.

Remarks
To ensure the most disk-space is available, try to garbage collect objects of this type as quickly as possible and/or minimise the number of lvalues of this type.

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