next up previous contents
Next: Compiling Appropriateness Conditions Up: Signature Compilation Previous: Prolog Representation of ZCQ   Contents


Transitive Closure with ZCQ

[Code--Upper Triangular Transitive Closure]
To transitively close a matrix in its ZCQ-representation, we first recurse on its diagonal quadrants, as suggested by (*), to obtain $A^{*}$ and $C^{*}$. We then compute $A^{*}BC^{*}$ with two matrix multiplications. Matrix multiplication in ZCQ is given by the quadrant-based recursive formulation:

\begin{displaymath}
\left( \begin{array}{ll}
A & B\\
C & D
\end{array} \righ...
...
AE + BG & AF + BH\\
CE + DG & CF + DH
\end{array} \right)
\end{displaymath}

Summation in ZCQ is given by a coordinate-wise min operation. In addition to the size-one base cases, the efficient implementation of ZCQ includes in both summation and multiplication a sparse case, in which the value of $Z(M)$ is checked first against the dimensions of the submatrices being multiplied. In this context, the base case of multiplication thus always returns 0 (indicating a non-zero element).



TRALE Reference Manual