Table Of Contents

Search 1D Array (G Dataflow)

Version:
    Last Modified: March 15, 2017

    Searches for an element in a 1D array starting at a specified index. The node stops searching as soon as the element is found.

    connector_pane_image
    datatype_icon

    1D array

    A 1D array of any type.

    datatype_icon

    element

    The value to search for in the input array.

    The representation of element should match the representation of 1D array.

    datatype_icon

    start index

    The index of 1D array to start searching for element.

    Default: 0

    datatype_icon

    index of element

    The index of 1D array where element is found.

    If the node does not find element, index of element is -1.

    Limitations on Fractional Indexes

    You cannot use this node to retrieve the index of a value that is not an element of the array. For example, if you have an array of two elements (0.0 and 1.0), this node does not find the index of the value 0.5, as that value is not an element of the array. Use Threshold 1D Array to find a fractional index.

    Matching an Element in a String Array

    This node only finds a string if the element you specify matches an array element exactly. For example, if you have an array of two elements (upper limit and lower limit), this node does not find the index of the value limit, because limit does not match an array element exactly. To search a string for any occurrence of a regular expression, such as in the previous example, use Match 1D String Array.

    Search Method Used by Search 1D Array

    This node uses a linear search to match the element in 1D array. Because the search is linear, you do not need to sort the array before calling this node.

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics