úÎQ®Nš*      !"#$%&'()Safe8The relations two vector clocks may find themselves in. BA vector clock is, conceptually, an associtive list sorted by the 5 value of the key, where each key appears only once. O(1). The empty vector clock. O(1)). A vector clock with a single element. O(N)0. Insert each entry in the list one at a time. O(1);. All the entries in the vector clock. Note that this is  not the inverse of . O(1). Is the vector clock empty? O(N).. The number of entries in the vector clock. *O(N)6. Lookup the value for a key in the vector clock and ! remove the corresponding entry. O(N)3. Lookup the value for a key in the vector clock. O(N);. Is the given key a key in an entry of the vector clock? O(N)<. Delete an entry from the vector clock. If the requested % entry does not exist, does nothing. O(N)*. Insert or replace the entry for a key. O(N)". Increment the entry for a key. O(N)7. Increment the entry for a key. If the key does not # exist, assume it was the default.  O(max(N, M))-. Combine two vector clocks entry-by-entry.  O(max(N, M))). The maximum of the two vector clocks.  O(min(N, M))/. The relation between the two vector clocks.  O(min(N, M)). Short-hand for relation vc1 vc2 == Causes. O(M). If vc2  vc1, compute the smallest vc3  s.t. max vc3 vc2 == vc1. Note that the first parameter is the  newer vector clock. O(N)3. Check whether the vector clock is valid or not. +, * key: the key of the entry vc: the vector clock default: if the key is not ! found, assume its value was the  default and increment that a function that takes the key, the value of the entry in < the left hand vector clock, if it exists, the value in the = right hand vector clock, if it exists, and, if it wishes to  keep a value for this key in the resulting vector clock,  returns it. lhs: the left hand vector clock rhs: the right hand vector clock -./01   +, * -./01 TrustworthyBAn approximate vector clock is a normal vector clock, but several 6 keys are mapped to the same value. This can lead to false  positive &-s. In other words, the fact that one vector B clock causes another is no longer enough information to say that E one message causes the other. That said, experimental results show C that approximate vector clocks have good results in practice; see 4 the paper by R. Baldoni and M. Raynal for details. O(1). The empty vector clock. O(N)0. Insert each entry in the list one at a time. O(1);. All the entries in the vector clock. Note that this is  not the inverse of #. Note that the keys are returned  hashed. O(1)). A vector clock with a single element. O(1). Is the vector clock empty? O(N)9. The number of entries in the vector clock. Note that  this may be less than the size at construction. O(N);. Is the given key a key in an entry of the vector clock? O(N)3. Lookup the value for a key in the vector clock. O(N)*. Insert or replace the entry for a key. !O(N)". Increment the entry for a key. "O(N)7. Increment the entry for a key. If the key does not # exist, assume it was the default. #O(N)<. Delete an entry from the vector clock. If the requested % entry does not exist, does nothing. $ O(max(N, M))2. Combine two vector clocks entry-by-entry. The C size of the resulting vector clock is the maximum of the sizes of  the given ones. % O(max(N, M))). The maximum of the two vector clocks. & O(min(N, M))/. The relation between the two vector clocks. ' O(min(N, M)). Short-hand for relation vc1 vc2 == Causes. (O(M). If vc2 ' vc1, compute the smallest vc3  s.t. max vc3 vc2 == vc1. Note that the first parameter is the  newer vector clock. 2/Map a key into the domain of approximate keys. )O(N)3. Check whether the vector clock is valid or not. 345size: the maximum number of  entries in the vector clock size: the maximum number of  entries in the vector clock entries: the entries to insert # in the newly created vector clock size: the maximum number of  entries in the vector clock key: the key for the entry value: the value for the entry  !"key: the key of the entry vc: the vector clock default: if the key is not ! found, assume its value was the  default and increment that #$!a function that takes the hashed key, the value of the A entry in the left hand vector clock, if it exists, the value in A the right hand vector clock, if it exists, and, if it wishes to  keep a value for this key in the resulting vector clock,  returns it. lhs: the left hand vector clock rhs: the right hand vector clock %&'(2)6789:; !"#$%&'() !"#$%(&')345 !"#$%&'(2)6789:;Safe <           !"#$ !%&vector-clock-0.2.2Data.VectorClock.SimpleData.VectorClock.ApproximateData.VectorClockRelation ConcurrentCausedByCauses VectorClockempty singletonfromListtoListnullsizelookupmemberdeleteinsertincincWithDefaultcombinemaxrelationcausesdiffvalidextractclock$fTraversableVectorClock$fFunctorVectorClock$fFoldableVectorClock$fBinaryVectorClock$fShowVectorClockmapKeyvcClockvcSize$fEqVectorClock