8 #ifndef READUCT_ELEMENTARYSTEPOPTIMIZATION_PROFILEENERGIES_H
9 #define READUCT_ELEMENTARYSTEPOPTIMIZATION_PROFILEENERGIES_H
20 namespace ElementaryStepOptimization {
28 using Array = std::vector<double>;
33 void setValues(Array x, Array y);
35 const Array& getCoordinates()
const;
36 const Array& getEnergies()
const;
37 std::pair<double, double> getPair(
int index)
const;
47 inline ProfileEnergies::ProfileEnergies(ProfileEnergies::Array x, ProfileEnergies::Array y) {
48 setValues(std::move(x), std::move(y));
51 inline void ProfileEnergies::setValues(ProfileEnergies::Array x, ProfileEnergies::Array y) {
52 assert(x.size() == y.size());
57 inline int ProfileEnergies::size()
const {
58 return static_cast<int>(x_.size());
61 inline bool ProfileEnergies::empty()
const {
65 inline const ProfileEnergies::Array& ProfileEnergies::getCoordinates()
const {
69 inline const ProfileEnergies::Array& ProfileEnergies::getEnergies()
const {
73 inline std::pair<double, double> ProfileEnergies::getPair(
int index)
const {
74 assert(0 <= index && index < size());
75 return std::make_pair(x_[index], y_[index]);
83 #endif // ELEMENTARYSTEPOPTIMIZATION_PROFILEENERGIES_H
Definition: ProfileEnergies.h:26