Mantid
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
Mantid::Crystal::ImplClusterRegister Class Reference

Public Types

using GroupType = std::list< std::unordered_set< size_t > >
 Type for identifying label groups. More...
 
using LabelHash = std::unordered_set< size_t >
 Type for identifying labels already seen. More...
 

Public Member Functions

bool insert (const DisjointElement &a, const DisjointElement &b)
 Inserts a pair of disjoint elements. More...
 
std::list< std::shared_ptr< CompositeCluster > > makeCompositeClusters ()
 Make composite clusters from the merged groups. More...
 

Public Attributes

GroupType m_groups
 Groups of labels to maintain. More...
 
LabelHash m_labelHash
 Hash of labels merged. More...
 
boost::hash< std::pair< int, int > > m_labelHasher
 Label hasher. More...
 
ClusterRegister::MapCluster m_register
 All registered input clusters. More...
 
ClusterRegister::MapCluster m_unique
 Clusters that do not need merging. More...
 

Detailed Description

Definition at line 25 of file ClusterRegister.cpp.

Member Typedef Documentation

◆ GroupType

using Mantid::Crystal::ImplClusterRegister::GroupType = std::list<std::unordered_set<size_t> >

Type for identifying label groups.

Definition at line 34 of file ClusterRegister.cpp.

◆ LabelHash

using Mantid::Crystal::ImplClusterRegister::LabelHash = std::unordered_set<size_t>

Type for identifying labels already seen.

Definition at line 40 of file ClusterRegister.cpp.

Member Function Documentation

◆ insert()

bool Mantid::Crystal::ImplClusterRegister::insert ( const DisjointElement a,
const DisjointElement b 
)
inline

Inserts a pair of disjoint elements.

Determines whether they can be used to reorder existing sets of lables.

Parameters
a: One part of pair
b: Other part of pair
Returns
: true if a new cluster was required for the insertion.

Definition at line 55 of file ClusterRegister.cpp.

References Mantid::Crystal::DisjointElement::getRoot(), and m_groups.

◆ makeCompositeClusters()

std::list< std::shared_ptr< CompositeCluster > > Mantid::Crystal::ImplClusterRegister::makeCompositeClusters ( )
inline

Make composite clusters from the merged groups.

Returns
Merged composite clusters.

Definition at line 105 of file ClusterRegister.cpp.

References m_groups, and m_register.

Member Data Documentation

◆ m_groups

GroupType Mantid::Crystal::ImplClusterRegister::m_groups

Groups of labels to maintain.

Definition at line 37 of file ClusterRegister.cpp.

Referenced by insert(), and makeCompositeClusters().

◆ m_labelHash

LabelHash Mantid::Crystal::ImplClusterRegister::m_labelHash

Hash of labels merged.

Definition at line 43 of file ClusterRegister.cpp.

◆ m_labelHasher

boost::hash<std::pair<int, int> > Mantid::Crystal::ImplClusterRegister::m_labelHasher

Label hasher.

Definition at line 46 of file ClusterRegister.cpp.

◆ m_register

ClusterRegister::MapCluster Mantid::Crystal::ImplClusterRegister::m_register

All registered input clusters.

Definition at line 28 of file ClusterRegister.cpp.

Referenced by makeCompositeClusters().

◆ m_unique

ClusterRegister::MapCluster Mantid::Crystal::ImplClusterRegister::m_unique

Clusters that do not need merging.

Definition at line 31 of file ClusterRegister.cpp.


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