Mantid
Loading...
Searching...
No Matches
FunctionModel.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 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 +
14#include "MantidKernel/Logger.h"
16
17#include <algorithm>
18#include <utility>
19
20namespace {
21Mantid::Kernel::Logger g_log("FitFunction");
22}
23
25
26using namespace Mantid::API;
27
30 m_function = std::dynamic_pointer_cast<MultiDomainFunction>(fun);
31 if (m_function) {
33 return;
34 }
36 if (fun) {
37 auto const nf = m_numberDomains > 0 ? static_cast<int>(m_numberDomains) : 1;
39 for (int i = 0; i < nf; ++i) {
40 m_function->addFunction(fun->clone());
41 m_function->setDomainIndex(i, i);
42 }
43 }
44}
45
47 if (!m_function)
48 return m_function;
49
50 auto const numberOfFunctions = m_function->nFunctions();
51
52 if (numberOfFunctions > 1) {
53 if (m_currentDomainIndex < numberOfFunctions)
56
57 } else if (numberOfFunctions == 1) {
58 auto const function = m_function->getFunction(0)->clone();
59 auto const composite = std::dynamic_pointer_cast<CompositeFunction>(function);
60
61 if (composite && composite->nFunctions() == 1)
62 return composite->getFunction(0);
63 return function;
64 }
65 return IFunction_sptr();
66}
67
69 auto function = std::dynamic_pointer_cast<MultiDomainFunction>(m_function->clone());
70
71 auto const singleFun = m_function->getFunction(index);
72 for (auto paramIter = m_globalParameterNames.begin(); paramIter != m_globalParameterNames.end();) {
73 if (singleFun->hasParameter(paramIter->toStdString())) {
74 QStringList ties;
75 for (auto i = 0u; i < m_function->nFunctions(); ++i)
76 if (i != index)
77 ties << "f" + QString::number(i) + "." + *paramIter;
78
79 ties << "f" + QString::number(index) + "." + *paramIter;
80 function->addTies(ties.join("=").toStdString());
81 ++paramIter;
82 } else {
83 paramIter = m_globalParameterNames.erase(paramIter);
84 }
85 }
86 return function;
87}
88
90 if (!m_function || m_function->nFunctions() == 0)
91 return false;
92 return true;
93}
94
95void FunctionModel::addFunction(const QString &prefix, const QString &funStr) {
96 if (!hasFunction()) {
97 setFunctionString(funStr);
98 return;
99 }
100 auto newFun = FunctionFactory::Instance().createInitialized(funStr.toStdString());
101 auto const nf = m_numberDomains > 0 ? static_cast<int>(m_numberDomains) : 1;
102 for (int i = 0; i < nf; ++i) {
103 auto fun = getSingleFunction(i);
104 auto parentFun = getFunctionWithPrefix(prefix, fun);
105 auto cf = std::dynamic_pointer_cast<CompositeFunction>(parentFun);
106 if (cf) {
107 cf->addFunction(newFun->clone());
108 } else if (i == 0 && prefix.isEmpty()) {
109 setFunctionString(getFunctionString() + ";" + funStr);
110 break;
111 } else {
112 throw std::runtime_error("Function at " + prefix.toStdString() + " is not composite.");
113 }
114 }
115 m_function->checkFunction();
117}
118
119void FunctionModel::removeFunction(const QString &functionIndex) {
120 QString prefix;
121 int index;
122 std::tie(prefix, index) = splitFunctionPrefix(functionIndex);
123 if (prefix.isEmpty() && index == -1) {
124 clear();
125 return;
126 }
127 auto const nf = m_numberDomains > 0 ? static_cast<int>(m_numberDomains) : 1;
128 for (int i = 0; i < nf; ++i) {
129 auto fun = getSingleFunction(i);
130 auto parentFun = getFunctionWithPrefix(prefix, fun);
131 auto cf = std::dynamic_pointer_cast<CompositeFunction>(parentFun);
132 if (!cf) {
133 throw std::runtime_error("Function at " + prefix.toStdString() + " is not composite.");
134 }
135 cf->removeFunction(index);
136 if (cf->nFunctions() == 1 && prefix.isEmpty() && cf->name() == "CompositeFunction") {
137 m_function->replaceFunction(i, cf->getFunction(0));
138 m_function->checkFunction();
139 } else {
140 cf->checkFunction();
141 }
142 }
143 m_function->checkFunction();
145}
146
147void FunctionModel::setParameter(const QString &paramName, double value) {
148 if (isGlobal(paramName))
149 setGlobalParameterValue(paramName, value);
150 else
151 setLocalParameterValue(paramName, static_cast<int>(m_currentDomainIndex), value);
152}
153
154void FunctionModel::setAttribute(const QString &attrName, const IFunction::Attribute &value) {
155 auto fun = getCurrentFunction();
156 if (!fun) {
157 throw std::logic_error("Function is undefined.");
158 }
159 if (fun->hasAttribute(attrName.toStdString())) {
160 fun->setAttribute(attrName.toStdString(), value);
161 }
162}
163
164void FunctionModel::setParameterError(const QString &paramName, double value) {
165 auto fun = getCurrentFunction();
166 auto const index = fun->parameterIndex(paramName.toStdString());
167 fun->setError(index, value);
168}
169
170double FunctionModel::getParameter(const QString &paramName) const {
171 return getCurrentFunction()->getParameter(paramName.toStdString());
172}
173
174IFunction::Attribute FunctionModel::getAttribute(const QString &attrName) const {
175 return getCurrentFunction()->getAttribute(attrName.toStdString());
176}
177
178double FunctionModel::getParameterError(const QString &paramName) const {
179 auto fun = getCurrentFunction();
180 auto const index = fun->parameterIndex(paramName.toStdString());
181 return fun->getError(index);
182}
183
184QString FunctionModel::getParameterDescription(const QString &paramName) const {
185 auto fun = getCurrentFunction();
186 auto const index = fun->parameterIndex(paramName.toStdString());
187 return QString::fromStdString(fun->parameterDescription(index));
188}
189
190bool FunctionModel::isParameterFixed(const QString &parName) const {
191 return isLocalParameterFixed(parName, static_cast<int>(m_currentDomainIndex));
192}
193
194QString FunctionModel::getParameterTie(const QString &parName) const {
195 return getLocalParameterTie(parName, static_cast<int>(m_currentDomainIndex));
196}
197
198void FunctionModel::setParameterFixed(const QString &parName, bool fixed) {
199 setLocalParameterFixed(parName, static_cast<int>(m_currentDomainIndex), fixed);
200}
201
202void FunctionModel::setParameterTie(const QString &parName, const QString &tie) {
203 setLocalParameterTie(parName, static_cast<int>(m_currentDomainIndex), tie);
204}
205
207 QStringList names;
208 if (hasFunction()) {
209 const auto paramNames = getCurrentFunction()->getParameterNames();
210 for (auto const &name : paramNames) {
211 names << QString::fromStdString(name);
212 }
213 }
214 return names;
215}
217 QStringList names;
218 if (hasFunction()) {
219 const auto attributeNames = getCurrentFunction()->getAttributeNames();
220 for (auto const &name : attributeNames) {
221 names << QString::fromStdString(name);
222 }
223 }
224 return names;
225}
226
229 if (!hasFunction()) {
230 return IFunction_sptr();
231 }
232 return m_function->getFunction(index);
233}
234
236 return getSingleFunction(static_cast<int>(m_currentDomainIndex));
237}
238
240 if (nDomains < 0) {
241 throw std::runtime_error("Number of domains shouldn't be less than 0.");
242 }
243 auto const nd = static_cast<size_t>(nDomains);
244 if (nd == m_numberDomains) {
245 return;
246 }
247 if (!hasFunction()) {
248 m_numberDomains = nd;
249 } else {
250 auto const nfOld = m_numberDomains > 0 ? m_numberDomains : 1;
251 auto const lastIndex = nfOld - 1;
252 auto const nf = nd > 0 ? nd : 1;
253 if (nd > m_numberDomains) {
254 auto fun = m_function->getFunction(lastIndex);
255 for (size_t i = nfOld; i < nf; ++i) {
256 m_function->addFunction(fun->clone());
257 m_function->setDomainIndex(i, i);
258 }
259 } else {
260 for (size_t i = lastIndex; i >= nf; --i) {
261 m_function->removeFunction(i);
262 }
263 m_function->checkFunction();
264 m_function->clearDomainIndices();
265 for (size_t i = 0; i < m_function->nFunctions(); ++i) {
266 m_function->setDomainIndex(i, i);
267 }
268 }
269 m_numberDomains = nDomains;
270 }
273 }
274}
275
279void FunctionModel::setDatasets(const QStringList &datasetNames) {
281 for (const auto &datasetName : datasetNames)
282 datasets.append(FunctionModelDataset(datasetName, FunctionModelSpectra("0")));
283
284 setDatasets(datasets);
285}
286
292 checkNumberOfDomains(datasets);
293 m_datasets = datasets;
294}
295
299void FunctionModel::addDatasets(const QStringList &datasetNames) {
300 for (const auto &datasetName : datasetNames)
301 m_datasets.append(FunctionModelDataset(datasetName, FunctionModelSpectra("0")));
302
304}
305
310
311 // Sort in reverse order
312 using std::sort;
313 sort(indices.begin(), indices.end(), [](int a, int b) { return a > b; });
314 for (auto i = indices.constBegin(); i != indices.constEnd(); ++i)
315 m_datasets.erase(m_datasets.begin() + *i);
316
317 const auto nDomains = numberOfDomains(m_datasets);
318 setNumberDomains(nDomains);
319
320 auto currentIndex = currentDomainIndex();
321 if (currentIndex >= nDomains)
322 currentIndex = m_datasets.isEmpty() ? 0 : nDomains - 1;
323
324 setCurrentDomainIndex(currentIndex);
325}
326
331 QStringList datasetNames;
332 for (const auto &dataset : m_datasets)
333 for (auto i = 0u; i < dataset.numberOfSpectra(); ++i) {
334 UNUSED_ARG(i);
335 datasetNames << dataset.datasetName();
336 }
337 return datasetNames;
338}
339
344 QStringList domainNames;
345 for (const auto &dataset : m_datasets)
346 domainNames << dataset.domainNames();
347 return domainNames;
348}
349
350int FunctionModel::getNumberDomains() const { return static_cast<int>(m_numberDomains); }
351
352int FunctionModel::currentDomainIndex() const { return static_cast<int>(m_currentDomainIndex); }
353
356 m_currentDomainIndex = static_cast<size_t>(index);
357}
358
359double FunctionModel::getLocalParameterValue(const QString &parName, int i) const {
360 return getSingleFunction(i)->getParameter(parName.toStdString());
361}
362
363bool FunctionModel::isLocalParameterFixed(const QString &parName, int i) const {
364 auto fun = getSingleFunction(i);
365 auto const parIndex = fun->parameterIndex(parName.toStdString());
366 return fun->isFixed(parIndex);
367}
368
369QString FunctionModel::getLocalParameterTie(const QString &parName, int i) const {
370 auto fun = getSingleFunction(i);
371 auto const parIndex = fun->parameterIndex(parName.toStdString());
372 auto const tie = fun->getTie(parIndex);
373 if (!tie)
374 return "";
375 auto const tieStr = QString::fromStdString(tie->asString());
376 auto const j = tieStr.indexOf('=');
377 return tieStr.mid(j + 1);
378}
379
380QString FunctionModel::getLocalParameterConstraint(const QString &parName, int i) const {
381 auto fun = getSingleFunction(i);
382 auto const parIndex = fun->parameterIndex(parName.toStdString());
383 auto const constraint = fun->getConstraint(parIndex);
384 auto const out = (!constraint) ? "" : QString::fromStdString(constraint->asString());
385 return out;
386}
387
388void FunctionModel::setLocalParameterValue(const QString &parName, int i, double value) {
389 auto function = getSingleFunction(i);
390 if (function && function->hasParameter(parName.toStdString()))
391 function->setParameter(parName.toStdString(), value);
392}
393
394void FunctionModel::setLocalParameterValue(const QString &parName, int i, double value, double error) {
395 auto fun = getSingleFunction(i);
396 auto const parIndex = fun->parameterIndex(parName.toStdString());
397 fun->setParameter(parIndex, value);
398 fun->setError(parIndex, error);
399}
400
401void FunctionModel::setLocalParameterFixed(const QString &parName, int i, bool fixed) {
402 auto fun = getSingleFunction(i);
403 auto const parIndex = fun->parameterIndex(parName.toStdString());
404 if (fixed) {
405 fun->fix(parIndex);
406 } else if (fun->isFixed(parIndex)) {
407 fun->unfix(parIndex);
408 }
409}
410
411void FunctionModel::setLocalParameterTie(const QString &parName, int i, const QString &tie) {
412 auto logError = [&parName](const std::string &msg) {
413 g_log.error() << "Tie " << parName.toStdString() << ": " << msg << '\n';
414 };
415 auto fun = getSingleFunction(i);
416 auto const name = parName.toStdString();
417 if (tie.isEmpty()) {
418 fun->removeTie(fun->parameterIndex(name));
419 } else {
420 auto const j = tie.indexOf('=');
421 try {
422 fun->tie(name, tie.mid(j + 1).toStdString());
423 } catch (const std::invalid_argument &e) {
424 logError(e.what());
425 } catch (const std::runtime_error &e) {
426 logError(e.what());
427 }
428 }
429}
430
431void FunctionModel::setLocalParameterConstraint(const QString &parName, int i, const QString &constraint) {
432 auto const parts = splitConstraintString(constraint);
433 if (constraint != "" && parts.second.first == "" && parts.second.second == "") {
434 g_log.error("Constraint " + parName.toStdString() + ": " + constraint.toStdString() + " is not a valid constraint");
435 return;
436 }
437 QString prefix, name;
438 std::tie(prefix, name) = splitParameterName(parName);
439 auto fun = getFunctionWithPrefix(prefix, getSingleFunction(i));
440 if (constraint.isEmpty()) {
441 fun->removeConstraint(name.toStdString());
442 } else {
443 auto newConstraint(constraint);
444 newConstraint.replace(parts.first, name);
445 fun->addConstraints(newConstraint.toStdString());
446 }
447}
448
449void FunctionModel::setGlobalParameterValue(const QString &paramName, double value) {
450 if (isGlobal(paramName))
451 for (auto i = 0; i < getNumberDomains(); ++i)
452 setLocalParameterValue(paramName, i, value);
453}
454
455void FunctionModel::changeTie(const QString &parName, const QString &tie) {
456 try {
457 setLocalParameterTie(parName, static_cast<int>(m_currentDomainIndex), tie);
458 } catch (std::exception &) {
459 // the tie is probably being edited
460 }
461}
462
463void FunctionModel::addConstraint(const QString &functionIndex, const QString &constraint) {
464 auto fun = getFunctionWithPrefix(functionIndex, getCurrentFunction());
465 fun->addConstraints(constraint.toStdString());
466}
467
468void FunctionModel::removeConstraint(const QString &paramName) {
469 getCurrentFunction()->removeConstraint(paramName.toStdString());
470}
471
473
474void FunctionModel::setGlobalParameters(const QStringList &globals) { m_globalParameterNames = globals; }
475
477 QStringList locals;
478 for (auto const &name : getParameterNames()) {
479 if (!m_globalParameterNames.contains(name))
480 locals << name;
481 }
482 return locals;
483}
484
487 if (numberOfDomains(m_datasets) != static_cast<int>(m_numberDomains)) {
488 m_datasets.clear();
489 for (auto i = 0u; i < m_numberDomains; ++i)
490 m_datasets.append(FunctionModelDataset(QString::number(i), FunctionModelSpectra("0")));
491 }
492}
493
496 if (numberOfDomains(datasets) != static_cast<int>(m_numberDomains)) {
497 throw std::runtime_error("Number of dataset domains doesn't match the number of domains.");
498 }
499}
500
502 return std::accumulate(datasets.cbegin(), datasets.cend(), 0, [](int lhs, const auto &dataset) {
503 return lhs + static_cast<int>(dataset.numberOfSpectra());
504 });
505}
506
509 if (index == 0)
510 return;
511 if (index < 0 || index >= getNumberDomains()) {
512 throw std::runtime_error("Domain index is out of range: " + std::to_string(index) + " out of " +
514 }
515}
516
518 if (!hasFunction())
519 return;
522}
523
525 if (!hasFunction())
526 return;
527 if (m_function->nAttributes() != fun.nAttributes())
528 return;
529 for (const auto &name : fun.getAttributeNames()) {
530 m_function->setAttribute(name, fun.getAttribute(name));
531 }
532}
533
535 if (!hasFunction())
536 return;
537 auto currentFun = getCurrentFunction();
538 copyParametersAndErrors(fun, *currentFun);
539}
540
542 auto const fun = getCurrentFunction();
543 for (auto it = m_globalParameterNames.begin(); it != m_globalParameterNames.end();) {
544 if (!fun->hasParameter(it->toStdString())) {
545 it = m_globalParameterNames.erase(it);
546 } else {
547 ++it;
548 }
549 }
550}
551
553 auto n = fun->getNumberDomains();
554 if (n > 1) {
555 for (size_t index = 0; index < n; index++) {
556 setResolutionFromWorkspace(fun->getFunction(index));
557 }
558 } else {
559 if (fun->hasAttribute("f0.Workspace")) {
560 std::string wsName = fun->getAttribute("f0.Workspace").asString();
561 if (AnalysisDataService::Instance().doesExist(wsName)) {
562 const auto ws = AnalysisDataService::Instance().retrieveWS<MatrixWorkspace>(wsName);
564 }
565 }
566 }
567}
568
570 auto inst = workspace->getInstrument();
571 auto analyser = inst->getStringParameter("analyser");
572 if (!analyser.empty()) {
573 auto comp = inst->getComponentByName(analyser[0]);
574 if (comp && comp->hasParameter("resolution")) {
575 auto params = comp->getNumberParameter("resolution", true);
576 for (auto param : fun->getParameterNames()) {
577 if (param.find("FWHM") != std::string::npos) {
578 fun->setParameter(param, params[0]);
579 }
580 }
581 }
582 }
583}
584
585bool FunctionModel::isGlobal(const QString &parName) const { return m_globalParameterNames.contains(parName); }
586
588 std::string foundName;
589 auto const fun = getCurrentFunction();
590 auto getA0 = [](IFunction const &f) -> std::string {
591 return (dynamic_cast<IBackgroundFunction const *>(&f) && f.hasParameter("A0")) ? "A0" : "";
592 };
593 auto const cf = std::dynamic_pointer_cast<CompositeFunction>(fun);
594 if (cf) {
595 if (fun->name() != "CompositeFunction")
596 return QString();
597 for (size_t i = 0; i < cf->nFunctions(); ++i) {
598 foundName = getA0(*cf->getFunction(i));
599 if (!foundName.empty()) {
600 foundName.insert(0, "f" + std::to_string(i) + ".");
601 break;
602 }
603 }
604 } else {
605 foundName = getA0(*fun);
606 }
607 if (!foundName.empty()) {
608 fun->setParameter(foundName, value);
609 }
610 return QString::fromStdString(foundName);
611}
612
613} // namespace MantidQt::MantidWidgets
double value
The value of the point.
Definition: FitMW.cpp:51
double error
Definition: IndexPeaks.cpp:133
IPeaksWorkspace_sptr workspace
Definition: IndexPeaks.cpp:114
std::map< DeltaEMode::Type, std::string > index
Definition: DeltaEMode.cpp:19
#define UNUSED_ARG(x)
Function arguments are sometimes unused in certain implmentations but are required for documentation ...
Definition: System.h:64
void addConstraint(const QString &functionIndex, const QString &constraint) override
QString getParameterTie(const QString &parName) const
QStringList getLocalParameters() const override
IFunction_sptr getCurrentFunction() const override
void setGlobalParameterValue(const QString &paramName, double value) override
IFunction_sptr getSingleFunction(int index) const override
void setResolutionFromWorkspace(const IFunction_sptr &fun)
double getLocalParameterValue(const QString &parName, int i) const override
IFunction::Attribute getAttribute(const QString &attrName) const
void setLocalParameterValue(const QString &parName, int i, double value) override
void setDatasets(const QStringList &datasetNames)
Sets the datasets based on their workspace names.
int numberOfDomains(const QList< FunctionModelDataset > &datasets) const
void removeDatasets(QList< int > &indices)
Removes datasets (i.e.
void setGlobalParameters(const QStringList &globals) override
bool isGlobal(const QString &parName) const override
double getParameter(const QString &paramName) const override
void setParameterFixed(const QString &parName, bool fixed)
void checkNumberOfDomains(const QList< FunctionModelDataset > &datasets) const
Check that the datasets supplied have the expected total number of domains.
void checkDatasets()
Check that the number of domains is correct for m_datasets.
void setLocalParameterConstraint(const QString &parName, int i, const QString &constraint) override
void updateParameters(const IFunction &fun) override
MultiDomainFunction_sptr m_function
Definition: FunctionModel.h:79
QStringList getGlobalParameters() const override
void setParameter(const QString &paramName, double value) override
void removeFunction(const QString &functionIndex) override
void setLocalParameterFixed(const QString &parName, int i, bool fixed) override
bool isParameterFixed(const QString &parName) const
IFunction_sptr getFitFunction() const override
IFunction_sptr getFitFunctionWithGlobals(std::size_t const &index) const
bool isLocalParameterFixed(const QString &parName, int i) const override
QString getParameterDescription(const QString &paramName) const override
double getParameterError(const QString &paramName) const override
void updateMultiDatasetAttributes(const IFunction &fun)
void addFunction(const QString &prefix, const QString &funStr) override
void setAttribute(const QString &attrName, const IFunction::Attribute &val)
void removeConstraint(const QString &paramName) override
QList< FunctionModelDataset > m_datasets
Definition: FunctionModel.h:94
void setParameterTie(const QString &parName, const QString &tie)
void addDatasets(const QStringList &datasetNames)
Adds datasets based on their workspace names.
void setFunction(IFunction_sptr) override
void setLocalParameterTie(const QString &parName, int i, const QString &tie) override
void checkIndex(int) const
Check a domain/function index to be in range.
void changeTie(const QString &parName, const QString &tie) override
QStringList getDatasetDomainNames() const override
Returns names for the domains of each dataset.
QStringList getDatasetNames() const override
Returns the workspace names of the datasets.
QStringList getParameterNames() const override
QString getLocalParameterTie(const QString &parName, int i) const override
QString getLocalParameterConstraint(const QString &parName, int i) const override
void updateMultiDatasetParameters(const IFunction &fun) override
void setParameterError(const QString &paramName, double value) override
QString setBackgroundA0(double value) override
static void copyParametersAndErrors(const IFunction &funFrom, IFunction &funTo)
void setFunctionString(const QString &funStr)
An interface to a background function.
Attribute is a non-fitting parameter.
Definition: IFunction.h:282
This is an interface to a fitting function - a semi-abstarct class.
Definition: IFunction.h:163
virtual Attribute getAttribute(const std::string &name) const
Return a value of attribute attName.
Definition: IFunction.cpp:1394
virtual std::vector< std::string > getAttributeNames() const
Returns a list of attribute names.
Definition: IFunction.cpp:1368
virtual size_t nAttributes() const
Returns the number of attributes associated with the function.
Definition: IFunction.cpp:1336
Base MatrixWorkspace Abstract Class.
A composite function defined on a CompositeDomain.
bool hasParameter(const std::string &name) const override
Check if function has a parameter with this name.
The Logger class is in charge of the publishing messages from the framework through various channels.
Definition: Logger.h:52
void error(const std::string &msg)
Logs at error level.
Definition: Logger.cpp:77
static T & Instance()
Return a reference to the Singleton instance, creating it if it does not already exist Creation is do...
EXPORT_OPT_MANTIDQT_COMMON IFunction_sptr getFunctionWithPrefix(const QString &prefix, const IFunction_sptr &fun)
Get a child function of a parent function whose parameters start with a given prefix.
EXPORT_OPT_MANTIDQT_COMMON std::pair< QString, std::pair< QString, QString > > splitConstraintString(const std::string &constraint)
Split a constraint definition into a parameter name and a pair of bounds, for example -1 < f0....
EXPORT_OPT_MANTIDQT_COMMON std::pair< QString, int > splitFunctionPrefix(const std::string &prefix)
Split a function (eg f0.f3.f1.) into the parent prefix (f0.f3.) and the index of the child function (...
EXPORT_OPT_MANTIDQT_COMMON std::pair< QString, QString > splitParameterName(const QString &paramName)
Split a qualified parameter name into function index and local parameter name.
std::shared_ptr< MultiDomainFunction > MultiDomainFunction_sptr
Shared pointer to Mantid::API::MultiDomainFunction.
Definition: IFunction_fwd.h:35
Kernel::Logger g_log("ExperimentInfo")
static logger object
std::shared_ptr< IFunction > IFunction_sptr
shared pointer to the function base class
Definition: IFunction.h:732
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
std::string to_string(const wide_integer< Bits, Signed > &n)