Class Population¶
Defined in File population.h
Inheritance Relationships¶
Derived Types¶
public bbp::sonata::EdgePopulation
(Class EdgePopulation)public bbp::sonata::NodePopulation
(Class NodePopulation)
Class Documentation¶
-
class
bbp::sonata
::
Population
¶ Subclassed by bbp::sonata::EdgePopulation, bbp::sonata::NodePopulation
Public Functions
-
std::string
name
() const¶ Name of the population used for identifying it in circuit composition
-
uint64_t
size
() const¶ Total number of elements
-
const std::set<std::string> &
attributeNames
() const¶ All attribute names (CSV columns + required attributes + union of attributes in groups)
-
const std::set<std::string> &
enumerationNames
() const¶ All attribute names that are explicit enumerations
-
template<typename
T
>
std::vector<T>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.
- Parameters
name
: is a string to allow attributes not defined in specselection
: is a selection to retrieve the attribute values from
- Exceptions
if
: there is no such attribute for the populationif
: the attribute is not defined for any element from the selection
-
template<typename
T
>
std::vector<T>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.
- Parameters
name
: is a string to allow attributes not defined in specselection
: is a selection to retrieve the attribute values fromdefault
: is a value to use for {element}s without the given attribute
- Exceptions
if
: there is no such attribute for the population
-
template<typename
T
>
std::vector<T>getEnumeration
(const std::string &name, const Selection &selection) const¶ Get enumeration values for given attribute and {element} Selection
- Parameters
name
: is a string to allow enumeration attributes not defined in specselection
: is a selection to retrieve the enumeration values from
- Exceptions
if
: there is no such attribute for the populationif
: the attribute is not defined for any element from the selection
-
std::vector<std::string>
enumerationValues
(const std::string &name) const¶ Get all allowed attribute enumeration values
- Parameters
name
: is a string to allow attributes not defined in spec
- Exceptions
if
: there is no such attribute for the population
-
std::string
_attributeDataType
(const std::string &name, bool translate_enumeration = false) const¶ Get attribute data type, optionally translating enumeration types
-
const std::set<std::string> &
dynamicsAttributeNames
() const¶ All dynamics attribute names (JSON keys + union of attributes in groups)
-
template<typename
T
>
std::vector<T>getDynamicsAttribute
(const std::string &name, const Selection &selection) const¶ Get dynamics attribute values for given {element} Selection
- Parameters
name
: is a string to allow attributes not defined in specselection
: is a selection to retrieve the dynamics attribute values from
- Exceptions
if
: there is no such attribute for the populationif
: the attribute is not defined for any edge from the edge selection
-
template<typename
T
>
std::vector<T>getDynamicsAttribute
(const std::string &name, const Selection &selection, const T &defaultValue) const¶ Get dynamics attribute values for given {element} Selection
- Parameters
name
: is a string to allow attributes not defined in specselection
: is a selection to retrieve the dynamics attribute values fromdefault
: is a value to use for {element}s without the given attribute
- Exceptions
if
: there is no such attribute for the population
-
std::string
_dynamicsAttributeDataType
(const std::string &name) const¶ Get dynamics attribute data type
Protected Functions
-
Population
(const std::string &h5FilePath, const std::string &csvFilePath, const std::string &name, const std::string &prefix)¶
-
Population
(const Population&) = delete¶
-
Population
(Population&&) noexcept¶
-
~Population
() noexcept¶
Protected Attributes
-
std::unique_ptr<Impl>
impl_
¶
-
std::string