Let networklocs be a set of elements of the form (n, t, l) where n is a node in the network, t is a clock tick and l is the location of n at time t. How can I get (in a concise way in pseudo-code) the element of networklocs where node and time is given?
I know I can write a function like
getElement(ni,t)
for all (nj,t',l') in networklocs
if nj=ni and t'= t then return (nj,t',l')
But is there a more concise way to access an element of the set networklocs in the pseudo-code?
Note that I would like to keep networklocs as a set, so solutions with maps or arrays do not fit.