# 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]

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_psc_alpha
      >> CreateLayer ;

      4 5	 Displacement
      [0.2 0.3] 5 Displacement

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"

Author:

    Håkon Enger, Hans E Plesser, Kittel Austvoll

      See also: Distance, GetPosition

Source:

    /opt/conda/conda-bld/nest_1531570948828/work/topology/topologymodule.cpp

NEST HelpDesk | Command Index | NEST Quick Reference

© 2004 The NEST Initiative