Mantid
Loading...
Searching...
No Matches
FunctionDomainMD.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
15namespace Mantid {
16namespace API {
22class MANTID_API_DLL FunctionDomainMD : public FunctionDomain {
23public:
25 FunctionDomainMD(const IMDWorkspace_const_sptr &ws, size_t start = 0, size_t length = 0);
29 size_t size() const override { return m_size; }
31 void reset() const override;
33 const IMDIterator *getNextIterator() const;
35 IMDWorkspace_const_sptr getWorkspace() const;
36
37protected:
39 mutable std::unique_ptr<IMDIterator> m_iterator;
41 const size_t m_startIndex;
43 mutable size_t m_currentIndex;
45 size_t m_size;
47 mutable bool m_justReset;
48
49private:
52};
53
54} // namespace API
55} // namespace Mantid
size_t m_size
Maximum size of the store.
Implements a domain for MD functions (IFunctionMD).
size_t size() const override
Return the number of arguments in the domain.
~FunctionDomainMD() override
Destructor.
std::unique_ptr< IMDIterator > m_iterator
IMDIterator.
size_t m_size
The size of the domain.
size_t m_currentIndex
track the iterator's index, 0 <= m_currentIndex < m_size.
bool m_justReset
Just reset flag.
const size_t m_startIndex
start of the domain, 0 <= m_startIndex < m_iterator->getDataSize()
IMDWorkspace_const_sptr m_workspace
A pointer to the workspace.
Base class that represents the domain of a function.
This is an interface to an iterator of an IMDWorkspace.
Definition: IMDIterator.h:39
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.