15 #ifndef QMCPLUSPLUS_SPECIES_SET_H 16 #define QMCPLUSPLUS_SPECIES_SET_H 130 inline int findIndex(
const std::string& name,
const std::vector<std::string>& alist)
const 133 while (i < alist.size())
135 if (alist[i] == name)
int numAttributes() const
return the number of attributes in our list
int findIndex(const std::string &name, const std::vector< std::string > &alist) const
std::vector< std::string > attribName
attribute name list
int addSpecies(const std::string &aname)
When a name species does not exist, add a new species.
helper functions for EinsplineSetBuilder
bool hasAttribute(const std::string &aname) const
Check for attribute presence This replaces code that gets numAttributes then tries to addAttribute fo...
double & operator()(int i, int j)
assignment operator
int addAttribute(const std::string &aname)
for a new attribute, allocate the data, !More often used to get the index of a species ...
int size() const
return the number of species
int getTotalNum() const
return the number of species
AttribList_t d_attrib
List of species attributes.
const std::string & getSpeciesName(int index) const
void setTotalNum(const unsigned n)
set the number of species
std::vector< std::string > speciesName
Species name list.
int getAttribute(const std::string &aname) const
When a name species does not exist, return attribute.size()
double operator()(int i, int j) const
Custom container for set of attributes for a set of species.
std::vector< SpeciesAttrib_t > AttribList_t
int findSpecies(const std::string &name) const
if the input species is not found, add a new species
int findAttribute(const std::string &name) const
almost all code ignores this and just uses addAttribute for the same purpose.
std::vector< Scalar_t > SpeciesAttrib_t
unsigned TotalNum
The number of species.