Brion  1.10.0
The Blue Brain C++ I/O library
brain::Circuit Class Reference

Read access to a circuit database. More...

#include <circuit.h>

+ Collaboration diagram for brain::Circuit:

Public Types

enum  Coordinates { global, local }
 Coordinate system to use for circuit morphologies.
 

Public Member Functions

 Circuit (const URI &source)
 Opens a circuit for read access. More...
 
 Circuit (const brion::BlueConfig &blueConfig)
 Opens a circuit for read access. More...
 
GIDSet getGIDs (const std::string &target) const
 
GIDSet getGIDs () const
 
GIDSet getRandomGIDs (float fraction, const std::string &target) const
 
GIDSet getRandomGIDs (float fraction) const
 
URIs getMorphologyURIs (const GIDSet &gids) const
 
neuron::Morphologies loadMorphologies (const GIDSet &gids, Coordinates coords) const
 
Vector3fs getPositions (const GIDSet &gids) const
 
size_ts getMorphologyTypes (const GIDSet &gids) const
 
Strings getMorphologyTypeNames () const
 
size_ts getElectrophysiologyTypes (const GIDSet &gids) const
 
Strings getElectrophysiologyTypeNames () const
 
Matrix4fs getTransforms (const GIDSet &gids) const
 
Quaternionfs getRotations (const GIDSet &gids) const
 
size_t getNumNeurons () const
 
SynapsesStream getAfferentSynapses (const GIDSet &gids, SynapsePrefetch prefetch=SynapsePrefetch::none) const
 Access all afferent synapses of the given GIDs. More...
 
SynapsesStream getEfferentSynapses (const GIDSet &gids, SynapsePrefetch prefetch=SynapsePrefetch::none) const
 Access all efferent synapses of the given GIDs. More...
 
SynapsesStream getProjectedSynapses (const GIDSet &preGIDs, const GIDSet &postGIDs, SynapsePrefetch prefetch=SynapsePrefetch::none) const
 Access all synapses along the projection from the pre- to the postGIDs. More...
 

Friends

class Synapses
 

Detailed Description

Read access to a circuit database.

This class provides convenience functions to access information about the cells inside the circuit and their morphologies.

Definition at line 39 of file brain/circuit.h.

Constructor & Destructor Documentation

brain::Circuit::Circuit ( const URI &  source)
explicit

Opens a circuit for read access.

Parameters
sourcethe URI to the CircuitConfig or BlueConfig file.
brain::Circuit::Circuit ( const brion::BlueConfig blueConfig)
explicit

Opens a circuit for read access.

Parameters
blueConfigThe object representing the BlueConfig.

Member Function Documentation

SynapsesStream brain::Circuit::getAfferentSynapses ( const GIDSet &  gids,
SynapsePrefetch  prefetch = SynapsePrefetch::none 
) const

Access all afferent synapses of the given GIDs.

Parameters
gidsthe gids to load afferent synapses for
prefetchwhich synapse data to load on SynapsesStream.read()
Returns
synapse data stream
SynapsesStream brain::Circuit::getEfferentSynapses ( const GIDSet &  gids,
SynapsePrefetch  prefetch = SynapsePrefetch::none 
) const

Access all efferent synapses of the given GIDs.

Parameters
gidsthe gids to load efferent synapses for
prefetchwhich synapse data to load on SynapsesStream.read()
Returns
synapse data stream
Strings brain::Circuit::getElectrophysiologyTypeNames ( ) const
Returns
The electrophysiology type names of the circuit, indexed by getElectrophysiologyTypes().
size_ts brain::Circuit::getElectrophysiologyTypes ( const GIDSet &  gids) const
Returns
The electrophysiology type indices of the given cells in the iteration order of the input gids.
GIDSet brain::Circuit::getGIDs ( const std::string &  target) const
Returns
The set of GIDs for the given target name.
Exceptions
std::runtime_errorif the target cannot be found.
GIDSet brain::Circuit::getGIDs ( ) const
Returns
The set of all GIDs held by the circuit.
Strings brain::Circuit::getMorphologyTypeNames ( ) const
Returns
The morphology type names of the circuit, indexed by getMorphologyTypes().
size_ts brain::Circuit::getMorphologyTypes ( const GIDSet &  gids) const
Returns
The morphology type indices of the given cells in the iteration order of the input gids.
URIs brain::Circuit::getMorphologyURIs ( const GIDSet &  gids) const
Returns
The set of URIs to access the morphologies of the given cells
size_t brain::Circuit::getNumNeurons ( ) const
Returns
The number of neurons in the circuit.
Vector3fs brain::Circuit::getPositions ( const GIDSet &  gids) const
Returns
The positions of the given cells in the iteration order of the input gids.
SynapsesStream brain::Circuit::getProjectedSynapses ( const GIDSet &  preGIDs,
const GIDSet &  postGIDs,
SynapsePrefetch  prefetch = SynapsePrefetch::none 
) const

Access all synapses along the projection from the pre- to the postGIDs.

Parameters
preGIDsthe gids to load the efferent synapses for
postGIDsthe gids to load the afferent synapses for
prefetchwhich synapse data to load on SynapsesStream.read()
Returns
synapse data stream
GIDSet brain::Circuit::getRandomGIDs ( float  fraction,
const std::string &  target 
) const
Returns
A random fraction of GIDs from the given target name.
Defines:
BRAIN_CIRCUIT_SEED set the seed for deterministic randomness
Exceptions
std::runtime_errorif the fraction is not in the range [0,1].
std::runtime_errorif the target cannot be found.
GIDSet brain::Circuit::getRandomGIDs ( float  fraction) const
Returns
A random fraction of GIDs from the circuit.
Defines:
BRAIN_CIRCUIT_SEED set the seed for deterministic randomness
Exceptions
std::runtime_errorif the fraction is not in the range [0,1].
Quaternionfs brain::Circuit::getRotations ( const GIDSet &  gids) const
Returns
The local to world rotation of the given cells.
Matrix4fs brain::Circuit::getTransforms ( const GIDSet &  gids) const
Returns
The local to world transformations of the given cells in the iteration
neuron::Morphologies brain::Circuit::loadMorphologies ( const GIDSet &  gids,
Coordinates  coords 
) const
Returns
The list of morpholgies for the GID set. If local coordinates are requested, morphologies that are repeated in the circuit will shared the same Morphology object in the list. If global coordinates are requested, all Morphology objects are unique.

The documentation for this class was generated from the following file: