14using namespace Geometry;
27 for (
size_t i = 0; i < values.
size(); ++i) {
70 throw std::invalid_argument(
"LatticeFunction can only decorate a PawleyParameterFunction.");
#define DECLARE_FUNCTION(classname)
Macro for declaring a new type of function to be used with the FunctionFactory.
void setDecoratedFunction(const std::string &wrappedFunctionName)
void throwIfNoFunctionSet() const
Throws std::runtime_error when m_wrappedFunction is not set.
A class to store values calculated by a function.
size_t size() const
Return the number of values.
void setCalculated(double value)
set all calculated values to same number
void setLatticeSystem(const std::string &crystalSystem) override
Assigns the crystal system to the internally stored function.
Geometry::UnitCell getUnitCell() const override
Returns a UnitCell object constructed from the function parameters.
void beforeDecoratedFunctionSet(const API::IFunction_sptr &fn) override
Checks that the decorated function is a PawleyParameterFunction.
Functions::PawleyParameterFunction_sptr m_cellParameters
void functionLattice(const API::LatticeDomain &latticeDomain, API::FunctionValues &values) const override
Calculates d-values using the internally stored cell parameters.
void setUnitCell(const std::string &unitCellString) override
Sets the unit cell parameters from a string that can be parsed by Geometry::strToUnitCell.
void init() override
Sets the decorated function to expose parameters.
Class to implement unit cell of crystals.
double d(double h, double k, double l) const
Return d-spacing ( ) for a given h,k,l coordinate.
std::shared_ptr< IFunction > IFunction_sptr
shared pointer to the function base class
std::shared_ptr< PawleyParameterFunction > PawleyParameterFunction_sptr
MANTID_GEOMETRY_DLL UnitCell strToUnitCell(const std::string &unitCellString)