34 std::string
name()
const override {
return "MultiDomainFunction"; }
43 void iterationStarting()
override;
45 void iterationFinished()
override;
48 void setDomainIndex(
size_t funIndex,
size_t domainIndex);
50 void setDomainIndices(
size_t funIndex,
const std::vector<size_t> &domainIndices);
52 void clearDomainIndices();
56 void getDomainIndices(
size_t funIndex,
size_t nDomains, std::vector<size_t> &domains)
const;
58 size_t getNumberDomains()
const override;
60 std::vector<IFunction_sptr> createEquivalentFunctions()
const override;
70 Attribute getLocalAttribute(
size_t funIndex,
const std::string &attName)
const override;
72 void setLocalAttribute(
size_t funIndex,
const std::string &attName,
const Attribute &)
override;
74 bool hasLocalAttribute(
const std::string &attName)
const override {
return attName ==
"domains"; }
78 void countNumberOfDomains();
Base class for a composite domain.
A composite function is a function containing other functions.
Base class that represents the domain of a function.
A class to store values calculated by a function.
Attribute is a non-fitting parameter.
Represents the Jacobian in IFitFunction::functionDeriv.
A composite function defined on a CompositeDomain.
size_t getMaxIndex() const
Get the largest domain index.
size_t nLocalAttributes() const override
Returns the number of "local" attributes associated with the function.
std::vector< size_t > m_valueOffsets
std::map< size_t, std::vector< size_t > > m_domains
Domain index map: finction -> domain.
std::vector< std::string > getLocalAttributeNames() const override
Returns a list of attribute names.
size_t m_nDomains
Number of domains this MultiDomainFunction operates on.
bool hasLocalAttribute(const std::string &attName) const override
Check if attribute attName exists.
size_t m_maxIndex
Maximum domain index.
std::string name() const override
Returns the function's name.
Helper class which provides the Collimation Length for SANS instruments.