The MkPairElt functor

« 210 Library Documentation

Overview

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

MkPairElt Cost Specification

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