Processing math: 16%

The MkSeqElt functor

« 210 Library Documentation

Overview

functor MkSeqElt (
  structure Elt : ELEMENT
  structure Seq : SEQUENCE
): ELEMENT where type t = Elt.t Seq.t =

MkSeqElt Cost Specification

Work Span
equal (A,B) O(min(|A|,|B|)1i=0Wequal(A[i],B[i])) O(max
compare (A, B) O( \sum_{i=0}^{\text{min}(|A|, |B|) - 1} W_{\text{compare}}(A[i], B[i]) ) O( \max_{i=0}^{\text{min}(|A|, |B|) - 1} S_{\text{compare}}(A[i], B[i]) )
hash A O( \sum_{i=0}^{|A| - 1} W_{\text{hash}}(A[i]) ) O( \max_{i=0}^{|A| - 1} S_{\text{hash}}(A[i]) )
toString A O( \sum_{i=0}^{|A| - 1} W_{\text{toString}}(A[i]) ) O( \max_{i=0}^{|A| - 1} S_{\text{toString}}(A[i]) )