Public Member Functions | |
std::string | name () const |
uint64_t | size () const |
Selection | selectAll () const |
const std::set< std::string > & | attributeNames () const |
const std::set< std::string > & | enumerationNames () const |
template<typename T > | |
std::vector< T > | getAttribute (const std::string &name, const Selection &selection) const |
template<typename T > | |
std::vector< T > | getAttribute (const std::string &name, const Selection &selection, const T &defaultValue) const |
template<typename T > | |
std::vector< T > | getEnumeration (const std::string &name, const Selection &selection) const |
std::vector< std::string > | enumerationValues (const std::string &name) const |
std::string | _attributeDataType (const std::string &name, bool translate_enumeration=false) const |
const std::set< std::string > & | dynamicsAttributeNames () const |
template<typename T > | |
std::vector< T > | getDynamicsAttribute (const std::string &name, const Selection &selection) const |
template<typename T > | |
std::vector< T > | getDynamicsAttribute (const std::string &name, const Selection &selection, const T &defaultValue) const |
std::string | _dynamicsAttributeDataType (const std::string &name) const |
template<typename T > | |
Selection | filterAttribute (const std::string &name, std::function< bool(const T)> pred) const |
Protected Member Functions | |
Population (const std::string &h5FilePath, const std::string &csvFilePath, const std::string &name, const std::string &prefix, const Hdf5Reader &hdf5_reader) | |
Population (const Population &)=delete | |
Population (Population &&) noexcept | |
Protected Attributes | |
std::unique_ptr< Impl > | impl_ |
std::string bbp::sonata::Population::_attributeDataType | ( | const std::string & | name, |
bool | translate_enumeration = false |
||
) | const |
Get attribute data type, optionally translating enumeration types
std::string bbp::sonata::Population::_dynamicsAttributeDataType | ( | const std::string & | name | ) | const |
Get dynamics attribute data type
const std::set<std::string>& bbp::sonata::Population::attributeNames | ( | ) | const |
All attribute names (CSV columns + required attributes + union of attributes in groups)
const std::set<std::string>& bbp::sonata::Population::dynamicsAttributeNames | ( | ) | const |
All dynamics attribute names (JSON keys + union of attributes in groups)
const std::set<std::string>& bbp::sonata::Population::enumerationNames | ( | ) | const |
All attribute names that are explicit enumerations
std::vector<std::string> bbp::sonata::Population::enumerationValues | ( | const std::string & | name | ) | const |
Get all allowed attribute enumeration values
name | is a string to allow attributes not defined in spec |
if | there is no such attribute for the population |
std::vector<T> bbp::sonata::Population::getAttribute | ( | const std::string & | name, |
const Selection & | selection | ||
) | const |
Get attribute values for given {element} Selection
If string values are requested and the attribute is a explicit enumeration, values will be resolved to strings.
name | is a string to allow attributes not defined in spec |
selection | is a selection to retrieve the attribute values from |
if | there is no such attribute for the population |
if | the attribute is not defined for any element from the selection |
std::vector<T> bbp::sonata::Population::getAttribute | ( | const std::string & | name, |
const Selection & | selection, | ||
const T & | defaultValue | ||
) | const |
Get attribute values for given {element} Selection
If string values are requested and the attribute is a explicit enumeration, values will be resolved to strings.
name | is a string to allow attributes not defined in spec |
selection | is a selection to retrieve the attribute values from |
default | is a value to use for {element}s without the given attribute |
if | there is no such attribute for the population |
std::vector<T> bbp::sonata::Population::getDynamicsAttribute | ( | const std::string & | name, |
const Selection & | selection | ||
) | const |
Get dynamics attribute values for given {element} Selection
name | is a string to allow attributes not defined in spec |
selection | is a selection to retrieve the dynamics attribute values from |
if | there is no such attribute for the population |
if | the attribute is not defined for any edge from the edge selection |
std::vector<T> bbp::sonata::Population::getDynamicsAttribute | ( | const std::string & | name, |
const Selection & | selection, | ||
const T & | defaultValue | ||
) | const |
Get dynamics attribute values for given {element} Selection
name | is a string to allow attributes not defined in spec |
selection | is a selection to retrieve the dynamics attribute values from |
default | is a value to use for {element}s without the given attribute |
if | there is no such attribute for the population |
std::vector<T> bbp::sonata::Population::getEnumeration | ( | const std::string & | name, |
const Selection & | selection | ||
) | const |
Get enumeration values for given attribute and {element} Selection
name | is a string to allow enumeration attributes not defined in spec |
selection | is a selection to retrieve the enumeration values from |
if | there is no such attribute for the population |
if | the attribute is not defined for any element from the selection |
std::string bbp::sonata::Population::name | ( | ) | const |
Name of the population used for identifying it in circuit composition
uint64_t bbp::sonata::Population::size | ( | ) | const |
Total number of elements