Mantid
Loading...
Searching...
No Matches
ICluster.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
10#include "MantidCrystal/DllConfig.h"
11#include <boost/tuple/tuple.hpp>
12#include <memory>
13#include <vector>
14
15namespace Mantid {
16namespace API {
17class IMDHistoWorkspace;
18}
19namespace Crystal {
20
24class MANTID_CRYSTAL_DLL ICluster {
25public:
26 using ClusterIntegratedValues = boost::tuple<double, double>;
27
29 virtual ClusterIntegratedValues integrate(std::shared_ptr<const Mantid::API::IMDHistoWorkspace> ws) const = 0;
30
32 virtual void writeTo(std::shared_ptr<Mantid::API::IMDHistoWorkspace> ws) const = 0;
33
35 virtual size_t getOriginalLabel() const = 0;
36
38 virtual size_t getLabel() const = 0;
39
41 virtual size_t size() const = 0;
42
44 virtual void addIndex(const size_t &index) = 0;
45
47 virtual void toUniformMinimum(std::vector<DisjointElement> &disjointSet) = 0;
48
50 virtual ~ICluster() = default;
51
53 virtual void setRootCluster(ICluster const *root) = 0;
54
56 virtual size_t getRepresentitiveIndex() const = 0;
57
59 virtual bool containsLabel(const size_t &label) const = 0;
60};
61
62} // namespace Crystal
63} // namespace Mantid
ICluster : Abstract cluster.
Definition ICluster.h:24
virtual size_t getLabel() const =0
Get the cluster label.
virtual void setRootCluster(ICluster const *root)=0
Set the root cluster.
virtual void writeTo(std::shared_ptr< Mantid::API::IMDHistoWorkspace > ws) const =0
Apply labels to the workspace.
virtual void toUniformMinimum(std::vector< DisjointElement > &disjointSet)=0
Resolve the proper label for this cluster.
boost::tuple< double, double > ClusterIntegratedValues
Definition ICluster.h:26
virtual size_t getRepresentitiveIndex() const =0
Get a represetiative index of the cluster.
virtual size_t size() const =0
Number of indexes tracked.
virtual size_t getOriginalLabel() const =0
Get the originally set label.
virtual bool containsLabel(const size_t &label) const =0
Is the label contained in the cluster.
virtual ~ICluster()=default
Virtual destructor.
virtual void addIndex(const size_t &index)=0
Track a linear IMDHistoWorkspace index that belongs to the cluster.
virtual ClusterIntegratedValues integrate(std::shared_ptr< const Mantid::API::IMDHistoWorkspace > ws) const =0
integrate the cluster
Helper class which provides the Collimation Length for SANS instruments.
Peak indexing algorithm, which works by assigning multiple possible HKL values to each peak and then ...