Mantid
Loading...
Searching...
No Matches
CompositeDomainMD.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2009 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//----------------------------------------------------------------------
10// Includes
11//----------------------------------------------------------------------
14
15#include <vector>
16
17namespace Mantid {
18namespace API {
19class FunctionDomainMD;
20
28class MANTID_API_DLL CompositeDomainMD : public CompositeDomain {
29public:
30 CompositeDomainMD(const IMDWorkspace_const_sptr &ws, size_t maxDomainSize);
33 size_t size() const override { return m_totalSize; }
35 size_t getNParts() const override { return m_domains.size(); }
37 const FunctionDomain &getDomain(size_t i) const override;
38
39protected:
40 mutable std::unique_ptr<IMDIterator> m_iterator;
41 size_t m_totalSize;
42 mutable std::vector<std::unique_ptr<FunctionDomainMD>> m_domains;
43};
44
45} // namespace API
46} // namespace Mantid
A composite domain for MD functions.
~CompositeDomainMD() override
Destructor.
std::vector< std::unique_ptr< FunctionDomainMD > > m_domains
smaller parts of the domain
size_t size() const override
Return the total number of arguments in the domain.
std::unique_ptr< IMDIterator > m_iterator
IMDIterator.
size_t getNParts() const override
Return the number of parts in the domain.
size_t m_totalSize
The total size of the domain.
Base class for a composite domain.
Base class that represents the domain of a function.
std::shared_ptr< const IMDWorkspace > IMDWorkspace_const_sptr
Shared pointer to the IMDWorkspace base class (const version)
Definition: IMDWorkspace.h:148
Helper class which provides the Collimation Length for SANS instruments.