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 "MantidKernel/System.h"
12#include <boost/optional.hpp>
13#include <memory>
14
15namespace Mantid {
16namespace Crystal {
17
20class MANTID_CRYSTAL_DLL CompositeCluster : public ICluster {
21public:
22 CompositeCluster() = default;
26 ICluster::ClusterIntegratedValues integrate(std::shared_ptr<const Mantid::API::IMDHistoWorkspace> ws) const override;
27
29 void writeTo(std::shared_ptr<Mantid::API::IMDHistoWorkspace> ws) const override;
30
32 size_t getOriginalLabel() const override;
33
35 size_t getLabel() const override;
36
38 size_t size() const override;
39
41 void addIndex(const size_t &index) override;
42
44 void toUniformMinimum(std::vector<DisjointElement> &disjointSet) override;
45
47 void add(std::shared_ptr<ICluster> &toOwn);
48
50 void setRootCluster(ICluster const *root) override;
51
53 size_t getRepresentitiveIndex() const override;
54
56 bool containsLabel(const size_t &label) const override;
57
58private:
60 void findMinimum() const;
61
62 // void validateNoRepeat(CompositeCluster*const other) const;
63
65 mutable boost::optional<size_t> m_label;
67 std::vector<std::shared_ptr<ICluster>> m_ownedClusters;
68};
69
70} // namespace Crystal
71} // namespace Mantid
CompositeCluster : Cluster made by by merging other IClusters.
CompositeCluster & operator=(const CompositeCluster &)=delete
boost::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:25
boost::tuple< double, double > ClusterIntegratedValues
Definition: ICluster.h:27
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