Command: topology::Displacement

NEST HelpDesk Command Index NEST Quick Reference

Name:
 topology::Displacement - compute displacement vector

Synopsis:
 from_gid to_gid Displacement -> [double vector]
              from_pos to_gid Displacement -> [double vector]

Parameters:
    from_gid    - int, gid of node in a topology layer
    from_pos    - double vector, position in layer
    to_gid      - int, gid of node in a topology layer

    Returns:
    [double vector] - vector pointing from position "from" to position "to"

Description:
    This function returns a vector connecting the position of the "from_gid"
    node or the explicitly given "from_pos" position and the position of the
    "to_gid" node. Nodes must be parts of topology layers.

    The "from" position is projected into the layer of the "to_gid" 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:

    topology using
    << /rows 5
       /columns 4
       /elements /iaf_neuron
    >> CreateLayer ;

    4 5         Displacement
    [0.2 0.3] 5 Displacement

Author:
 HÃ¥kon Enger, Hans E Plesser, Kittel Austvoll

    See also: Distance, GetPosition
Source:
 /home/abuild/rpmbuild/BUILD/nest-2.4.1/topology/topologymodule.cpp

NEST HelpDesk Command Index NEST Quick Reference

© 2000-2010 The NEST Initiative