VectorExtract
Extracts a single element from an input vector, converting VectorNumberData to NumberData.
Configuration
id: Unique identifier for the operatorindex: Zero-based index of the element to extract (must be non-negative)
{
"id": "ext1",
"index": 1
}
Ports
- Input Port 0: VectorNumberData
- Output Port 0: NumberData (scalar value at the specified index)
Operation
For each input vector message, outputs the element at the specified index as a scalar NumberData message with the same timestamp.
| Time | Input (vector) | Output (scalar) |
|---|---|---|
| 1 | [10.0, 20.0, 30.0] | 20.0 (index=1) |
| 2 | [40.0, 50.0, 60.0] | 50.0 (index=1) |
Error Handling
- Throws if
indexis negative at construction - Throws at runtime if index is out of bounds for the input vector