Public Member Functions | Static Public Attributes
bbp::sonata::NodePopulation Class Reference
Inheritance diagram for bbp::sonata::NodePopulation:
bbp::sonata::Population

Public Member Functions

 NodePopulation (const std::string &h5FilePath, const std::string &csvFilePath, const std::string &name)
 
 NodePopulation (const std::string &h5FilePath, const std::string &csvFilePath, const std::string &name, const Hdf5Reader &hdf5_reader)
 
template<typename T >
Selection matchAttributeValues (const std::string &attribute, const T values) const
 
template<typename T >
Selection matchAttributeValues (const std::string &attribute, const std::vector< T > &values) const
 
Selection regexMatch (const std::string &attribute, const std::string &re) const
 
- Public Member Functions inherited from bbp::sonata::Population
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
 

Static Public Attributes

constexpr static const char * ELEMENT = "node"
 

Additional Inherited Members

- Protected Member Functions inherited from bbp::sonata::Population
 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 inherited from bbp::sonata::Population
std::unique_ptr< Impl > impl_
 

Member Function Documentation

◆ matchAttributeValues() [1/2]

template<typename T >
Selection bbp::sonata::NodePopulation::matchAttributeValues ( const std::string &  attribute,
const std::vector< T > &  values 
) const

Like matchAttributeValues, but for vectors of values to match

◆ matchAttributeValues() [2/2]

template<typename T >
Selection bbp::sonata::NodePopulation::matchAttributeValues ( const std::string &  attribute,
const T  values 
) const

Return selection of where attribute values match value

As per node_set predicates, value must be one of type:

number H5T_IEEE_*LE, H5T_STD_*LE string H5T_C_S1 bool H5T_STD_I8LE null invalid

Exceptions
ifthe attribute dtype is not comparable

Note: This does not match dynamics_params datasets

◆ regexMatch()

Selection bbp::sonata::NodePopulation::regexMatch ( const std::string &  attribute,
const std::string &  re 
) const

For named attribute, return a selection where the passed regular expression matches