TeDDy 4.1.0
Decision diagram library.
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | List of all members
teddy::unique_table< Data, Degree > Class Template Reference

Table of unique nodes. More...

#include <hash_tables.hpp>

Classes

struct  result_of_find
 

Public Types

using node_t = node< Data, Degree >
 
using son_container = typename node_t::son_container
 
using iterator = unique_table_iterator< Data, Degree >
 

Public Member Functions

 unique_table (int64 capacity, int32 domain)
 Initializes empty table.
 
 unique_table (unique_table const &)
 Copt constructor.
 
 unique_table (unique_table &&other) noexcept
 Move constructor.
 
 ~unique_table ()
 Destructor.
 
auto operator= (unique_table const &)=delete
 
auto operator= (unique_table &&)=delete
 
auto find (son_container const &sons) const -> result_of_find
 Tries to find an internal node.
 
auto merge (unique_table other) -> void
 Adds all nodes from other into this table Adjusts capacity if necessary.
 
auto insert (node_t *node, std::size_t hash) -> void
 Inserts node using pre-computed hash.
 
auto erase (iterator nodeIt) -> iterator
 Erases node pointed to by it.
 
auto erase (node_t *node) -> iterator
 Erases node.
 
auto adjust_capacity () -> void
 Adjusts capacity of the table (number of buckets)
 
auto get_size () const -> int64
 
auto clear () -> void
 Clears the table.
 
auto begin () -> iterator
 
auto end () -> iterator
 
auto begin () const -> iterator
 
auto end () const -> iterator
 

Detailed Description

template<class Data, class Degree>
class teddy::unique_table< Data, Degree >

Table of unique nodes.


Class Documentation

◆ teddy::unique_table::result_of_find

struct teddy::unique_table::result_of_find
template<class Data, class Degree>
struct teddy::unique_table< Data, Degree >::result_of_find
Class Members
node_t * node_
size_t hash_

Constructor & Destructor Documentation

◆ unique_table()

template<class Data , class Degree >
teddy::unique_table< Data, Degree >::unique_table ( int64  capacity,
int32  domain 
)

Initializes empty table.

Parameters
capacityInitial capacity
domainDomain of nodes

Member Function Documentation

◆ find()

template<class Data , class Degree >
auto teddy::unique_table< Data, Degree >::find ( son_container const &  sons) const -> result_of_find

Tries to find an internal node.

Parameters
sonsSons of the desired node
Returns
Pointer to the node, nullptr if not found Hash of the node that can be used in insertion

◆ merge()

template<class Data , class Degree >
auto teddy::unique_table< Data, Degree >::merge ( unique_table< Data, Degree >  other) -> void

Adds all nodes from other into this table Adjusts capacity if necessary.

Parameters
otherTable to merge into this one
domainNumber of sons in this and other

◆ insert()

template<class Data , class Degree >
auto teddy::unique_table< Data, Degree >::insert ( node_t node,
std::size_t  hash 
) -> void

Inserts node using pre-computed hash.

Parameters
nodeNode to be inserted
hashHash value of node

◆ erase() [1/2]

template<class Data , class Degree >
auto teddy::unique_table< Data, Degree >::erase ( iterator  nodeIt) -> iterator

Erases node pointed to by it.

Parameters
nodeItIterator to the node to be deleted
Returns
Iterator to the next node

◆ erase() [2/2]

template<class Data , class Degree >
auto teddy::unique_table< Data, Degree >::erase ( node_t node) -> iterator

Erases node.

Parameters
nodeNode to be erased
Returns
Iterator to the next node

◆ get_size()

template<class Data , class Degree >
auto teddy::unique_table< Data, Degree >::get_size
Returns
Number of nodes in the table

◆ begin() [1/2]

template<class Data , class Degree >
auto teddy::unique_table< Data, Degree >::begin
Returns
Begin iterator

◆ end() [1/2]

template<class Data , class Degree >
auto teddy::unique_table< Data, Degree >::end
Returns
End iterator

◆ begin() [2/2]

template<class Data , class Degree >
auto teddy::unique_table< Data, Degree >::begin
Returns
Const begin iterator

◆ end() [2/2]

template<class Data , class Degree >
auto teddy::unique_table< Data, Degree >::end
Returns
Const end iterator

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