Public Member Functions | Static Public Member Functions
bbp::sonata::NodeSets Class Reference

Public Member Functions

 NodeSets (const std::string &content)
 
 NodeSets (std::unique_ptr< detail::NodeSets > &&impl)
 
 NodeSets (NodeSets &&) noexcept
 
 NodeSets (const NodeSets &other)=delete
 
NodeSetsoperator= (NodeSets &&) noexcept
 
Selection materialize (const std::string &name, const NodePopulation &population) const
 
std::set< std::string > names () const
 
std::set< std::string > update (const NodeSets &other) const
 
std::string toJSON () const
 

Static Public Member Functions

static NodeSets fromFile (const std::string &path)
 

Constructor & Destructor Documentation

◆ NodeSets()

bbp::sonata::NodeSets::NodeSets ( const std::string &  content)
explicit

Create nodeset from JSON

See also: https://github.com/AllenInstitute/sonata/blob/master/docs/SONATA_DEVELOPER_GUIDE.md#node-sets-file

Note: floating point values aren't supported for comparison

Parameters
contentis the JSON node_sets value
Exceptions
ifcontent cannot be parsed

Member Function Documentation

◆ fromFile()

static NodeSets bbp::sonata::NodeSets::fromFile ( const std::string &  path)
static

Open a SONATA node sets file from a path

◆ materialize()

Selection bbp::sonata::NodeSets::materialize ( const std::string &  name,
const NodePopulation population 
) const

Return a selection corresponding to the node_set name

Parameters
nameis the name of the node_set rule to be evaluated
populationis the population for which the returned selection will be valid

◆ names()

std::set<std::string> bbp::sonata::NodeSets::names ( ) const

Names of the node sets available

◆ toJSON()

std::string bbp::sonata::NodeSets::toJSON ( ) const

Return the nodesets as a JSON string.

◆ update()

std::set<std::string> bbp::sonata::NodeSets::update ( const NodeSets other) const

Update this to include all nodesets from this and other.

Duplicate names are overridden with the values from other.

The duplicate names are returned.