mCRL2
Loading...
Searching...
No Matches
tree_set.h
Go to the documentation of this file.
1// Author(s): Bas Ploeger
2// Copyright: see the accompanying file COPYING or copy at
3// https://github.com/mCRL2org/mCRL2/blob/master/COPYING
4//
5// Distributed under the Boost Software License, Version 1.0.
6// (See accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt)
8//
10
11#ifndef _TREE_SET_H
12#define _TREE_SET_H
13#include <cstddef>
14#include <vector>
15
16namespace mcrl2
17{
18namespace lts
19{
21{
22 private:
23 struct bucket
24 {
25 ptrdiff_t child_l;
26 ptrdiff_t child_r;
27 ptrdiff_t tag;
28 ptrdiff_t next;
29 };
31 ptrdiff_t buckets_size;
32 ptrdiff_t buckets_next;
33
34 ptrdiff_t* tags;
35 ptrdiff_t tags_size;
36 ptrdiff_t tags_next;
37
38 ptrdiff_t* hashtable;
39 ptrdiff_t hashmask;
40
41 void check_tags();
42 void check_buckets();
43 ptrdiff_t find_set(ptrdiff_t child_l,ptrdiff_t child_r);
44 ptrdiff_t build_set(ptrdiff_t child_l,ptrdiff_t child_r);
45 public:
48 ptrdiff_t create_set(std::vector<ptrdiff_t> &elems);
49 ptrdiff_t get_next_tag();
50 ptrdiff_t get_set(ptrdiff_t tag);
51 ptrdiff_t get_set_child_left(ptrdiff_t set);
52 ptrdiff_t get_set_child_right(ptrdiff_t set);
53 ptrdiff_t get_set_size(ptrdiff_t set);
54 bool is_set_empty(ptrdiff_t set);
55 ptrdiff_t set_set_tag(ptrdiff_t set);
56};
57}
58}
59#endif
bool is_set_empty(ptrdiff_t set)
Definition tree_set.cpp:205
ptrdiff_t get_set_child_left(ptrdiff_t set)
Definition tree_set.cpp:185
ptrdiff_t find_set(ptrdiff_t child_l, ptrdiff_t child_r)
Definition tree_set.cpp:126
ptrdiff_t create_set(std::vector< ptrdiff_t > &elems)
Definition tree_set.cpp:139
ptrdiff_t get_set(ptrdiff_t tag)
Definition tree_set.cpp:180
ptrdiff_t get_set_child_right(ptrdiff_t set)
Definition tree_set.cpp:190
ptrdiff_t build_set(ptrdiff_t child_l, ptrdiff_t child_r)
Definition tree_set.cpp:114
ptrdiff_t set_set_tag(ptrdiff_t set)
Definition tree_set.cpp:210
ptrdiff_t get_set_size(ptrdiff_t set)
Definition tree_set.cpp:195
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Definition indexed_set.h:72