30 static const std::string
Name;
31 static const std::string
Desc;
44 std::unique_ptr<ConstantReference>
clone()
const {
45 return notstd::make_unique<ConstantReference>(*this->
_clone());
108 std::unique_ptr<HyperPlaneReferenceBase>
clone()
const {
109 return notstd::make_unique<HyperPlaneReferenceBase>(*this->
_clone());
119 const std::map<std::string, Eigen::VectorXd> &
supercell()
const {
126 const std::map<std::string, Eigen::VectorXd> &
config()
const {
231 std::unique_ptr<HyperPlaneReference>
clone()
const {
232 return notstd::make_unique<HyperPlaneReference>(*this->
_clone());
257 std::map<std::string, Eigen::VectorXd> &
config() {
Maps all Configurations to the same value.
static const std::string Desc
std::unique_ptr< ConstantReference > clone() const
double evaluate(const Configuration &config) const override
Returns the same constant value for all Configuration.
ConstantReference(double _value=0.0)
double value() const
Return the constant value used for all Configuration.
virtual ConstantReference * _clone() const override
Clone.
static const std::string Name
Maps a Configuration to a scalar value via a hyperplane.
Eigen::VectorXd input(const Configuration &config) const
Return the 'input' coordinates that a Configuration is mapped to.
virtual HyperPlaneReferenceBase * _clone() const override
Clone.
std::map< std::string, Eigen::VectorXd > & supercell()
Access a map of scelname to reference for Supercell specialized references.
std::map< std::string, Eigen::VectorXd > & config()
Access a map of configname to reference for Configuration specialized references.
Eigen::VectorXd m_global_ref
std::map< std::string, Eigen::VectorXd > SpecializedRef
HyperPlaneReferenceBase(std::string _name, std::string _desc, const Eigen::VectorXd &_global_ref, InputFunction _input, SpecializedRef _supercell_ref=SpecializedRef(), SpecializedRef _config_ref=SpecializedRef())
Constructor.
std::unique_ptr< HyperPlaneReferenceBase > clone() const
Clone.
Eigen::VectorXd hyperplane(const Configuration &config) const
Return the reference hyperplane used for a particular configuration.
std::map< std::string, Eigen::VectorXd > m_config_ref
double evaluate(const Configuration &config) const override
Return the reference for a particular configuration.
const std::map< std::string, Eigen::VectorXd > & supercell() const
const Access a map of scelname to reference for Supercell specialized references
std::function< Eigen::VectorXd(const Configuration &)> InputFunction
virtual ~HyperPlaneReferenceBase()
std::map< std::string, Eigen::VectorXd > m_supercell_ref
Eigen::VectorXd & global()
Access the global reference.
const Eigen::VectorXd & global() const
const Access the global reference
const std::map< std::string, Eigen::VectorXd > & config() const
const Access a map of configname to reference for Configuration specialized references
std::function< Eigen::VectorXd(const Configuration &)> input() const
Return the 'input' function that maps a Configuration to coordinates.
Maps a Configuration to a scalar value via a hyperplane.
std::map< std::string, Eigen::VectorXd > & config()
Access a map of configname to reference for Configuration specialized references.
Eigen::VectorXd & global()
Access the global reference.
static const std::string Name
HyperPlaneReference * _clone() const override
Clone.
std::map< std::string, Eigen::VectorXd > & supercell()
Access a map of scelname to reference for Supercell specialized references.
static const std::string Desc
HyperPlaneReference(const Eigen::VectorXd &_global_ref, InputFunction _input, SpecializedRef _supercell_ref=SpecializedRef(), SpecializedRef _config_ref=SpecializedRef())
Constructor.
std::unique_ptr< HyperPlaneReference > clone() const
Clone.
ConfigIO::GenericConfigFormatter< jsonParser > config()
ScalarAttribute< Configuration > Reference