|
Mantid
|
CompositeCluster : Cluster made by by merging other IClusters. More...
#include <CompositeCluster.h>
Public Member Functions | |
| void | add (std::shared_ptr< ICluster > &toOwn) |
| Own. More... | |
| void | addIndex (const size_t &index) override |
| Track a linear IMDHistoWorkspace index that belongs to the cluster. More... | |
| CompositeCluster ()=default | |
| CompositeCluster (const CompositeCluster &)=delete | |
| bool | containsLabel (const size_t &label) const override |
| Is a given label part of this cluster. More... | |
| size_t | getLabel () const override |
| Get the cluster label. More... | |
| size_t | getOriginalLabel () const override |
| Original label. More... | |
| size_t | getRepresentitiveIndex () const override |
| Get a representative index of the cluster. More... | |
| ICluster::ClusterIntegratedValues | integrate (std::shared_ptr< const Mantid::API::IMDHistoWorkspace > ws) const override |
| integrate the cluster More... | |
| CompositeCluster & | operator= (const CompositeCluster &)=delete |
| void | setRootCluster (ICluster const *root) override |
| Set the root cluster. More... | |
| size_t | size () const override |
| Number of indexes tracked. More... | |
| void | toUniformMinimum (std::vector< DisjointElement > &disjointSet) override |
| Resolve the proper label for this cluster. More... | |
| void | writeTo (std::shared_ptr< Mantid::API::IMDHistoWorkspace > ws) const override |
| Apply labels to the workspace. More... | |
Public Member Functions inherited from Mantid::Crystal::ICluster | |
| virtual void | addIndex (const size_t &index)=0 |
| Track a linear IMDHistoWorkspace index that belongs to the cluster. More... | |
| virtual bool | containsLabel (const size_t &label) const =0 |
| Is the label contained in the cluster. More... | |
| virtual size_t | getLabel () const =0 |
| Get the cluster label. More... | |
| virtual size_t | getOriginalLabel () const =0 |
| Get the originally set label. More... | |
| virtual size_t | getRepresentitiveIndex () const =0 |
| Get a represetiative index of the cluster. More... | |
| virtual ClusterIntegratedValues | integrate (std::shared_ptr< const Mantid::API::IMDHistoWorkspace > ws) const =0 |
| integrate the cluster More... | |
| virtual void | setRootCluster (ICluster const *root)=0 |
| Set the root cluster. More... | |
| virtual size_t | size () const =0 |
| Number of indexes tracked. More... | |
| virtual void | toUniformMinimum (std::vector< DisjointElement > &disjointSet)=0 |
| Resolve the proper label for this cluster. More... | |
| virtual void | writeTo (std::shared_ptr< Mantid::API::IMDHistoWorkspace > ws) const =0 |
| Apply labels to the workspace. More... | |
| virtual | ~ICluster ()=default |
| Virtual destructor. More... | |
Private Member Functions | |
| void | findMinimum () const |
| Helper method to find the minimum label. More... | |
Private Attributes | |
| boost::optional< size_t > | m_label |
| Label used by cluster. More... | |
| std::vector< std::shared_ptr< ICluster > > | m_ownedClusters |
| Attached clusters. More... | |
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 20 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 155 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 88 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 167 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 95 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 62 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 76 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 137 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 35 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 145 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 82 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 113 of file CompositeCluster.cpp.
References Mantid::Crystal::ICluster::getLabel(), m_label, and m_ownedClusters.
|
overridevirtual |
Apply labels to the workspace.
Write to an output histo workspace.
| ws |
Implements Mantid::Crystal::ICluster.
Definition at line 52 of file CompositeCluster.cpp.
References m_ownedClusters.
|
mutableprivate |
Label used by cluster.
Definition at line 65 of file CompositeCluster.h.
Referenced by findMinimum(), getLabel(), and toUniformMinimum().
|
private |
Attached clusters.
Definition at line 67 of file CompositeCluster.h.
Referenced by add(), containsLabel(), findMinimum(), getRepresentitiveIndex(), integrate(), setRootCluster(), size(), toUniformMinimum(), and writeTo().