30 return sf.real() * sf.real() + sf.imag() * sf.imag();
44 std::vector<StructureFactor> structureFactors(hkls.size());
45 using namespace std::placeholders;
46 std::transform(hkls.begin(), hkls.end(), structureFactors.begin(),
49 return structureFactors;
63 std::vector<double> fSquareds(hkls.size());
64 using namespace std::placeholders;
65 std::transform(hkls.begin(), hkls.end(), fSquareds.begin(),
#define UNUSED_ARG(x)
Function arguments are sometimes unused in certain implmentations but are required for documentation ...
Three components are required to describe a crystal structure:
virtual std::vector< StructureFactor > getFs(const std::vector< Kernel::V3D > &hkls) const
Returns structure factors for each HKL in the container.
virtual double getFSquared(const Kernel::V3D &hkl) const
Returns F^2 for the given HKL, calling StructureFactorCalculator::getF().
void setCrystalStructure(const CrystalStructure &crystalStructure)
Sets the crystal structure for which to calculate structure factors.
virtual StructureFactor getF(const Kernel::V3D &hkl) const =0
In implementations this method should return the structure factor for the specified HKL.
virtual void crystalStructureSetHook(const CrystalStructure &crystalStructure)
This function is called from StructureFactorCalculator::setCrystalStructure() and can be overriden to...
virtual std::vector< double > getFsSquared(const std::vector< Kernel::V3D > &hkls) const
Returns structure factors for each HKL in the container.
std::complex< double > StructureFactor