pygrenade_vx.network.Neuron
-
class
pygrenade_vx.network.Neuron Bases:
pybind11_builtins.pybind11_object-
__init__(self: _pygrenade_vx_network.Neuron) → None
Methods
__init__(self)add_compartment(self, compartment)Adds a compartment to the neuron.
add_compartment_connection(self, source, …)Add a compartment connection to the neuron.
adjacent_compartments(self, descriptor)Return iterators to begin and end of adjacent compartments.
branch_compartments(self, compartment, …)Return ordered list of compartments inside a branch or chain.
branch_size(self, compartment, …)Return the number of compartments on a branch starting from the given compartment.
classify_neighbours(self, compartment, …)Classify neighbours into parts of branches, chains or as a leaf.
clear(self)Clear the neuron.
compartment_connections(self)compartments(self)compartments_connected(self)Check if all compartments are connected.
contains(self, descriptor)Check if neuron contains a compartment.
get(*args, **kwargs)Overloaded function.
get_compartment_degree(self, descriptor)Return number of connections on a compartment.
Return a map of each compartment-descriptor to an index.
Return compartment with largest degree.
is_chain(self, compartment, marked_compartments)Distinguishes chains from branches.
isomorphism(self, other)Return mapping of compartments between this and other neuron.
neighbour(self, source, target)Check if two compartments are neighbours.
Return number of connections on the neuron.
num_compartments(self)Return number of compartments on the neuron.
remove_compartment(self, descriptor)Removes a compartment from the neuron.
remove_compartment_connection(self, descriptor)Remove a connection from the neuron.
set(*args, **kwargs)Overloaded function.
source(self, descriptor)Return source of the given connection.
target(self, descriptor)Return target of the given connection.
valid(self, parameter_space)Check if the given paramter space is valid for the neuron.
write_graphviz(self, filename, name)Writes neuron topology in graphviz format.
-
class
ParameterSpace Bases:
pybind11_builtins.pybind11_object-
property
compartments
-
valid(self: _pygrenade_vx_network.Neuron.ParameterSpace, parameterization: _pygrenade_vx_network.Neuron.ParameterSpace.Parameterization) → bool Check if the given parameterization is valid for the parameter space. This checks if the parameterization for each compartment is valid.
-
property
-
add_compartment(self: _pygrenade_vx_network.Neuron, compartment: _pygrenade_vx_network.Compartment) → _pygrenade_vx_network.CompartmentOnNeuron Adds a compartment to the neuron.
-
add_compartment_connection(self: _pygrenade_vx_network.Neuron, source: _pygrenade_vx_network.CompartmentOnNeuron, target: _pygrenade_vx_network.CompartmentOnNeuron, edge: _pygrenade_vx_network.CompartmentConnection) → _pygrenade_vx_network.CompartmentConnectionOnNeuron Add a compartment connection to the neuron.
-
adjacent_compartments(self: _pygrenade_vx_network.Neuron, descriptor: _pygrenade_vx_network.CompartmentOnNeuron) → tuple[boost::iterators::transform_iterator<grenade::common::detail::DescriptorTransform<grenade::vx::network::abstract::CompartmentOnNeuron, void*>, boost::adjacency_iterator<boost::adjacency_list<boost::setS, boost::listS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>, void*, boost::detail::out_edge_iter<std::_Rb_tree_const_iterator<boost::detail::stored_edge_iter<void*, std::_List_iterator<boost::list_edge<void*, boost::no_property> >, boost::no_property> >, void*, boost::detail::edge_desc_impl<boost::undirected_tag, void*>, long>, long>, boost::use_default, boost::use_default>, boost::iterators::transform_iterator<grenade::common::detail::DescriptorTransform<grenade::vx::network::abstract::CompartmentOnNeuron, void*>, boost::adjacency_iterator<boost::adjacency_list<boost::setS, boost::listS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>, void*, boost::detail::out_edge_iter<std::_Rb_tree_const_iterator<boost::detail::stored_edge_iter<void*, std::_List_iterator<boost::list_edge<void*, boost::no_property> >, boost::no_property> >, void*, boost::detail::edge_desc_impl<boost::undirected_tag, void*>, long>, long>, boost::use_default, boost::use_default>] Return iterators to begin and end of adjacent compartments.
-
branch_compartments(self: _pygrenade_vx_network.Neuron, compartment: _pygrenade_vx_network.CompartmentOnNeuron, blacklist_compartment: _pygrenade_vx_network.CompartmentOnNeuron = CompartmentOnNeuron(0)) → list[_pygrenade_vx_network.CompartmentOnNeuron] Return ordered list of compartments inside a branch or chain.
-
branch_size(self: _pygrenade_vx_network.Neuron, compartment: _pygrenade_vx_network.CompartmentOnNeuron, marked_compartments: set[_pygrenade_vx_network.CompartmentOnNeuron]) → int Return the number of compartments on a branch starting from the given compartment.
-
classify_neighbours(self: _pygrenade_vx_network.Neuron, compartment: _pygrenade_vx_network.CompartmentOnNeuron, neighbours_whitelist: set[_pygrenade_vx_network.CompartmentOnNeuron] = set()) → grenade::vx::network::abstract::CompartmentNeighbours Classify neighbours into parts of branches, chains or as a leaf.
-
clear(self: _pygrenade_vx_network.Neuron) → None Clear the neuron. Remove all compartments and connections.
-
compartment_connections(self: _pygrenade_vx_network.Neuron) → tuple[boost::iterators::transform_iterator<grenade::common::detail::DescriptorTransform<grenade::vx::network::abstract::CompartmentConnectionOnNeuron, boost::detail::edge_desc_impl<boost::undirected_tag, void*> >, boost::detail::undirected_edge_iter<std::_List_iterator<boost::list_edge<void*, boost::no_property> >, boost::detail::edge_desc_impl<boost::undirected_tag, void*>, long>, boost::use_default, boost::use_default>, boost::iterators::transform_iterator<grenade::common::detail::DescriptorTransform<grenade::vx::network::abstract::CompartmentConnectionOnNeuron, boost::detail::edge_desc_impl<boost::undirected_tag, void*> >, boost::detail::undirected_edge_iter<std::_List_iterator<boost::list_edge<void*, boost::no_property> >, boost::detail::edge_desc_impl<boost::undirected_tag, void*>, long>, boost::use_default, boost::use_default>]
-
compartments(self: _pygrenade_vx_network.Neuron) → tuple[boost::iterators::transform_iterator<grenade::common::detail::DescriptorTransform<grenade::vx::network::abstract::CompartmentOnNeuron, void*>, std::_List_iterator<void*>, boost::use_default, boost::use_default>, boost::iterators::transform_iterator<grenade::common::detail::DescriptorTransform<grenade::vx::network::abstract::CompartmentOnNeuron, void*>, std::_List_iterator<void*>, boost::use_default, boost::use_default>]
-
compartments_connected(self: _pygrenade_vx_network.Neuron) → bool Check if all compartments are connected.
-
contains(self: _pygrenade_vx_network.Neuron, descriptor: _pygrenade_vx_network.CompartmentOnNeuron) → bool Check if neuron contains a compartment.
-
get(*args, **kwargs) Overloaded function.
get(self: _pygrenade_vx_network.Neuron, descriptor: _pygrenade_vx_network.CompartmentOnNeuron) -> _pygrenade_vx_network.Compartment
Get a compartment via its descriptor.
get(self: _pygrenade_vx_network.Neuron, descriptor: _pygrenade_vx_network.CompartmentConnectionOnNeuron) -> _pygrenade_vx_network.CompartmentConnection
Get a compartment connection via its descriptor.
-
get_compartment_degree(self: _pygrenade_vx_network.Neuron, descriptor: _pygrenade_vx_network.CompartmentOnNeuron) → int Return number of connections on a compartment. Since the neuron has a undirected graph representation the ingoing and outgoing degree is equal.
-
get_compartment_index_map(self: _pygrenade_vx_network.Neuron) → dict[int, int] Return a map of each compartment-descriptor to an index.
-
get_max_degree_compartment(self: _pygrenade_vx_network.Neuron) → _pygrenade_vx_network.CompartmentOnNeuron Return compartment with largest degree. Since the neuron has a undirected graph representation the ingoing and outgoing degree is equal.
-
is_chain(self: _pygrenade_vx_network.Neuron, compartment: _pygrenade_vx_network.CompartmentOnNeuron, marked_compartments: set[_pygrenade_vx_network.CompartmentOnNeuron]) → bool Distinguishes chains from branches.
-
isomorphism(self: _pygrenade_vx_network.Neuron, other: _pygrenade_vx_network.Neuron) → dict[_pygrenade_vx_network.CompartmentOnNeuron, _pygrenade_vx_network.CompartmentOnNeuron] Return mapping of compartments between this and other neuron. If no mapping between all the neurons compartments is possible an map with the possible compartment mappings is returned.
-
neighbour(self: _pygrenade_vx_network.Neuron, source: _pygrenade_vx_network.CompartmentOnNeuron, target: _pygrenade_vx_network.CompartmentOnNeuron) → bool Check if two compartments are neighbours.
-
num_compartment_connections(self: _pygrenade_vx_network.Neuron) → int Return number of connections on the neuron.
-
num_compartments(self: _pygrenade_vx_network.Neuron) → int Return number of compartments on the neuron.
-
remove_compartment(self: _pygrenade_vx_network.Neuron, descriptor: _pygrenade_vx_network.CompartmentOnNeuron) → None Removes a compartment from the neuron.
-
remove_compartment_connection(self: _pygrenade_vx_network.Neuron, descriptor: _pygrenade_vx_network.CompartmentConnectionOnNeuron) → None Remove a connection from the neuron.
-
set(*args, **kwargs) Overloaded function.
set(self: _pygrenade_vx_network.Neuron, descriptor: _pygrenade_vx_network.CompartmentOnNeuron, compartment: _pygrenade_vx_network.Compartment) -> None
Set a compartment via a descriptor.
set(self: _pygrenade_vx_network.Neuron, descriptor: _pygrenade_vx_network.CompartmentConnectionOnNeuron, connection: _pygrenade_vx_network.CompartmentConnection) -> None
Set a compartment connection via a descriptor.
-
source(self: _pygrenade_vx_network.Neuron, descriptor: _pygrenade_vx_network.CompartmentConnectionOnNeuron) → _pygrenade_vx_network.CompartmentOnNeuron Return source of the given connection.
-
target(self: _pygrenade_vx_network.Neuron, descriptor: _pygrenade_vx_network.CompartmentConnectionOnNeuron) → _pygrenade_vx_network.CompartmentOnNeuron Return target of the given connection.
-
valid(self: _pygrenade_vx_network.Neuron, parameter_space: _pygrenade_vx_network.Neuron.ParameterSpace) → bool Check if the given paramter space is valid for the neuron. This checks if the parameter space for each compartment of the neuron is valid.
-
write_graphviz(self: _pygrenade_vx_network.Neuron, filename: str, name: str) → None Writes neuron topology in graphviz format.
-