Input: Two D-EVMs and , the Boolean Operation op, and the dimensionality . |
Output: A resulting D-EVM. |
(1) Procedure booleanOperation (D-EVM , D-EVM , booleanOperator op, integer ) |
(2) EVM pSection, qSection; |
(3) EVM couplet; |
(4) boolean , ; |
(5) real coord; |
(6) EVM result, rPrevSection, rCurrSection; |
(7) if then |
(8) return booleanOperation1D (); |
(9) else |
(10) pSection ← initEVM ( ); |
(11) qSection ← initEVM ( ); |
(12) rCurrSection ← initEVM ( ); |
(13) nextObject (); |
(14) while !(endEVM (p)) and !(endEVM ()) do |
(15) if fromP then |
(16) couplet ← readCouplet (); |
(17) pSection ← getSection (); |
(18) if fromQ then |
(19) couplet ← readCouplet (); |
(20) qSection ← getSection (); |
(21) rPrevSection ← rCurrSection |
(22) rCurrSection ← booleanOperation (); |
(23) couplet ← getCouplet (rPrevSection, rCurrSection); |
(24) setCoord (couplet, coord); |
(25) putCouplet (couplet, result); |
(26) nextObject (); |
(27) while !endEVM () do |
(28) couplet ← readCouplet (); |
(29) putBool (couplet, result, op); |
(30) while !endEVM () do |
(31) couplet ← readCouplet (); |
(32) putBool (couplet, result, op); |
(33) return result |