ArrayElement
ptolemy.actor.lib.ArrayElement

Extract an element from an array. This actor reads an array from the input port and sends one of its elements to the output port. The element that is extracted is determined by the index parameter (or port). It is required that 0 <= index < N, where N is the length of the input array, or an exception will be thrown by the fire() method.

Author(s): Edward A. Lee, Elaine Cheong
Version:$Id: ArrayElement.java,v 1.40 2005/10/28 19:20:13 cxh Exp $
Pt.Proposed Rating:Green (celaine)
Pt.Accepted Rating:Green (cxh)




index
The index into the input array. This is an integer that defaults to 0, and is required to be less than or equal to the length of the input array. If the port is left unconnected, then the parameter value will be used.