Research Article

Qualitative Spatial Reasoning with Directional and Topological Relations

Algorithm 4

Algorithm for adding new relations.
AddRelations(, )
(1)      require  , relation
(2)      if   = then
(3)              return
(4)      , = ,
(5)      if      then
(6)              
(7)      else
(8)              
(9)              if   =   then
(10)                     consistency = false
(11)                      return
(12)            if   =   then
(13)                      return
(14)            
(15)     
(16)     addRelations (, )