Mantid
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
Mantid::CurveFitting::MultiDomainCreator Class Reference

Creates a composite domain. More...

#include <MultiDomainCreator.h>

Inheritance diagram for Mantid::CurveFitting::MultiDomainCreator:
Mantid::API::IDomainCreator

Public Member Functions

void createDomain (std::shared_ptr< API::FunctionDomain > &domain, std::shared_ptr< API::FunctionValues > &ivalues, size_t i0=0) override
 Create a domain from the input workspace. More...
 
std::shared_ptr< API::WorkspacecreateOutputWorkspace (const std::string &baseName, API::IFunction_sptr function, std::shared_ptr< API::FunctionDomain > domain, std::shared_ptr< API::FunctionValues > values, const std::string &outputWorkspacePropertyName) override
 Create the output workspace. More...
 
size_t getDomainSize () const override
 Return the size of the domain to be created. More...
 
size_t getNCreators () const
 Get number of creators. More...
 
bool hasCreator (size_t i) const
 Check if i-th creator has been set with setCreator. More...
 
void initFunction (API::IFunction_sptr function) override
 Initialize the function. More...
 
 MultiDomainCreator (Kernel::IPropertyManager *fit, const std::vector< std::string > &workspacePropertyNames)
 A friend that can create instances of this class. More...
 
void setCreator (size_t i, API::IDomainCreator *creator)
 Set ith creator. More...
 
- Public Member Functions inherited from Mantid::API::IDomainCreator
virtual void createDomain (std::shared_ptr< API::FunctionDomain > &domain, std::shared_ptr< API::FunctionValues > &values, size_t i0=0)=0
 Create a domain and values from the input workspace. More...
 
virtual std::shared_ptr< API::WorkspacecreateOutputWorkspace (const std::string &baseName, API::IFunction_sptr function, std::shared_ptr< API::FunctionDomain > domain, std::shared_ptr< API::FunctionValues > values, const std::string &outputWorkspacePropertyName="OutputWorkspace")
 Create an output workspace filled with data simulated with the fitting function. More...
 
virtual void declareDatasetProperties (const std::string &suffix="", bool addProp=true)
 Declare properties that specify the dataset within the workspace to fit to. More...
 
virtual size_t getDomainSize () const =0
 Return the size of the domain to be created. More...
 
 IDomainCreator (Kernel::IPropertyManager *manager, std::vector< std::string > workspacePropertyNames, DomainType domainType=Simple)
 Constrcutor. More...
 
void ignoreInvalidData (bool yes)
 Set to ignore invalid data. More...
 
virtual void initFunction (API::IFunction_sptr function)
 Initialize the function. More...
 
virtual void initialize (Kernel::IPropertyManager *, const std::string &, DomainType)
 Initialize. More...
 
void separateCompositeMembersInOutput (const bool value, const bool conv=false)
 Toggle output of either just composite or composite + members. More...
 
virtual ~IDomainCreator ()=default
 Virtual destructor. More...
 

Protected Attributes

std::vector< std::shared_ptr< API::IDomainCreator > > m_creators
 Vector of creators. More...
 
- Protected Attributes inherited from Mantid::API::IDomainCreator
bool m_convolutionCompositeMembers
 Perform convolution of output composite components. More...
 
DomainType m_domainType
 Domain type. More...
 
bool m_ignoreInvalidData
 Flag to ignore nans, infinities and zero errors. More...
 
Kernel::IPropertyManagerm_manager
 Pointer to a property manager. More...
 
bool m_outputCompositeMembers
 Output separate composite function values. More...
 
std::vector< std::string > m_workspacePropertyNames
 Property names for workspaces to get the data from. More...
 

Additional Inherited Members

- Public Types inherited from Mantid::API::IDomainCreator
enum  DomainType { Simple = 0 , Sequential , Parallel }
 Type of domain to create. More...
 
- Protected Member Functions inherited from Mantid::API::IDomainCreator
void declareProperty (Kernel::Property *prop, const std::string &doc)
 Declare a property to the algorithm. More...
 

Detailed Description

Creates a composite domain.

Author
Roman Tolchenov, Tessella plc
Date
06/12/2011

Definition at line 24 of file MultiDomainCreator.h.

Constructor & Destructor Documentation

◆ MultiDomainCreator()

Mantid::CurveFitting::MultiDomainCreator::MultiDomainCreator ( Kernel::IPropertyManager fit,
const std::vector< std::string > &  workspacePropertyNames 
)
inline

A friend that can create instances of this class.

Constructor

Definition at line 29 of file MultiDomainCreator.h.

Member Function Documentation

◆ createDomain()

void Mantid::CurveFitting::MultiDomainCreator::createDomain ( std::shared_ptr< API::FunctionDomain > &  domain,
std::shared_ptr< API::FunctionValues > &  ivalues,
size_t  i0 = 0 
)
overridevirtual

◆ createOutputWorkspace()

std::shared_ptr< API::Workspace > Mantid::CurveFitting::MultiDomainCreator::createOutputWorkspace ( const std::string &  baseName,
API::IFunction_sptr  function,
std::shared_ptr< API::FunctionDomain domain,
std::shared_ptr< API::FunctionValues values,
const std::string &  outputWorkspacePropertyName 
)
overridevirtual

Create the output workspace.

Create the output workspace group.

Parameters
baseName:: The base name for the output workspace. Suffix "Workspace" will be added to it.
function:: A function to calculate the values. Must be of the MultiDomainFunction type.
domain:: Domain created earlier with this creator (unused)
values:: Values created earlier with this creator (unused)
outputWorkspacePropertyName:: Name for the property to hold the output workspace. If empty the property won't be created.
Returns
A shared pointer to the created workspace.

Reimplemented from Mantid::API::IDomainCreator.

Definition at line 104 of file MultiDomainCreator.cpp.

References Mantid::API::IDomainCreator::declareProperty(), Mantid::Kernel::SingletonHolder< T >::Instance(), m_creators, Mantid::API::IDomainCreator::m_manager, Mantid::Kernel::Direction::Output, Mantid::Kernel::IPropertyManager::setProperty(), Mantid::Kernel::IPropertyManager::setPropertyValue(), std::to_string(), and UNUSED_ARG.

◆ getDomainSize()

size_t Mantid::CurveFitting::MultiDomainCreator::getDomainSize ( ) const
inlineoverridevirtual

Return the size of the domain to be created.

Implements Mantid::API::IDomainCreator.

Definition at line 42 of file MultiDomainCreator.h.

◆ getNCreators()

size_t Mantid::CurveFitting::MultiDomainCreator::getNCreators ( ) const
inline

Get number of creators.

Definition at line 47 of file MultiDomainCreator.h.

◆ hasCreator()

bool Mantid::CurveFitting::MultiDomainCreator::hasCreator ( size_t  i) const

Check if i-th creator has been set with setCreator.

Parameters
i:: Index of a creator, 0 < i < getNCreators()

Definition at line 36 of file MultiDomainCreator.cpp.

References m_creators.

◆ initFunction()

void Mantid::CurveFitting::MultiDomainCreator::initFunction ( API::IFunction_sptr  function)
overridevirtual

Initialize the function.

Initialize the function with the workspace(s).

Parameters
function:: A function to initialize.

Reimplemented from Mantid::API::IDomainCreator.

Definition at line 66 of file MultiDomainCreator.cpp.

References Mantid::API::g_log, index, Mantid::API::IDomainCreator::initFunction(), m_creators, and Mantid::Kernel::Logger::warning().

◆ setCreator()

void Mantid::CurveFitting::MultiDomainCreator::setCreator ( size_t  i,
API::IDomainCreator creator 
)

Set ith creator.

Definition at line 28 of file MultiDomainCreator.cpp.

References m_creators.

Member Data Documentation

◆ m_creators

std::vector<std::shared_ptr<API::IDomainCreator> > Mantid::CurveFitting::MultiDomainCreator::m_creators
protected

Vector of creators.

Definition at line 53 of file MultiDomainCreator.h.

Referenced by createDomain(), createOutputWorkspace(), hasCreator(), initFunction(), and setCreator().


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