LatticeHashForest
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions
lhf Namespace Reference

Classes

struct  __CalcTime
 The object used to enable the duration capturing mechanism. More...
 
struct  AbsentValueAccessError
 Thrown if an Optional is accessed when the value is absent. More...
 
struct  AssertError
 Struct that is thrown on an assertion failure. More...
 
struct  Deduplicator
 An LHF-like structure for scalar values. It does not implement any special operations besides deduplication. More...
 
struct  DefaultPrinter
 
class  LatticeHashForest
 The main LatticeHashForest structure. This class can be used as-is with a type or derived for additional functionality as needed. More...
 
class  MapAdapter
 
struct  NestingBase
 Describes the standard nesting structure. Act as "non-leaf" nodes in a tree of nested LHFs. More...
 
struct  NestingNone
 The nesting type for non-nested data structures. Act as "leaf" nodes in a tree of nested LHFs. More...
 
struct  OperationNode
 This struct contains the information about the operands of an operation (union, intersection, etc.) More...
 
struct  OperationPerf
 Operation performance Statistics. More...
 
class  Optional
 Describes an optional of some type T. The value may either be present or absent. More...
 
class  OptionalRef
 Describes an optional reference of some type T. The value may either be present or absent. More...
 
struct  PerformanceStatistics
 Utility class for enabling code-based profiling. More...
 
struct  SetEqual
 Generic Equality comparator for set types. More...
 
struct  SetHash
 Hasher for set types. More...
 
struct  SetLess
 Generic Less-than comparator for set types. More...
 
struct  Unreachable
 Thrown if code region is unreachable. More...
 

Typedefs

using Size = std::size_t
 
using String = std::string
 
using IndexValue = Size
 
template<typename T >
using UniquePointer = std::unique_ptr< T >
 
template<typename T >
using Vector = std::vector< T >
 
template<typename K , typename V >
using HashMap = std::unordered_map< K, V >
 
template<typename K , typename V >
using OrderedMap = std::map< K, V >
 
template<typename T >
using HashSet = std::unordered_set< T >
 
template<typename T >
using OrderedSet = std::set< T >
 
template<typename T >
using DefaultLess = std::less< T >
 
template<typename T >
using DefaultHash = std::hash< T >
 
template<typename T >
using DefaultEqual = std::equal_to< T >
 
template<typename K , typename V >
using InternalMap = MapAdapter< HashMap< K, V > >
 
template<typename T >
using OperationMap = InternalMap< T, IndexValue >
 

Enumerations

enum  SubsetRelation { UNKNOWN = 0 , SUBSET = 1 , SUPERSET = 2 }
 Used to store a subset relation between two set indices. Because the index pair must be in sorted order to prevent duplicates, it necessitates this enum. More...
 

Functions

template<typename T , typename Hash = DefaultHash<T>>
Size compose_hash (const Size prev, T next)
 Composes a preexisting hash with another variable. Useful for Hashing containers. Adapted from boost::hash_combine.
 
std::ostream & operator<< (std::ostream &os, const OperationNode &op)
 

Typedef Documentation

◆ DefaultEqual

template<typename T >
using lhf::DefaultEqual = typedef std::equal_to<T>

Definition at line 89 of file lhf.hpp.

◆ DefaultHash

template<typename T >
using lhf::DefaultHash = typedef std::hash<T>

Definition at line 86 of file lhf.hpp.

◆ DefaultLess

template<typename T >
using lhf::DefaultLess = typedef std::less<T>

Definition at line 83 of file lhf.hpp.

◆ HashMap

template<typename K , typename V >
using lhf::HashMap = typedef std::unordered_map<K, V>

Definition at line 71 of file lhf.hpp.

◆ HashSet

template<typename T >
using lhf::HashSet = typedef std::unordered_set<T>

Definition at line 77 of file lhf.hpp.

◆ IndexValue

using lhf::IndexValue = typedef Size

Definition at line 62 of file lhf.hpp.

◆ InternalMap

template<typename K , typename V >
using lhf::InternalMap = typedef MapAdapter<HashMap<K, V> >

Definition at line 797 of file lhf.hpp.

◆ OperationMap

template<typename T >
using lhf::OperationMap = typedef InternalMap<T, IndexValue>

Defines the map of operations in LHF. Template parameter can be used to set an operation of any arity.

Definition at line 806 of file lhf.hpp.

◆ OrderedMap

template<typename K , typename V >
using lhf::OrderedMap = typedef std::map<K, V>

Definition at line 74 of file lhf.hpp.

◆ OrderedSet

template<typename T >
using lhf::OrderedSet = typedef std::set<T>

Definition at line 80 of file lhf.hpp.

◆ Size

using lhf::Size = typedef std::size_t

Definition at line 48 of file lhf.hpp.

◆ String

using lhf::String = typedef std::string

Definition at line 50 of file lhf.hpp.

◆ UniquePointer

template<typename T >
using lhf::UniquePointer = typedef std::unique_ptr<T>

Definition at line 65 of file lhf.hpp.

◆ Vector

template<typename T >
using lhf::Vector = typedef std::vector<T>

Definition at line 68 of file lhf.hpp.

Enumeration Type Documentation

◆ SubsetRelation

Used to store a subset relation between two set indices. Because the index pair must be in sorted order to prevent duplicates, it necessitates this enum.

Enumerator
UNKNOWN 
SUBSET 
SUPERSET 

Definition at line 185 of file lhf.hpp.

Function Documentation

◆ compose_hash()

template<typename T , typename Hash = DefaultHash<T>>
Size lhf::compose_hash ( const Size  prev,
next 
)
inline

Composes a preexisting hash with another variable. Useful for Hashing containers. Adapted from boost::hash_combine.

Parameters
[in]prevThe current hash
[in]nextThe value to compose with the current hash
Template Parameters
TValue type
HashHash for the value type
Returns
The composed hash

Definition at line 209 of file lhf.hpp.

◆ operator<<()

std::ostream & lhf::operator<< ( std::ostream &  os,
const OperationNode op 
)
inline

Definition at line 236 of file lhf.hpp.