Skip to main content
. 2021 Oct 13;21(20):6815. doi: 10.3390/s21206815
Algorithm 1. The algorithm of permission availability detection.
  Input: Permission element urij, 1 ≤ im, 1 ≤ jn
  Output: Permissions available or unavailable
     Result = Available; // The result is initialized to available rights.
     for i = 1:m, do
       for x = i + 1:m do
        for j = 1:n do
         for y = j + 1:n do
          if urij = urxy or IsPartof(urij, urxy) then
           // The two permission elements are equal or contain
            result = Available;
            return result;
          else if (urijurxy)then
            result = NotAvailable;
          end if
         end for
       end for
       end for
     end for
     return result