Research Article

Computing the Discrete Compactness of Orthogonal Pseudo-Polytopes via Their 𝑛 D-EVM Representation

Algorithm 2

Computing the content of nD space enclosed by an OPP.
Input: An nD-EVM p.
     The number n of dimensions.
Output: The content of nD space enclosed by p.
Procedure Content(EVM p, int n)
       real cont = 0.0// The content of nD space enclosed by p.
       EVM hvl1, hvl2// Consecutive couplets perpendicular to XA-axis.
       EVM s// Current section of p.
       if (n = 1) then return Length(p) // Base case: p is a 1D-OPP.
       else
          s = InitEVM( )
          hvl1 = ReadHvl(p)
          while (Not(EndEVM(p)))
                   hvl2 = ReadHvl(p)
                    s = GetSection(s, hvl1)
                    cont = cont + Content(s, n-1) * dist(hvl1, hvl2)
                    hvl1 = hvl2
          end-of-while
          return cont
       end-of-else
end-of-procedure