Command: nest::Displacement

NEST HelpDesk Command Index NEST Quick Reference
Name:
nest::Displacement - compute displacement vector
Synopsis:
layer from_node_id to_node_id Displacement -> [double vector]
layer from_pos to_node_id Displacement -> [double vector]
Description:
This function returns a vector connecting the position of the "from_node_id"
node or the explicitly given "from_pos" position and the position of the
"to_node_id" node. Nodes must be parts of a spatial NodeCollection.

The "from" position is projected into the layer of the "to_node_id" node. If
this layer has periodic boundary conditions (EdgeWrap is true), then the
shortest displacement vector is returned, taking into account the
periodicity. Fixed grid layers are in this case extended so that the
nodes at the edges of the layer have a distance of one grid unit when
wrapped.

Example:

<< /rows 5
/columns 4
/elements /iaf_psc_alpha
>> CreateLayer
/layer Set

layer [4] Take layer [5] Take Displacement
[[0.2 0.3]] layer [5] Take Displacement
Parameters:
layer - NodeCollection for layer
from_node_id - int, node_id of node in a spatial NodeCollection
from_pos - double vector, position in layer
to_node_id - int, node_id of node in a spatial NodeCollection

Returns:
[double vector] - vector pointing from position "from" to position "to"
Require:
HAVE_LIBNEUROSIM */
Author:
HÃ¥kon Enger, Hans E Plesser, Kittel Austvoll

See also: Distance, GetPosition
Source:
/builddir/build/BUILD/nest-simulator-3.3/nest-simulator-3.3/nestkernel/nestmodule.cpp
NEST HelpDesk Command Index NEST Quick Reference

© 2004 The NEST Initiative