Mantid
Loading...
Searching...
No Matches
CompositeCluster.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
9#include "MantidCrystal/DllConfig.h"
11#include <memory>
12#include <optional>
13
14namespace Mantid {
15namespace Crystal {
16
19class MANTID_CRYSTAL_DLL CompositeCluster : public ICluster {
20public:
21 CompositeCluster() = default;
25 ICluster::ClusterIntegratedValues integrate(std::shared_ptr<const Mantid::API::IMDHistoWorkspace> ws) const override;
26
28 void writeTo(std::shared_ptr<Mantid::API::IMDHistoWorkspace> ws) const override;
29
31 size_t getOriginalLabel() const override;
32
34 size_t getLabel() const override;
35
37 size_t size() const override;
38
40 void addIndex(const size_t &index) override;
41
43 void toUniformMinimum(std::vector<DisjointElement> &disjointSet) override;
44
46 void add(std::shared_ptr<ICluster> &toOwn);
47
49 void setRootCluster(ICluster const *root) override;
50
52 size_t getRepresentitiveIndex() const override;
53
55 bool containsLabel(const size_t &label) const override;
56
57private:
59 void findMinimum() const;
60
61 // void validateNoRepeat(CompositeCluster*const other) const;
62
64 mutable std::optional<size_t> m_label;
66 std::vector<std::shared_ptr<ICluster>> m_ownedClusters;
67};
68
69} // namespace Crystal
70} // namespace Mantid
CompositeCluster : Cluster made by by merging other IClusters.
CompositeCluster & operator=(const CompositeCluster &)=delete
std::optional< size_t > m_label
Label used by cluster.
CompositeCluster(const CompositeCluster &)=delete
std::vector< std::shared_ptr< ICluster > > m_ownedClusters
Attached clusters.
ICluster : Abstract cluster.
Definition ICluster.h:24
boost::tuple< double, double > ClusterIntegratedValues
Definition ICluster.h:26
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 ...