|
Mantid
|
CompositeCluster : Cluster made by by merging other IClusters. More...
#include <CompositeCluster.h>
Public Member Functions | |
| void | add (std::shared_ptr< ICluster > &toOwn) |
| Own. | |
| void | addIndex (const size_t &index) override |
| Track a linear IMDHistoWorkspace index that belongs to the cluster. | |
| CompositeCluster ()=default | |
| CompositeCluster (const CompositeCluster &)=delete | |
| bool | containsLabel (const size_t &label) const override |
| Is a given label part of this cluster. | |
| size_t | getLabel () const override |
| Get the cluster label. | |
| size_t | getOriginalLabel () const override |
| Original label. | |
| size_t | getRepresentitiveIndex () const override |
| Get a representative index of the cluster. | |
| ICluster::ClusterIntegratedValues | integrate (std::shared_ptr< const Mantid::API::IMDHistoWorkspace > ws) const override |
| integrate the cluster | |
| CompositeCluster & | operator= (const CompositeCluster &)=delete |
| void | setRootCluster (ICluster const *root) override |
| Set the root cluster. | |
| size_t | size () const override |
| Number of indexes tracked. | |
| void | toUniformMinimum (std::vector< DisjointElement > &disjointSet) override |
| Resolve the proper label for this cluster. | |
| void | writeTo (std::shared_ptr< Mantid::API::IMDHistoWorkspace > ws) const override |
| Apply labels to the workspace. | |
Public Member Functions inherited from Mantid::Crystal::ICluster | |
| virtual | ~ICluster ()=default |
| Virtual destructor. | |
Private Member Functions | |
| void | findMinimum () const |
| Helper method to find the minimum label. | |
Private Attributes | |
| std::optional< size_t > | m_label |
| Label used by cluster. | |
| std::vector< std::shared_ptr< ICluster > > | m_ownedClusters |
| Attached clusters. | |
Additional Inherited Members | |
Public Types inherited from Mantid::Crystal::ICluster | |
| using | ClusterIntegratedValues = boost::tuple< double, double > |
CompositeCluster : Cluster made by by merging other IClusters.
Definition at line 19 of file CompositeCluster.h.
|
default |
|
delete |
| void Mantid::Crystal::CompositeCluster::add | ( | std::shared_ptr< ICluster > & | toOwn | ) |
Own.
Add other IClusters to own.
| toOwn | : Item to own |
Definition at line 157 of file CompositeCluster.cpp.
References m_ownedClusters.
|
overridevirtual |
Track a linear IMDHistoWorkspace index that belongs to the cluster.
Add an index. This method does not apply to composite clusters.
Implements Mantid::Crystal::ICluster.
Definition at line 90 of file CompositeCluster.cpp.
|
overridevirtual |
Is a given label part of this cluster.
Does this cluster contain the label of the argument.
| label | : Label id to find |
Implements Mantid::Crystal::ICluster.
Definition at line 169 of file CompositeCluster.cpp.
References m_ownedClusters.
|
private |
Helper method to find the minimum label.
Find the minimum label in the composite.
Definition at line 97 of file CompositeCluster.cpp.
References Mantid::Crystal::ICluster::getLabel(), m_label, and m_ownedClusters.
Referenced by getLabel().
|
overridevirtual |
Get the cluster label.
Get the label.
Implements Mantid::Crystal::ICluster.
Definition at line 64 of file CompositeCluster.cpp.
References findMinimum(), and m_label.
Referenced by getOriginalLabel().
|
overridevirtual |
Original label.
Get the original label.
Doesn't make sense for composites, so wired through to getLabel()
Implements Mantid::Crystal::ICluster.
Definition at line 78 of file CompositeCluster.cpp.
References getLabel().
|
overridevirtual |
Get a representative index of the cluster.
Get any representative index from this cluster.
Implements Mantid::Crystal::ICluster.
Definition at line 139 of file CompositeCluster.cpp.
References m_ownedClusters.
|
overridevirtual |
integrate the cluster
Integrate the composite cluster.
| ws | : Workspace to integrate |
Implements Mantid::Crystal::ICluster.
Definition at line 37 of file CompositeCluster.cpp.
References m_ownedClusters.
|
delete |
|
overridevirtual |
Set the root cluster.
| root | : Root cluster to use |
Implements Mantid::Crystal::ICluster.
Definition at line 147 of file CompositeCluster.cpp.
References m_ownedClusters.
|
overridevirtual |
Number of indexes tracked.
Get the size of the composite.
This is the total size of all owned clusters.
Implements Mantid::Crystal::ICluster.
Definition at line 84 of file CompositeCluster.cpp.
References m_ownedClusters.
|
overridevirtual |
Resolve the proper label for this cluster.
Convert the disjointSet to a uniform minimum value.
| disjointSet | : DisjointSets to adapt. |
Implements Mantid::Crystal::ICluster.
Definition at line 115 of file CompositeCluster.cpp.
References Mantid::Crystal::ICluster::getLabel(), m_label, m_ownedClusters, and Mantid::Crystal::ICluster::setRootCluster().
|
overridevirtual |
Apply labels to the workspace.
Write to an output histo workspace.
| ws |
Implements Mantid::Crystal::ICluster.
Definition at line 54 of file CompositeCluster.cpp.
References m_ownedClusters.
|
mutableprivate |
Label used by cluster.
Definition at line 64 of file CompositeCluster.h.
Referenced by findMinimum(), getLabel(), and toUniformMinimum().
|
private |
Attached clusters.
Definition at line 66 of file CompositeCluster.h.
Referenced by add(), containsLabel(), findMinimum(), getRepresentitiveIndex(), integrate(), setRootCluster(), size(), toUniformMinimum(), and writeTo().