Mantid
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Private Attributes | List of all members
Mantid::API::FunctionDomainMD Class Reference

Implements a domain for MD functions (IFunctionMD). More...

#include <FunctionDomainMD.h>

Inheritance diagram for Mantid::API::FunctionDomainMD:
Mantid::API::FunctionDomain

Public Member Functions

 FunctionDomainMD (const IMDWorkspace_const_sptr &ws, size_t start=0, size_t length=0)
 Constructor. More...
 
const IMDIteratorgetNextIterator () const
 Next iterator. More...
 
IMDWorkspace_const_sptr getWorkspace () const
 Returns the pointer to the original workspace. More...
 
void reset () const override
 Reset the iterator to point to the start of the domain. More...
 
size_t size () const override
 Return the number of arguments in the domain. More...
 
 ~FunctionDomainMD () override
 Destructor. More...
 
- Public Member Functions inherited from Mantid::API::FunctionDomain
virtual void reset () const
 Reset the the domain so it can be reused. More...
 
virtual size_t size () const =0
 Return the number of points in the domain. More...
 
virtual ~FunctionDomain ()=default
 Virtual destructor. More...
 

Protected Attributes

size_t m_currentIndex
 track the iterator's index, 0 <= m_currentIndex < m_size. More...
 
std::unique_ptr< IMDIteratorm_iterator
 IMDIterator. More...
 
bool m_justReset
 Just reset flag. More...
 
size_t m_size
 The size of the domain. More...
 
const size_t m_startIndex
 start of the domain, 0 <= m_startIndex < m_iterator->getDataSize() More...
 

Private Attributes

IMDWorkspace_const_sptr m_workspace
 A pointer to the workspace. More...
 

Detailed Description

Implements a domain for MD functions (IFunctionMD).

Author
Roman Tolchenov, Tessella plc
Date
15/11/2011

Definition at line 22 of file FunctionDomainMD.h.

Constructor & Destructor Documentation

◆ FunctionDomainMD()

Mantid::API::FunctionDomainMD::FunctionDomainMD ( const IMDWorkspace_const_sptr ws,
size_t  start = 0,
size_t  length = 0 
)

Constructor.

Create a domain form a IMDWorkspace.

Parameters
ws:: Pointer to a workspace.
start:: Index of the first iterator in this domain.
length:: Size of this domain. If 0 use all workspace.

Definition at line 23 of file FunctionDomainMD.cpp.

References m_iterator, and m_size.

◆ ~FunctionDomainMD()

Mantid::API::FunctionDomainMD::~FunctionDomainMD ( )
overridedefault

Destructor.

Member Function Documentation

◆ getNextIterator()

const IMDIterator * Mantid::API::FunctionDomainMD::getNextIterator ( ) const

Next iterator.

First call after creation returns the first iterator.

Successive calls return advanced iterators until the end of the domain reached in which case a NULL pointer is returned.

Returns
:: Pointer to an iterator or NULL.

Definition at line 56 of file FunctionDomainMD.cpp.

References m_currentIndex, m_iterator, m_justReset, and m_size.

Referenced by Mantid::MDAlgorithms::FitMD::createDomain(), and Mantid::API::IFunctionMD::evaluateFunction().

◆ getWorkspace()

IMDWorkspace_const_sptr Mantid::API::FunctionDomainMD::getWorkspace ( ) const

Returns the pointer to the original workspace.

Definition at line 70 of file FunctionDomainMD.cpp.

References m_workspace.

◆ reset()

void Mantid::API::FunctionDomainMD::reset ( ) const
overridevirtual

Reset the iterator to point to the start of the domain.

Reimplemented from Mantid::API::FunctionDomain.

Definition at line 43 of file FunctionDomainMD.cpp.

References m_currentIndex, m_iterator, m_justReset, and m_startIndex.

Referenced by Mantid::MDAlgorithms::FitMD::createDomain(), and Mantid::API::IFunctionMD::evaluateFunction().

◆ size()

size_t Mantid::API::FunctionDomainMD::size ( ) const
inlineoverridevirtual

Return the number of arguments in the domain.

Implements Mantid::API::FunctionDomain.

Definition at line 29 of file FunctionDomainMD.h.

References m_size.

Member Data Documentation

◆ m_currentIndex

size_t Mantid::API::FunctionDomainMD::m_currentIndex
mutableprotected

track the iterator's index, 0 <= m_currentIndex < m_size.

Definition at line 43 of file FunctionDomainMD.h.

Referenced by getNextIterator(), and reset().

◆ m_iterator

std::unique_ptr<IMDIterator> Mantid::API::FunctionDomainMD::m_iterator
mutableprotected

IMDIterator.

Definition at line 39 of file FunctionDomainMD.h.

Referenced by FunctionDomainMD(), getNextIterator(), and reset().

◆ m_justReset

bool Mantid::API::FunctionDomainMD::m_justReset
mutableprotected

Just reset flag.

Definition at line 47 of file FunctionDomainMD.h.

Referenced by getNextIterator(), and reset().

◆ m_size

size_t Mantid::API::FunctionDomainMD::m_size
protected

The size of the domain.

Definition at line 45 of file FunctionDomainMD.h.

Referenced by FunctionDomainMD(), and getNextIterator().

◆ m_startIndex

const size_t Mantid::API::FunctionDomainMD::m_startIndex
protected

start of the domain, 0 <= m_startIndex < m_iterator->getDataSize()

Definition at line 41 of file FunctionDomainMD.h.

Referenced by reset().

◆ m_workspace

IMDWorkspace_const_sptr Mantid::API::FunctionDomainMD::m_workspace
private

A pointer to the workspace.

Definition at line 51 of file FunctionDomainMD.h.

Referenced by getWorkspace().


The documentation for this class was generated from the following files: