Select

A module that selects elements from an array or matrix according to an index table. The index parameter is either one-dimensional or a n x 2 matrix. In the first case, it selects from an array. In the second case it selects from a matrix. The output is always an array, the size of which depends on the number of selected elements.

Example XML definition

Select from array example

  <module
      class = "Select"
      name = "Select"
      select = "3 2 1"
  />

Select from matrix example

  <module
      class = "Select"
      name = "Select"
      select = "3 0; 2 1; 1 4"
  />

Parameters

NameDescriptionTypeDefault
classThe class name for the module; must be "Select".string
nameThe name of this instance of the module.string
selectmatrix

Module Connections

Inputs

NameDescription
INPUTThe input

Outputs

NameDescription
OUTPUTOutput with the selected elements of the input

Author

Christian Balkenius
christian.balkenius@lucs.lu.se
Lund University Cognitive Science

Files

Select.h
Select.cc
Select.ikc

blog comments powered by Disqus