The MkTripleElt functor

« 210 Library Documentation

Overview

functor MkTripleElt (
  structure EltA : ELEMENT
  structure EltB : ELEMENT
  structure EltC : ELEMENT
  sharing EltA.Hashing = EltB.Hashing = EltC.Hashing
): ELEMENT where type t = EltA.t * EltB.t * EltC.t =

MkTripleElt Cost Specification

Work Span
equal $((A_1, A_2, A_3), (B_1, B_2, B_3))$ \[O(W_{\text{equal}}(A_1, B_1) + W_{\text{equal}}(A_2, B_2) + W_{\text{equal}}(A_3, B_3))\] \[O(\text{max}(S_{\text{equal}}(A_1, B_1), S_{\text{equal}}(A_2, B_2), S_{\text{equal}}(A_3, B_3)))\]
compare $((A_1, A_2, A_3), (B_1, B_2, B_3))$ \[O(W_{\text{compare}}(A_1, B_1) + W_{\text{compare}}(A_2, B_2) + W_{\text{compare}}(A_3, B_3))\] \[O(\text{max}(S_{\text{compare}}(A_1, B_1), S_{\text{compare}}(A_2, B_2), S_{\text{compare}}(A_3, B_3)))\]
hash $(A_1, A_2, A_3)$ \[O(W_{\text{hash}}(A_1) + W_{\text{hash}}(A_2) + W_{\text{hash}}(A_3))\] \[O(S_{\text{hash}}(A_1) + S_{\text{hash}}(A_2) + S_{\text{hash}}(A_3))\]
toString $(A_1, A_2, A_3)$ \[O(W_{\text{toString}}(A_1) + W_{\text{toString}}(A_2) + W_{\text{toString}}(A_3))\] \[O(\text{max}(S_{\text{toString}}(A_1), S_{\text{toString}}(A_2), S_{\text{toString}}(A_3)))\]