Skip to main content
. 2022 Sep 15;22(18):6980. doi: 10.3390/s22186980
Algorithm 3 get_node
Input:  row, temp_adj_mat
Output:  related_rows
  •    1:

    if  row.s_idnodes_ids  then

  •    2:

     Find the nearest node in nodes[row.s_id] with t < sim_max_delay

  •    3:

        if nearest_node exists then

  •    4:

            return nearest_node

  •    5:

        end if

  •    6:

    else

  •    7:

       row.idsize(nodes_ids)

  •    8:

       Append row to nodes[row.s_id] and nodes_ids

  •    9:

     Add 1 empty row and 1 empty column to adj_mat and temp_adj_mat

  •  10:

      return row

  •  11:

    end if