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 "MantidKernel/System.h"
12#include <boost/tuple/tuple.hpp>
13#include <memory>
14#include <vector>
15
16namespace Mantid {
17namespace API {
18class IMDHistoWorkspace;
19}
20namespace Crystal {
21
25class MANTID_CRYSTAL_DLL ICluster {
26public:
27 using ClusterIntegratedValues = boost::tuple<double, double>;
28
30 virtual ClusterIntegratedValues integrate(std::shared_ptr<const Mantid::API::IMDHistoWorkspace> ws) const = 0;
31
33 virtual void writeTo(std::shared_ptr<Mantid::API::IMDHistoWorkspace> ws) const = 0;
34
36 virtual size_t getOriginalLabel() const = 0;
37
39 virtual size_t getLabel() const = 0;
40
42 virtual size_t size() const = 0;
43
45 virtual void addIndex(const size_t &index) = 0;
46
48 virtual void toUniformMinimum(std::vector<DisjointElement> &disjointSet) = 0;
49
51 virtual ~ICluster() = default;
52
54 virtual void setRootCluster(ICluster const *root) = 0;
55
57 virtual size_t getRepresentitiveIndex() const = 0;
58
60 virtual bool containsLabel(const size_t &label) const = 0;
61};
62
63} // namespace Crystal
64} // namespace Mantid
ICluster : Abstract cluster.
Definition: ICluster.h:25
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:27
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 ...
Definition: IndexSXPeaks.h:29