diff --git a/dev/containers-data/CCBijection/Make/argument-1-L/index.html b/dev/containers-data/CCBijection/Make/argument-1-L/index.html new file mode 100644 index 00000000..d5c400d7 --- /dev/null +++ b/dev/containers-data/CCBijection/Make/argument-1-L/index.html @@ -0,0 +1,2 @@ + +
Make.LMake.RCCBijection.Makemodule L : OrderedTypemodule R : OrderedTypetype left = L.ttype right = R.tval empty : tval is_empty : t -> boolAdd left and right correspondence to bijection such that left and right are unique in their respective sets and only correspond to each other.
val cardinal : t -> intNumber of bindings. O(n) time.
Remove the left, right binding if it exists. Return the same bijection otherwise.
Remove the binding with left key if it exists. Return the same bijection otherwise.
Remove the binding with right key if it exists. Return the same bijection otherwise.
CCBijection.OrderedTypeCCBijection.Sval empty : tval is_empty : t -> boolAdd left and right correspondence to bijection such that left and right are unique in their respective sets and only correspond to each other.
val cardinal : t -> intNumber of bindings. O(n) time.
Remove the left, right binding if it exists. Return the same bijection otherwise.
Remove the binding with left key if it exists. Return the same bijection otherwise.
Remove the binding with right key if it exists. Return the same bijection otherwise.
Make._CCBitField.MakeCreate a new bitfield type
module _ : sig ... endGenerative type of bitfields. Each instantiation of the functor should create a new, incompatible type
val empty : tEmpty bitfields (all bits 0).
val mk_field : unit -> fieldMake a new field.
Prevent new fields from being added. From now on, creating a field will raise Frozen.
CCBitField.SGenerative type of bitfields. Each instantiation of the functor should create a new, incompatible type
val empty : tEmpty bitfields (all bits 0).
val mk_field : unit -> fieldMake a new field.
Prevent new fields from being added. From now on, creating a field will raise Frozen.
CCGraph.Dottype attribute = [ | `Color of string| `Shape of string| `Weight of int| `Style of string| `Label of string| `Other of string * string ]Dot attribute
val pp :
+ tbl:('v, vertex_state) table ->
+ eq:('v -> 'v -> bool) ->
+ ?attrs_v:('v -> attribute list) ->
+ ?attrs_e:('e -> attribute list) ->
+ ?name:string ->
+ graph:('v, 'e) t ->
+ Stdlib.Format.formatter ->
+ 'v ->
+ unitPrint the graph, starting from given vertex, on the formatter.
CCGraph.Itertype 'a t = 'a iterval return : 'a -> 'a tval iter : ('a -> unit) -> 'a t -> unitval fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'bval to_list : 'a t -> 'a listCCGraph.Lazy_treeval fold_v : ('acc -> 'v -> 'acc) -> 'acc -> ('v, _) t -> 'accCCGraph.Mapval empty : 'a tRemove the vertex and all its outgoing edges. Edges that point to the vertex are NOT removed, they must be manually removed with remove_edge.
Traverse.Eventval get_vertex : ('v, 'e) t -> ('v * [ `Enter | `Exit ]) optionval get_enter : ('v, 'e) t -> 'v optionval get_exit : ('v, 'e) t -> 'v optionval get_edge : ('v, 'e) t -> ('v * 'e * 'v) optionCCGraph.TraverseTraversal of the given graph, starting from a sequence of vertices, using the given bag to choose the next vertex to explore. Each vertex is visited at most once.
val generic_tag :
+ tags:'v tag_set ->
+ bag:'v bag ->
+ graph:('v, 'e) t ->
+ 'v iter ->
+ 'v iter_onceOne-shot traversal of the graph using a tag set and the given bag.
val dijkstra :
+ tbl:'v set ->
+ ?dist:('e -> int) ->
+ graph:('v, 'e) t ->
+ 'v iter ->
+ ('v * int * ('v, 'e) path) iter_onceDijkstra algorithm, traverses a graph in increasing distance order. Yields each vertex paired with its distance to the set of initial vertices (the smallest distance needed to reach the node from the initial vertices).
module Event : sig ... endCCGraph.MAPval empty : 'a tRemove the vertex and all its outgoing edges. Edges that point to the vertex are NOT removed, they must be manually removed with remove_edge.
Make.ECCHashSet.Maketype elt = E.tval create : int -> tcreate n makes a new set with the given capacity n.
val clear : t -> unitclear s removes all elements from s.
val cardinal : t -> intcardinal s returns the number of elements in s.
CCHashSet.ELEMENTCCHashSet.Sval create : int -> tcreate n makes a new set with the given capacity n.
val clear : t -> unitclear s removes all elements from s.
val cardinal : t -> intcardinal s returns the number of elements in s.
Make.KCCHashTrie.Maketype key = K.tval empty : 'a tval is_empty : _ t -> boolupdate k ~f m calls f (Some v) if get k m = Some v, f None otherwise. Then, if f returns Some v' it binds k to v', if f returns None it removes k.
val add_mut : id:Transient.t -> key -> 'a -> 'a t -> 'a tadd_mut ~id k v m behaves like add k v m, except it will mutate in place whenever possible. Changes done with an id might affect all versions of the structure obtained with the same id (but not other versions).
val remove_mut : id:Transient.t -> key -> 'a t -> 'a tSame as remove, but modifies in place whenever possible.
val update_mut :
+ id:Transient.t ->
+ key ->
+ f:('a option -> 'a option) ->
+ 'a t ->
+ 'a tSame as update but with mutability.
val cardinal : _ t -> intval add_list_mut : id:Transient.t -> 'a t -> (key * 'a) list -> 'a tval add_iter_mut : id:Transient.t -> 'a t -> (key * 'a) iter -> 'a tval add_gen_mut : id:Transient.t -> 'a t -> (key * 'a) gen -> 'a tCCHashTrie.TransientIdentifiers for transient modifications. A transient modification is uniquely identified by a Transient.t. Once Transient.freeze r is called, r cannot be used to modify the structure again.
val create : unit -> tCreate a new, active ID.
val frozen : t -> boolfrozen i returns true if freeze i was called before. In this case, the ID cannot be used for modifications again.
val active : t -> boolactive i is not (frozen i).
val freeze : t -> unitfreeze i makes i unusable for new modifications. The values created with i will now be immutable.
val with_ : (t -> 'a) -> 'awith_ f creates a transient ID i, calls f i, freezes the ID i and returns the result of f i.
CCHashTrie.KEYCCHashTrie.Sval empty : 'a tval is_empty : _ t -> boolupdate k ~f m calls f (Some v) if get k m = Some v, f None otherwise. Then, if f returns Some v' it binds k to v', if f returns None it removes k.
val add_mut : id:Transient.t -> key -> 'a -> 'a t -> 'a tadd_mut ~id k v m behaves like add k v m, except it will mutate in place whenever possible. Changes done with an id might affect all versions of the structure obtained with the same id (but not other versions).
val remove_mut : id:Transient.t -> key -> 'a t -> 'a tSame as remove, but modifies in place whenever possible.
val update_mut :
+ id:Transient.t ->
+ key ->
+ f:('a option -> 'a option) ->
+ 'a t ->
+ 'a tSame as update but with mutability.
val cardinal : _ t -> intval add_list_mut : id:Transient.t -> 'a t -> (key * 'a) list -> 'a tval add_iter_mut : id:Transient.t -> 'a t -> (key * 'a) iter -> 'a tval add_gen_mut : id:Transient.t -> 'a t -> (key * 'a) gen -> 'a tCCHet.KeyKeys with a type witness.
A key of type 'a t is used to access the portion of the map or table that associates keys of type 'a to values.
val create : unit -> 'a tMake a new key. This is generative, so calling create () twice with the same return type will produce incompatible keys that cannot see each other's bindings.
CCHet.MapCCHet.TblKeyval create : ?size:int -> unit -> tval length : t -> intval clear : t -> unitclear the table (like Hashtbl.clear)
val reset : t -> unitreset the table (like Hashtbl.reset)
CCLazy_list.InfixMake.XCCMixmap.Maketype key = X.tA map containing values of different types, indexed by key.
val empty : tEmpty map.
Get the value corresponding to this key, if it exists and belongs to the same key.
Find the value for the given key, which must be of the right type.
val cardinal : t -> intNumber of bindings.
All the bindings that come from the corresponding injection.
CCMixmap.ORDCCMixmap.SA map containing values of different types, indexed by key.
val empty : tEmpty map.
Get the value corresponding to this key, if it exists and belongs to the same key.
Find the value for the given key, which must be of the right type.
val cardinal : t -> intNumber of bindings.
All the bindings that come from the corresponding injection.
Make.KMake.VCCMultiMap.Makemodule K : OrderedTypemodule V : OrderedTypetype key = K.ttype value = V.tval empty : tEmpty multimap.
val is_empty : t -> boolEmpty multimap?
val size : t -> intNumber of keys.
MakeBidir.LMakeBidir.RCCMultiMap.MakeBidirmodule L : OrderedTypemodule R : OrderedTypetype left = L.ttype right = R.tval empty : tval is_empty : t -> boolval cardinal_left : t -> intNumber of distinct left keys.
val cardinal_right : t -> intNumber of distinct right keys.
Like find_right but returns at most one value.
CCMultiMap.BIDIRval empty : tval is_empty : t -> boolval cardinal_left : t -> intNumber of distinct left keys.
val cardinal_right : t -> intNumber of distinct right keys.
Like find_right but returns at most one value.
CCMultiMap.OrderedTypeCCMultiMap.Sval empty : tEmpty multimap.
val is_empty : t -> boolEmpty multimap?
val size : t -> intNumber of keys.
CCMultiSet.Makeval empty : tval is_empty : t -> boolremove_mult set x n removes at most n occurrences of x from set.
update set x f calls f n where n is the current multiplicity of x in set (0 to indicate its absence); the result of f n is the new multiplicity of x.
union a b contains as many occurrences of an element x as count a x + count b x.
meet a b is a multiset such that count (meet a b) x = max (count a x) (count b x).
intersection a b is a multiset such that count (intersection a b) x = min (count a x) (count b x).
val cardinal : t -> intNumber of distinct elements.
CCMultiSet.Sval empty : tval is_empty : t -> boolremove_mult set x n removes at most n occurrences of x from set.
update set x f calls f n where n is the current multiplicity of x in set (0 to indicate its absence); the result of f n is the new multiplicity of x.
union a b contains as many occurrences of an element x as count a x + count b x.
meet a b is a multiset such that count (meet a b) x = max (count a x) (count b x).
intersection a b is a multiset such that count (intersection a b) x = min (count a x) (count b x).
val cardinal : t -> intNumber of distinct elements.
Make.Xval idx : t -> intIndex in heap. return -1 if never set
val set_idx : t -> int -> unitUpdate index in heap
CCMutHeap.Maketype elt = X.tType of elements
val create : unit -> tCreate a heap
val in_heap : elt -> boolval size : t -> intNumber of integers within the heap
val is_empty : t -> boolval clear : t -> unitClear the content of the heap
CCMutHeap_intf.RANKEDval idx : t -> intIndex in heap. return -1 if never set
val set_idx : t -> int -> unitUpdate index in heap
CCMutHeap_intf.Sval create : unit -> tCreate a heap
val in_heap : elt -> boolval size : t -> intNumber of integers within the heap
val is_empty : t -> boolval clear : t -> unitClear the content of the heap
Make.HCCPersistentHashtbl.Makemodule H : HashedTypetype key = H.tval empty : unit -> 'a tEmpty table. The table will be allocated at the first binding.
val create : int -> 'a tCreate a new hashtable, with the given initial capacity.
val is_empty : 'a t -> boolIs the table empty?
val length : _ t -> intNumber of bindings.
Add the binding to the table, returning a new table. The old binding for this key, if it exists, is shadowed and will be restored upon remove tbl k.
Add the binding to the table, returning a new table. This erases the current binding for key, if any.
update tbl key f calls f None if key doesn't belong in tbl, f (Some v) if key -> v otherwise; If f returns None then key is removed, else it returns Some v' and key -> v' is added.
Fresh copy of the table; the underlying structure is not shared anymore, so using both tables alternatively will be efficient.
val merge :
+ f:(key -> [ `Left of 'a | `Right of 'b | `Both of 'a * 'b ] -> 'c option) ->
+ 'a t ->
+ 'b t ->
+ 'c tMerge two tables together into a new table. The function's argument correspond to values associated with the key (if present); if the function returns None the key will not appear in the result.
val stats : _ t -> Stdlib.Hashtbl.statisticsStatistics on the internal table.
CCPersistentHashtbl.HashedTypeCCPersistentHashtbl.Sval empty : unit -> 'a tEmpty table. The table will be allocated at the first binding.
val create : int -> 'a tCreate a new hashtable, with the given initial capacity.
val is_empty : 'a t -> boolIs the table empty?
val length : _ t -> intNumber of bindings.
Add the binding to the table, returning a new table. The old binding for this key, if it exists, is shadowed and will be restored upon remove tbl k.
Add the binding to the table, returning a new table. This erases the current binding for key, if any.
update tbl key f calls f None if key doesn't belong in tbl, f (Some v) if key -> v otherwise; If f returns None then key is removed, else it returns Some v' and key -> v' is added.
Fresh copy of the table; the underlying structure is not shared anymore, so using both tables alternatively will be efficient.
val merge :
+ f:(key -> [ `Left of 'a | `Right of 'b | `Both of 'a * 'b ] -> 'c option) ->
+ 'a t ->
+ 'b t ->
+ 'c tMerge two tables together into a new table. The function's argument correspond to values associated with the key (if present); if the function returns None the key will not appear in the result.
val stats : _ t -> Stdlib.Hashtbl.statisticsStatistics on the internal table.
CCRAL.Infixval (--^) : int -> int -> int ta --^ b is the integer range from a to b, where b is excluded.
Array.ByteEfficient array version for the char type
val dummy : eltA dummy element used for empty slots in the array
val create : int -> tMake an array of the given size, filled with dummy elements.
val length : t -> intlength t gets the total number of elements currently in t.
blit t s arr i len copies len elements from arr starting at i to position s from t.
Make.Eltval dummy : tArray.MakeMakes an array given an arbitrary element type
module Elt : sig ... endtype elt = Elt.tThe element type
type t = Elt.t arrayThe type of an array instance
val dummy : eltA dummy element used for empty slots in the array
val create : int -> tMake an array of the given size, filled with dummy elements.
val length : t -> intlength t gets the total number of elements currently in t.
blit t s arr i len copies len elements from arr starting at i to position s from t.
CCRingBuffer.ArrayThe abstract type for arrays
module type S = sig ... endEfficient array version for the char type
Array.Sval dummy : eltA dummy element used for empty slots in the array
val create : int -> tMake an array of the given size, filled with dummy elements.
val length : t -> intlength t gets the total number of elements currently in t.
blit t s arr i len copies len elements from arr starting at i to position s from t.
CCRingBuffer.ByteAn efficient byte based ring buffer
module Array = Array.ByteThe module type of Array for this ring buffer
val create : int -> tcreate size creates a new bounded buffer with given size. The underlying array is allocated immediately and no further (large) allocation will happen from now on.
val capacity : t -> intLength of the inner buffer.
val length : t -> intNumber of elements currently stored in the buffer.
val is_full : t -> booltrue if pushing an element would erase another element.
blit_from buf from_buf o len copies the slice o, ... o + len - 1 from an input buffer from_buf to the end of the buffer. If the slice is too large for the buffer, only the last part of the array will be copied.
blit_into buf to_buf o len copies at most len elements from buf into to_buf starting at offset o in s.
append b ~into copies all data from b and adds it at the end of into. Erases data of into if there is not enough room.
val clear : t -> unitClear the content of the buffer
val is_empty : t -> boolIs the buffer empty (i.e. contains no elements)?
val junk_front : t -> unitDrop the front element from t.
val junk_back : t -> unitDrop the back element from t.
val skip : t -> int -> unitskip b len removes len elements from the front of b.
iteri b ~f calls f i t for each element t in buf, with i being its relative index within buf.
get_front buf i returns the i-th element of buf from the front, i.e. the one returned by take_front buf after i-1 calls to junk_front buf.
get_back buf i returns the i-th element of buf from the back, i.e. the one returned by take_back buf after i-1 calls to junk_back buf.
Push value at the back of t. If t.bounded=false, the buffer will grow as needed, otherwise the oldest elements are replaced first.
Create a buffer from an initial array, but doesn't take ownership of it (still allocates a new internal array).
Make.ArrayThe module type of Array for this ring buffer
type elt = X.tThe element type
type t = X.t arrayThe type of an array instance
val dummy : eltA dummy element used for empty slots in the array
val create : int -> tMake an array of the given size, filled with dummy elements.
val length : t -> intlength t gets the total number of elements currently in t.
blit t s arr i len copies len elements from arr starting at i to position s from t.
Make.Xval dummy : tCCRingBuffer.MakeBuffer using regular arrays
module X : sig ... endThe module type of Array for this ring buffer
val create : int -> tcreate size creates a new bounded buffer with given size. The underlying array is allocated immediately and no further (large) allocation will happen from now on.
val capacity : t -> intLength of the inner buffer.
val length : t -> intNumber of elements currently stored in the buffer.
val is_full : t -> booltrue if pushing an element would erase another element.
blit_from buf from_buf o len copies the slice o, ... o + len - 1 from an input buffer from_buf to the end of the buffer. If the slice is too large for the buffer, only the last part of the array will be copied.
blit_into buf to_buf o len copies at most len elements from buf into to_buf starting at offset o in s.
append b ~into copies all data from b and adds it at the end of into. Erases data of into if there is not enough room.
val clear : t -> unitClear the content of the buffer
val is_empty : t -> boolIs the buffer empty (i.e. contains no elements)?
val junk_front : t -> unitDrop the front element from t.
val junk_back : t -> unitDrop the back element from t.
val skip : t -> int -> unitskip b len removes len elements from the front of b.
iteri b ~f calls f i t for each element t in buf, with i being its relative index within buf.
get_front buf i returns the i-th element of buf from the front, i.e. the one returned by take_front buf after i-1 calls to junk_front buf.
get_back buf i returns the i-th element of buf from the back, i.e. the one returned by take_back buf after i-1 calls to junk_back buf.
Push value at the back of t. If t.bounded=false, the buffer will grow as needed, otherwise the oldest elements are replaced first.
Create a buffer from an initial array, but doesn't take ownership of it (still allocates a new internal array).
MakeFromArray.Aval dummy : eltA dummy element used for empty slots in the array
val create : int -> tMake an array of the given size, filled with dummy elements.
val length : t -> intlength t gets the total number of elements currently in t.
blit t s arr i len copies len elements from arr starting at i to position s from t.
CCRingBuffer.MakeFromArrayMakes a ring buffer module with the given array type
module Array = AThe module type of Array for this ring buffer
val create : int -> tcreate size creates a new bounded buffer with given size. The underlying array is allocated immediately and no further (large) allocation will happen from now on.
val capacity : t -> intLength of the inner buffer.
val length : t -> intNumber of elements currently stored in the buffer.
val is_full : t -> booltrue if pushing an element would erase another element.
blit_from buf from_buf o len copies the slice o, ... o + len - 1 from an input buffer from_buf to the end of the buffer. If the slice is too large for the buffer, only the last part of the array will be copied.
blit_into buf to_buf o len copies at most len elements from buf into to_buf starting at offset o in s.
append b ~into copies all data from b and adds it at the end of into. Erases data of into if there is not enough room.
val clear : t -> unitClear the content of the buffer
val is_empty : t -> boolIs the buffer empty (i.e. contains no elements)?
val junk_front : t -> unitDrop the front element from t.
val junk_back : t -> unitDrop the back element from t.
val skip : t -> int -> unitskip b len removes len elements from the front of b.
iteri b ~f calls f i t for each element t in buf, with i being its relative index within buf.
get_front buf i returns the i-th element of buf from the front, i.e. the one returned by take_front buf after i-1 calls to junk_front buf.
get_back buf i returns the i-th element of buf from the back, i.e. the one returned by take_back buf after i-1 calls to junk_back buf.
Push value at the back of t. If t.bounded=false, the buffer will grow as needed, otherwise the oldest elements are replaced first.
Create a buffer from an initial array, but doesn't take ownership of it (still allocates a new internal array).
S.ArrayThe module type of Array for this ring buffer
val dummy : eltA dummy element used for empty slots in the array
val create : int -> tMake an array of the given size, filled with dummy elements.
val length : t -> intlength t gets the total number of elements currently in t.
blit t s arr i len copies len elements from arr starting at i to position s from t.
CCRingBuffer.SThe abstract ring buffer type, made concrete by choice of ARRAY module implementation
val create : int -> tcreate size creates a new bounded buffer with given size. The underlying array is allocated immediately and no further (large) allocation will happen from now on.
val capacity : t -> intLength of the inner buffer.
val length : t -> intNumber of elements currently stored in the buffer.
val is_full : t -> booltrue if pushing an element would erase another element.
blit_from buf from_buf o len copies the slice o, ... o + len - 1 from an input buffer from_buf to the end of the buffer. If the slice is too large for the buffer, only the last part of the array will be copied.
blit_into buf to_buf o len copies at most len elements from buf into to_buf starting at offset o in s.
append b ~into copies all data from b and adds it at the end of into. Erases data of into if there is not enough room.
val clear : t -> unitClear the content of the buffer
val is_empty : t -> boolIs the buffer empty (i.e. contains no elements)?
val junk_front : t -> unitDrop the front element from t.
val junk_back : t -> unitDrop the back element from t.
val skip : t -> int -> unitskip b len removes len elements from the front of b.
iteri b ~f calls f i t for each element t in buf, with i being its relative index within buf.
get_front buf i returns the i-th element of buf from the front, i.e. the one returned by take_front buf after i-1 calls to junk_front buf.
get_back buf i returns the i-th element of buf from the back, i.e. the one returned by take_back buf after i-1 calls to junk_back buf.
Push value at the back of t. If t.bounded=false, the buffer will grow as needed, otherwise the oldest elements are replaced first.
Create a buffer from an initial array, but doesn't take ownership of it (still allocates a new internal array).
CCSimple_queue.InfixMake.WCCTrie.Maketype char_ = W.char_type key = W.tval empty : 'a tval is_empty : _ t -> boollongest_prefix k m finds the longest prefix of k that leads to at least one path in m (it does not mean that the prefix is bound to a value.
Example: if m has keys "abc0" and "abcd", then longest_prefix "abc2" m will return "abc".
Update the binding for the given key. The function is given None if the key is absent, or Some v if key is bound to v; if it returns None the key is removed, otherwise it returns Some y and key becomes bound to y.
Fold on key/value bindings. Will use WORD.of_list to rebuild keys.
Map values, giving both key and value. Will use WORD.of_list to rebuild keys.
val fold_values : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'bMore efficient version of fold, that doesn't keep keys.
val iter_values : ('a -> unit) -> 'a t -> unitMerge two tries together. The function is used in case of conflicts, when a key belongs to both tries.
val size : _ t -> intNumber of bindings.
All bindings whose key is bigger or equal to the given key, in ascending order.
MakeArray.XCCTrie.MakeArraytype char_ = X.ttype key = X.t arrayval empty : 'a tval is_empty : _ t -> boollongest_prefix k m finds the longest prefix of k that leads to at least one path in m (it does not mean that the prefix is bound to a value.
Example: if m has keys "abc0" and "abcd", then longest_prefix "abc2" m will return "abc".
Update the binding for the given key. The function is given None if the key is absent, or Some v if key is bound to v; if it returns None the key is removed, otherwise it returns Some y and key becomes bound to y.
Fold on key/value bindings. Will use WORD.of_list to rebuild keys.
Map values, giving both key and value. Will use WORD.of_list to rebuild keys.
val fold_values : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'bMore efficient version of fold, that doesn't keep keys.
val iter_values : ('a -> unit) -> 'a t -> unitMerge two tries together. The function is used in case of conflicts, when a key belongs to both tries.
val size : _ t -> intNumber of bindings.
All bindings whose key is bigger or equal to the given key, in ascending order.
MakeList.XCCTrie.MakeListtype char_ = X.ttype key = X.t listval empty : 'a tval is_empty : _ t -> boollongest_prefix k m finds the longest prefix of k that leads to at least one path in m (it does not mean that the prefix is bound to a value.
Example: if m has keys "abc0" and "abcd", then longest_prefix "abc2" m will return "abc".
Update the binding for the given key. The function is given None if the key is absent, or Some v if key is bound to v; if it returns None the key is removed, otherwise it returns Some y and key becomes bound to y.
Fold on key/value bindings. Will use WORD.of_list to rebuild keys.
Map values, giving both key and value. Will use WORD.of_list to rebuild keys.
val fold_values : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'bMore efficient version of fold, that doesn't keep keys.
val iter_values : ('a -> unit) -> 'a t -> unitMerge two tries together. The function is used in case of conflicts, when a key belongs to both tries.
val size : _ t -> intNumber of bindings.
All bindings whose key is bigger or equal to the given key, in ascending order.
CCTrie.Stringval empty : 'a tval is_empty : _ t -> boollongest_prefix k m finds the longest prefix of k that leads to at least one path in m (it does not mean that the prefix is bound to a value.
Example: if m has keys "abc0" and "abcd", then longest_prefix "abc2" m will return "abc".
Update the binding for the given key. The function is given None if the key is absent, or Some v if key is bound to v; if it returns None the key is removed, otherwise it returns Some y and key becomes bound to y.
Fold on key/value bindings. Will use WORD.of_list to rebuild keys.
Map values, giving both key and value. Will use WORD.of_list to rebuild keys.
val fold_values : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'bMore efficient version of fold, that doesn't keep keys.
val iter_values : ('a -> unit) -> 'a t -> unitMerge two tries together. The function is used in case of conflicts, when a key belongs to both tries.
val size : _ t -> intNumber of bindings.
All bindings whose key is bigger or equal to the given key, in ascending order.
CCTrie.ORDEREDCCTrie.Sval empty : 'a tval is_empty : _ t -> boollongest_prefix k m finds the longest prefix of k that leads to at least one path in m (it does not mean that the prefix is bound to a value.
Example: if m has keys "abc0" and "abcd", then longest_prefix "abc2" m will return "abc".
Update the binding for the given key. The function is given None if the key is absent, or Some v if key is bound to v; if it returns None the key is removed, otherwise it returns Some y and key becomes bound to y.
Fold on key/value bindings. Will use WORD.of_list to rebuild keys.
Map values, giving both key and value. Will use WORD.of_list to rebuild keys.
val fold_values : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'bMore efficient version of fold, that doesn't keep keys.
val iter_values : ('a -> unit) -> 'a t -> unitMerge two tries together. The function is used in case of conflicts, when a key belongs to both tries.
val size : _ t -> intNumber of bindings.
All bindings whose key is bigger or equal to the given key, in ascending order.
CCTrie.WORDMake.XCCWBTree.Maketype key = X.tval empty : 'a tval is_empty : _ t -> boolnth i m returns the i-th key, value in the ascending order. Complexity is O(log (cardinal m)).
get_rank k m looks for the rank of k in m, i.e. the index of k in the sorted list of bindings of m. let (`At n) = get_rank k m in nth_exn n m = get m k should hold.
update k f m calls f (Some v) if get k m = Some v, f None otherwise. Then, if f returns Some v' it binds k to v', if f returns None it removes k.
val cardinal : _ t -> intval weight : _ t -> intsplit k t returns l, o, r where l is the part of the map with keys smaller than k, r has keys bigger than k, and o = Some v if k, v belonged to the map.
Like Map.S.merge.
extract_min m returns k, v, m' where k,v is the pair with the smallest key in m, and m' does not contain k.
extract_max m returns k, v, m' where k,v is the pair with the highest key in m, and m' does not contain k.
Randomly choose a (key,value) pair within the tree, using weights as probability weights.
MakeFull.XCCWBTree.MakeFullUse the custom X.weight function
type key = X.tval empty : 'a tval is_empty : _ t -> boolnth i m returns the i-th key, value in the ascending order. Complexity is O(log (cardinal m)).
get_rank k m looks for the rank of k in m, i.e. the index of k in the sorted list of bindings of m. let (`At n) = get_rank k m in nth_exn n m = get m k should hold.
update k f m calls f (Some v) if get k m = Some v, f None otherwise. Then, if f returns Some v' it binds k to v', if f returns None it removes k.
val cardinal : _ t -> intval weight : _ t -> intsplit k t returns l, o, r where l is the part of the map with keys smaller than k, r has keys bigger than k, and o = Some v if k, v belonged to the map.
Like Map.S.merge.
extract_min m returns k, v, m' where k,v is the pair with the smallest key in m, and m' does not contain k.
extract_max m returns k, v, m' where k,v is the pair with the highest key in m, and m' does not contain k.
Randomly choose a (key,value) pair within the tree, using weights as probability weights.
CCWBTree.KEYCCWBTree.ORDCCWBTree.Sval empty : 'a tval is_empty : _ t -> boolnth i m returns the i-th key, value in the ascending order. Complexity is O(log (cardinal m)).
get_rank k m looks for the rank of k in m, i.e. the index of k in the sorted list of bindings of m. let (`At n) = get_rank k m in nth_exn n m = get m k should hold.
update k f m calls f (Some v) if get k m = Some v, f None otherwise. Then, if f returns Some v' it binds k to v', if f returns None it removes k.
val cardinal : _ t -> intval weight : _ t -> intsplit k t returns l, o, r where l is the part of the map with keys smaller than k, r has keys bigger than k, and o = Some v if k, v belonged to the map.
Like Map.S.merge.
extract_min m returns k, v, m' where k,v is the pair with the smallest key in m, and m' does not contain k.
extract_max m returns k, v, m' where k,v is the pair with the highest key in m, and m' does not contain k.
Randomly choose a (key,value) pair within the tree, using weights as probability weights.
CCLock.LockRefType allowing to manipulate the lock as a reference.
CCThread.Arrval spawn : int -> (int -> 'a) -> t arrayArr.spawn n f creates an array res of length n, such that res.(i) = spawn (fun () -> f i).
val join : t array -> unitArr.join a joins every thread in a.
CCThread.Barrierval create : unit -> tCreate a barrier.
val reset : t -> unitReset to initial (non-triggered) state.
val wait : t -> unitwait b waits for barrier b to be activated by activate b. All threads calling this wait until activate b is called. If b is already activated, wait b does nothing.
val activate : t -> unitactivate b unblocks all threads that were waiting on b.
val activated : t -> boolactivated b returns true iff activate b was called, and reset b was not called since. In other words, activated b = true means wait b will not block.
Make.Sexpval atom : string -> tCCCanonical_sexp.Maketype t = Sexp.ttype sexp = tval atom : string -> tMake an atom out of this string.
val of_int : int -> tval of_bool : bool -> tval of_float : float -> tval of_unit : tof_variant name args is used to encode algebraic variants into a S-expr. For instance of_variant "some" [of_int 1] represents the value Some 1.
val to_buf : Stdlib.Buffer.t -> t -> unitval to_string : t -> stringval to_file : string -> t -> unitval to_file_iter : string -> t CCSexp_intf.iter -> unitPrint the given iter of expressions to a file.
val to_chan : Stdlib.out_channel -> t -> unitval pp : Stdlib.Format.formatter -> t -> unitPretty-printer nice on human eyes (including indentation).
val pp_noindent : Stdlib.Format.formatter -> t -> unitRaw, direct printing as compact as possible.
val parse_string : string -> t CCSexp_intf.or_errorParse a string.
val parse_string_list : string -> t list CCSexp_intf.or_errorParse a string into a list of S-exprs.
val parse_chan : Stdlib.in_channel -> t CCSexp_intf.or_errorParse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).
val parse_chan_gen :
+ Stdlib.in_channel ->
+ t CCSexp_intf.or_error CCSexp_intf.genParse a channel into a generator of S-expressions.
val parse_chan_list : Stdlib.in_channel -> t list CCSexp_intf.or_errorval parse_file : string -> t CCSexp_intf.or_errorOpen the file and read a S-exp from it.
val parse_file_list : string -> t list CCSexp_intf.or_errorOpen the file and read a S-exp from it.
CCChar.InfixCCEqual.InfixCCEqualLabels.InfixCCFloat.InfixCCFormat.ANSI_codesANSI escape codes. This contains lower level functions for them.
A style. Styles can be composed in a list.
clear_line is an escape code to clear the current line. It is very useful for progress bars; for example:
let pp_progress i =
+ Printf.printf "%sprogress at %d%!" ANSI_codes.clear_line iif called repeatedly this will print successive progress messages on a single line.
val string_of_style : style -> stringstring_of_style st is an escape code to set the current style to st. It can be printed as is on any output that is a compatible terminal.
val string_of_style_list : style list -> stringstring_of_style_list styles is an escape code for multiple styles at once. For example string_of_style_list ANSI_codes.([`FG `Red; `BG `Green; `Bold]) is a very shiny style.
CCFormat.Dumptype 'a t = 'a printerval unit : unit tval int : int tval string : string tval bool : bool tval float : float tval char : char tval int32 : int32 tval int64 : int64 tval nativeint : nativeint tval to_string : 'a t -> 'a -> stringAlias to CCFormat.to_string.
CCFormat.InfixCCFun.Infix(f %> g) x or (%>) f g x is g (f x). Alias to compose.
(f % g) x or (%) f g x is f (g x). Mathematical composition.
let@ x = foo in bar is the equivalent of foo @@ fun x -> bar. It can be very useful for resource management, alongside with protect.
Monad.XCCFun.Monadmodule X : sig ... endtype 'a t = X.t -> 'aval return : 'a -> 'a tMonadic return.
CCHashtbl.Makeget tbl k finds a binding for the key k if present, or returns None if no value is found. Safe version of Hashtbl.find.
get_or tbl k ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in tbl).
add_list tbl x y adds y to the list x is bound to. If x is not bound, it becomes bound to y.
incr ?by tbl x increments or initializes the counter associated with x. If get tbl x = None, then after update, get tbl x = Some 1; otherwise, if get tbl x = Some n, now get tbl x = Some (n+1).
decr ?by tbl x is like incr but subtract 1 (or the value of by). If the value reaches 0, the key is removed from the table. This does nothing if the key is not already present in the table.
keys_list tbl is the list of keys in tbl. If the key is in the Hashtable multiple times, all occurrences will be returned.
val values_list : 'a t -> 'a listvalues_list t is the list of values in t.
Add the corresponding pairs to the table, using Hashtbl.add.
Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
Add the corresponding pairs to the table, using Hashtbl.add. Renamed from add_std_seq since 3.0.
Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
From the given bindings, added in order. Renamed from of_std_seq since 3.0.
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
add_iter_count tbl i increments the count of each element of i by calling incr. This is useful for counting how many times each element of i occurs.
add_seq_count tbl seq increments the count of each element of seq by calling incr. This is useful for counting how many times each element of seq occurs. Renamed from of_std_seq_count since 3.0.
Like add_seq_count, but allocates a new table and returns it.
Like add_seq_count, but allocates a new table and returns it. Renamed from of_std_seq_count since 3.0.
to_list tbl returns the list of (key,value) bindings (order unspecified).
of_list l builds a table from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, it will be added several times, and the visible binding will be the last one.
of_list l builds a table from the given list l of bindings k_i -> v_i. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
update tbl ~f ~k updates key k by calling f k (Some v) if k was mapped to v, or f k None otherwise; if the call returns None then k is removed/stays removed, if the call returns Some v' then the binding k -> v' is inserted using Hashtbl.replace.
get_or_add tbl ~k ~f finds and returns the binding of k in tbl, if it exists. If it does not exist, then f k is called to obtain a new binding v; k -> v is added to tbl and v is returned.
val pp :
+ ?pp_start:unit printer ->
+ ?pp_stop:unit printer ->
+ ?pp_sep:unit printer ->
+ ?pp_arrow:unit printer ->
+ key printer ->
+ 'a printer ->
+ 'a t printerpp ~pp_start ~pp_stop ~pp_sep ~pp arrow pp_k pp_v returns a table printer given a pp_k printer for individual key and a pp_v printer for individual value. pp_start and pp_stop control the opening and closing delimiters, by default print nothing. pp_sep control the separator between binding. pp_arrow control the arrow between the key and value. Renamed from print since 2.0.
CCHashtbl.Polyget tbl k finds a binding for the key k if present, or returns None if no value is found. Safe version of Hashtbl.find.
get_or tbl k ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in tbl).
val keys : ('a, 'b) Stdlib.Hashtbl.t -> 'a iterkeys tbl f iterates on keys (similar order as Hashtbl.iter).
val values : ('a, 'b) Stdlib.Hashtbl.t -> 'b itervalues tbl f iterates on values in the table tbl.
keys_list tbl is the list of keys in tbl. If the key is in the Hashtable multiple times, all occurrences will be returned.
map_list f tbl maps on a tbl's items. Collect into a list.
incr ?by tbl x increments or initializes the counter associated with x. If get tbl x = None, then after update, get tbl x = Some 1; otherwise, if get tbl x = Some n, now get tbl x = Some (n+1).
decr ?by tbl x is like incr but subtract 1 (or the value of by). If the value reaches 0, the key is removed from the table. This does nothing if the key is not already present in the table.
val to_iter : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) iterIterate on bindings in the table.
add_list tbl x y adds y to the list x is bound to. If x is not bound, it becomes bound to y.
val add_iter : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) iter -> unitAdd the corresponding pairs to the table, using Hashtbl.add.
val add_iter_with :
+ f:('a -> 'b -> 'b -> 'b) ->
+ ('a, 'b) Stdlib.Hashtbl.t ->
+ ('a * 'b) iter ->
+ unitAdd the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
Add the corresponding pairs to the table, using Hashtbl.add. Renamed from add_std_seq since 3.0.
val add_seq_with :
+ f:('a -> 'b -> 'b -> 'b) ->
+ ('a, 'b) Stdlib.Hashtbl.t ->
+ ('a * 'b) Stdlib.Seq.t ->
+ unitAdd the corresponding pairs to the table. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
val of_iter : ('a * 'b) iter -> ('a, 'b) Stdlib.Hashtbl.tFrom the given bindings, added in order.
val of_iter_with :
+ f:('a -> 'b -> 'b -> 'b) ->
+ ('a * 'b) iter ->
+ ('a, 'b) Stdlib.Hashtbl.tFrom the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
From the given bindings, added in order. Renamed from of_std_seq since 3.0.
val of_seq_with :
+ f:('a -> 'b -> 'b -> 'b) ->
+ ('a * 'b) Stdlib.Seq.t ->
+ ('a, 'b) Stdlib.Hashtbl.tFrom the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
val add_iter_count : ('a, int) Stdlib.Hashtbl.t -> 'a iter -> unitadd_iter_count tbl i increments the count of each element of i by calling incr. This is useful for counting how many times each element of i occurs.
add_seq_count tbl seq increments the count of each element of seq by calling incr. This is useful for counting how many times each element of seq occurs. Renamed from add_std_seq_count since 3.0.
val of_iter_count : 'a iter -> ('a, int) Stdlib.Hashtbl.tLike add_seq_count, but allocates a new table and returns it.
Like add_seq_count, but allocates a new table and returns it. Renamed from of_std_seq_count since 3.0.
to_list tbl returns the list of (key,value) bindings (order unspecified).
of_list l builds a table from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, it will be added several times, and the visible binding will be the last one.
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
update tbl ~f ~k updates key k by calling f k (Some v) if k was mapped to v, or f k None otherwise; if the call returns None then k is removed/stays removed, if the call returns Some v' then the binding k -> v' is inserted using Hashtbl.replace.
get_or_add tbl ~k ~f finds and returns the binding of k in tbl, if it exists. If it does not exist, then f k is called to obtain a new binding v; k -> v is added to tbl and v is returned.
val pp :
+ ?pp_start:unit printer ->
+ ?pp_stop:unit printer ->
+ ?pp_sep:unit printer ->
+ ?pp_arrow:unit printer ->
+ 'a printer ->
+ 'b printer ->
+ ('a, 'b) Stdlib.Hashtbl.t printerpp ~pp_start ~pp_stop ~pp_sep ~pp arrow pp_k pp_v returns a table printer given a pp_k printer for individual key and a pp_v printer for individual value. pp_start and pp_stop control the opening and closing delimiters, by default print nothing. pp_sep control the separator between binding. pp_arrow control the arrow between the key and value. Renamed from print since 2.0.
CCHashtbl.Sget tbl k finds a binding for the key k if present, or returns None if no value is found. Safe version of Hashtbl.find.
get_or tbl k ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in tbl).
add_list tbl x y adds y to the list x is bound to. If x is not bound, it becomes bound to y.
incr ?by tbl x increments or initializes the counter associated with x. If get tbl x = None, then after update, get tbl x = Some 1; otherwise, if get tbl x = Some n, now get tbl x = Some (n+1).
decr ?by tbl x is like incr but subtract 1 (or the value of by). If the value reaches 0, the key is removed from the table. This does nothing if the key is not already present in the table.
keys_list tbl is the list of keys in tbl. If the key is in the Hashtable multiple times, all occurrences will be returned.
val values_list : 'a t -> 'a listvalues_list t is the list of values in t.
Add the corresponding pairs to the table, using Hashtbl.add.
Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
Add the corresponding pairs to the table, using Hashtbl.add. Renamed from add_std_seq since 3.0.
Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
From the given bindings, added in order. Renamed from of_std_seq since 3.0.
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
add_iter_count tbl i increments the count of each element of i by calling incr. This is useful for counting how many times each element of i occurs.
add_seq_count tbl seq increments the count of each element of seq by calling incr. This is useful for counting how many times each element of seq occurs. Renamed from of_std_seq_count since 3.0.
Like add_seq_count, but allocates a new table and returns it.
Like add_seq_count, but allocates a new table and returns it. Renamed from of_std_seq_count since 3.0.
to_list tbl returns the list of (key,value) bindings (order unspecified).
of_list l builds a table from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, it will be added several times, and the visible binding will be the last one.
of_list l builds a table from the given list l of bindings k_i -> v_i. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
update tbl ~f ~k updates key k by calling f k (Some v) if k was mapped to v, or f k None otherwise; if the call returns None then k is removed/stays removed, if the call returns Some v' then the binding k -> v' is inserted using Hashtbl.replace.
get_or_add tbl ~k ~f finds and returns the binding of k in tbl, if it exists. If it does not exist, then f k is called to obtain a new binding v; k -> v is added to tbl and v is returned.
val pp :
+ ?pp_start:unit printer ->
+ ?pp_stop:unit printer ->
+ ?pp_sep:unit printer ->
+ ?pp_arrow:unit printer ->
+ key printer ->
+ 'a printer ->
+ 'a t printerpp ~pp_start ~pp_stop ~pp_sep ~pp arrow pp_k pp_v returns a table printer given a pp_k printer for individual key and a pp_v printer for individual value. pp_start and pp_stop control the opening and closing delimiters, by default print nothing. pp_sep control the separator between binding. pp_arrow control the arrow between the key and value. Renamed from print since 2.0.
CCIO.FileA file should be represented by its absolute path, but currently this is not enforced.
val to_string : t -> stringval make : string -> tBuild a file representation from a path (absolute or relative).
val exists : t -> boolval is_directory : t -> boolval remove_exn : t -> unitremove_exn path tries to remove the file at path from the file system.
val remove_noerr : t -> unitLike remove_exn but do not raise any exception on failure.
read_dir d returns a sequence of files and directory contained in the directory d (or an empty stream if d is not a directory).
val read_exn : t -> stringRead the content of the given file, or raises some exception.
val append_exn : t -> string -> unitAppend the given string into the given file, possibly raising.
val write_exn : t -> string -> unitWrite the given string into the given file, possibly raising.
type walk_item = [ `File | `Dir ] * tLike read_dir (with recurse=true), this function walks a directory recursively and yields either files or directories. Is a file anything that doesn't satisfy is_directory (including symlinks, etc.)
Like walk but returns a list (therefore it's eager and might take some time on large directories).
val show_walk_item : walk_item -> stringval with_temp :
+ ?temp_dir:string ->
+ prefix:string ->
+ suffix:string ->
+ (string -> 'a) ->
+ 'awith_temp ~prefix ~suffix f will call f with the name of a new temporary file (located in temp_dir). After f returns, the file is deleted. Best to be used in combination with with_out. See Filename.temp_file.
CCInt32.Infixx / y is the integer quotient of x and y. Integer division. Raise Division_by_zero if the second argument y is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).
x mod y is the integer remainder of x / y. If y <> zero, the result of x mod y satisfies the following properties: zero <= x mod y < abs y and x = ((x / y) * y) + (x mod y). If y = 0, x mod y raises Division_by_zero.
x lsl y shifts x to the left by y bits, filling in with zeroes. The result is unspecified if y < 0 or y >= 32.
x lsr y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= 32.
x asr y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= 32.
CCInt64.Infixx / y is the integer quotient of x and y. Integer division. Raise Division_by_zero if the second argument y is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).
x mod y is the integer remainder of x / y. If y <> zero, the result of x mod y satisfies the following properties: zero <= x mod y < abs y and x = ((x / y) * y) + (x mod y). If y = 0, x mod y raises Division_by_zero.
x lsl y shifts x to the left by y bits, filling in with zeroes. The result is unspecified if y < 0 or y >= 64.
x lsr y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= 64.
x asr y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= 64.
CCMap.Makeget k m returns Some v if the current binding of k in m is v, or None if the key k is not present. Safe version of find.
get_or k m ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in m).
update k f m calls f (Some v) if find k m = v, otherwise it calls f None. In any case, if the result is None k is removed from m, and if the result is Some v' then add k v' m is returned.
choose_opt m returns one binding of the given map m, or None if m is empty. Safe version of choose.
min_binding_opt m returns the smallest binding of the given map m, or None if m is empty. Safe version of min_binding.
max_binding_opt m returns the largest binding of the given map m, or None if m is empty. Safe version of max_binding.
find_opt k m returns Some v if the current binding of k in m is v, or None if the key k is not present. Safe version of find.
find_first f m where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists. See Map.S.find_first.
find_first_opt f m where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists. Safe version of find_first.
val merge_safe :
+ f:(key -> [ `Left of 'a | `Right of 'b | `Both of 'a * 'b ] -> 'c option) ->
+ 'a t ->
+ 'b t ->
+ 'c tmerge_safe ~f a b merges the maps a and b together.
add_seq m seq adds the given Seq.t of bindings to the map m. Like add_list. Renamed from add_std_seq since 3.0.
add_seq ~f m l adds the given seq l of bindings to the map m, using f to combine values that have the same key. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.
of_seq seq builds a map from the given Seq.t of bindings. Like of_list. Renamed from of_std_seq since 3.0.
of_seq_with ~f l builds a map from the given seq l of bindings k_i -> v_i, added in order using add. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.
add_iter m iter adds the given iter of bindings to the map m. Like add_list.
add_iter ~f m l adds the given iter l of bindings to the map m, using f to combine values that have the same key. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.
of_iter iter builds a map from the given iter of bindings. Like of_list.
of_iter_with ~f l builds a map from the given iter l of bindings k_i -> v_i, added in order using add. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the iter than v2.
to_iter m iterates on the whole map m, creating an iter of bindings. Like to_list.
of_list l builds a map from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, only its last binding will be present in the result.
of_list_with ~f l builds a map from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the list than v2.
add_list m l adds the given list l of bindings to the map m.
add_list ~f m l adds the given list l of bindings to the map m, using f to combine values that have the same key. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.
to_list m builds a list of the bindings of the given map m. The order is unspecified.
CCMap.Sget k m returns Some v if the current binding of k in m is v, or None if the key k is not present. Safe version of find.
get_or k m ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in m).
update k f m calls f (Some v) if find k m = v, otherwise it calls f None. In any case, if the result is None k is removed from m, and if the result is Some v' then add k v' m is returned.
choose_opt m returns one binding of the given map m, or None if m is empty. Safe version of choose.
min_binding_opt m returns the smallest binding of the given map m, or None if m is empty. Safe version of min_binding.
max_binding_opt m returns the largest binding of the given map m, or None if m is empty. Safe version of max_binding.
find_opt k m returns Some v if the current binding of k in m is v, or None if the key k is not present. Safe version of find.
find_first f m where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists. See Map.S.find_first.
find_first_opt f m where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists. Safe version of find_first.
val merge_safe :
+ f:(key -> [ `Left of 'a | `Right of 'b | `Both of 'a * 'b ] -> 'c option) ->
+ 'a t ->
+ 'b t ->
+ 'c tmerge_safe ~f a b merges the maps a and b together.
add_seq m seq adds the given Seq.t of bindings to the map m. Like add_list. Renamed from add_std_seq since 3.0.
add_seq ~f m l adds the given seq l of bindings to the map m, using f to combine values that have the same key. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.
of_seq seq builds a map from the given Seq.t of bindings. Like of_list. Renamed from of_std_seq since 3.0.
of_seq_with ~f l builds a map from the given seq l of bindings k_i -> v_i, added in order using add. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.
add_iter m iter adds the given iter of bindings to the map m. Like add_list.
add_iter ~f m l adds the given iter l of bindings to the map m, using f to combine values that have the same key. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.
of_iter iter builds a map from the given iter of bindings. Like of_list.
of_iter_with ~f l builds a map from the given iter l of bindings k_i -> v_i, added in order using add. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the iter than v2.
to_iter m iterates on the whole map m, creating an iter of bindings. Like to_list.
of_list l builds a map from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, only its last binding will be present in the result.
of_list_with ~f l builds a map from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the list than v2.
add_list m l adds the given list l of bindings to the map m.
add_list ~f m l adds the given list l of bindings to the map m, using f to combine values that have the same key. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.
to_list m builds a list of the bindings of the given map m. The order is unspecified.
CCNativeint.Infixx / y is the integer quotient of x and y. Integer division. Raise Division_by_zero if the second argument y is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).
x mod y is the integer remainder of x / y. If y <> zero, the result of x mod y satisfies the following properties: zero <= x mod y < abs y and x = ((x / y) * y) + (x mod y). If y = 0, x mod y raises Division_by_zero.
x lsl y shifts x to the left by y bits. The result is unspecified if y < 0 or y >= bitsize, where bitsize is 32 on a 32-bit platform and 64 on a 64-bit platform.
x lsr y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= bitsize.
x asr y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= bitsize.
CCOrd.Infixval (<?>) : int -> ('a t * 'a * 'a) -> intc1 <?> (ord, x, y) returns the same as c1 if c1 is not 0; otherwise it uses ord to compare the two values x and y, of type 'a.
CCResult.InfixMonadic composition. e >>= f proceeds as f x if e is Ok x or returns e if e is an Error.
a <*> b evaluates a and b, and, in case of success, returns Ok (a b). Otherwise, it fails, and the error of a is chosen over the error of b if both fail.
Traverse.Mval return : 'a -> 'a tMonadic return.
CCResult.TraverseCCResult.MONADval return : 'a -> 'a tMonadic return.
CCSet.MakeSafe version of find_first.
CCSet.SSafe version of find_first.
CCSexp.Decoderval of_lexbuf : Stdlib.Lexing.lexbuf -> tval next : t -> sexp parse_resultParse the next S-expression or return an error if the input isn't long enough or isn't a proper S-expression.
val to_list : t -> sexp list CCSexp_intf.or_errorRead all the values from this decoder.
Make.Decoderval of_lexbuf : Stdlib.Lexing.lexbuf -> tval next : t -> sexp parse_resultParse the next S-expression or return an error if the input isn't long enough or isn't a proper S-expression.
val to_list : t -> sexp list CCSexp_intf.or_errorRead all the values from this decoder.
Make.Sexpval make_loc : ((int * int) -> (int * int) -> string -> loc) optionIf provided, builds a location from a pair of (line,column) positions, and a (possibly dummy) filename
CCSexp.MakeThis builds a parser and printer for S-expressions represented as in the Sexp argument.
include CCSexp_intf.S0 with type t = Sexp.ttype t = Sexp.ttype sexp = tval atom : string -> tMake an atom out of this string.
val of_int : int -> tval of_bool : bool -> tval of_float : float -> tval of_unit : tof_variant name args is used to encode algebraic variants into a S-expr. For instance of_variant "some" [of_int 1] represents the value Some 1.
val to_buf : Stdlib.Buffer.t -> t -> unitval to_string : t -> stringval to_file : string -> t -> unitval to_file_iter : string -> t CCSexp_intf.iter -> unitPrint the given iter of expressions to a file.
val to_chan : Stdlib.out_channel -> t -> unitval pp : Stdlib.Format.formatter -> t -> unitPretty-printer nice on human eyes (including indentation).
val pp_noindent : Stdlib.Format.formatter -> t -> unitRaw, direct printing as compact as possible.
val parse_string : string -> t CCSexp_intf.or_errorParse a string.
val parse_string_list : string -> t list CCSexp_intf.or_errorParse a string into a list of S-exprs.
val parse_chan : Stdlib.in_channel -> t CCSexp_intf.or_errorParse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).
val parse_chan_gen :
+ Stdlib.in_channel ->
+ t CCSexp_intf.or_error CCSexp_intf.genParse a channel into a generator of S-expressions.
val parse_chan_list : Stdlib.in_channel -> t list CCSexp_intf.or_errorval parse_file : string -> t CCSexp_intf.or_errorOpen the file and read a S-exp from it.
val parse_file_list : string -> t list CCSexp_intf.or_errorOpen the file and read a S-exp from it.
type loc = Sexp.locLocations for the S-expressions.
A parser of 'a can return Yield x when it parsed a value, or Fail e when a parse error was encountered, or End if the input was empty.
module Decoder : sig ... endCCSexp_intf.BASIC_SEXPval atom : string -> tS.Decoderval of_lexbuf : Stdlib.Lexing.lexbuf -> tval next : t -> sexp parse_resultParse the next S-expression or return an error if the input isn't long enough or isn't a proper S-expression.
CCSexp_intf.Sinclude S0type sexp = tval atom : string -> tMake an atom out of this string.
val of_int : int -> tval of_bool : bool -> tval of_float : float -> tval of_unit : tof_variant name args is used to encode algebraic variants into a S-expr. For instance of_variant "some" [of_int 1] represents the value Some 1.
val to_buf : Stdlib.Buffer.t -> t -> unitval to_string : t -> stringval to_file : string -> t -> unitval to_chan : Stdlib.out_channel -> t -> unitval pp : Stdlib.Format.formatter -> t -> unitPretty-printer nice on human eyes (including indentation).
val pp_noindent : Stdlib.Format.formatter -> t -> unitRaw, direct printing as compact as possible.
Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).
Parse a channel into a generator of S-expressions.
A parser of 'a can return Yield x when it parsed a value, or Fail e when a parse error was encountered, or End if the input was empty.
module Decoder : sig ... endCCSexp_intf.S0type sexp = tval atom : string -> tMake an atom out of this string.
val of_int : int -> tval of_bool : bool -> tval of_float : float -> tval of_unit : tof_variant name args is used to encode algebraic variants into a S-expr. For instance of_variant "some" [of_int 1] represents the value Some 1.
val to_buf : Stdlib.Buffer.t -> t -> unitval to_string : t -> stringval to_file : string -> t -> unitval to_chan : Stdlib.out_channel -> t -> unitval pp : Stdlib.Format.formatter -> t -> unitPretty-printer nice on human eyes (including indentation).
val pp_noindent : Stdlib.Format.formatter -> t -> unitRaw, direct printing as compact as possible.
Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).
Parse a channel into a generator of S-expressions.
CCSexp_intf.SEXPval make_loc : ((int * int) -> (int * int) -> string -> loc) optionIf provided, builds a location from a pair of (line,column) positions, and a (possibly dummy) filename
CCUnix.Infixval (?|) : ('a, Stdlib.Buffer.t, unit, call_result) Stdlib.format4 -> 'aInfix version of call.
val (?|&) : ('a, Stdlib.Buffer.t, unit, async_call_result) Stdlib.format4 -> 'aInfix version of async_call.
Containers_bencode.DecodeDecoding
Containers_bencode.EncodeEncoding
val to_string : t -> stringval to_buffer : Stdlib.Buffer.t -> t -> unitval to_chan : Stdlib.out_channel -> t -> unitval to_fmt : Stdlib.Format.formatter -> t -> unitContainers_bencode.Str_mapContainers_codegen.Bitfieldval make : ?emit_failure_if_too_wide:bool -> name:string -> unit -> tMake a new bitfield with the given name.
val field_bit : t -> string -> unitfield_bit ty name adds a field of size 1 to the bitfield ty, with name name. The generate code will provide get/set for a boolean.
val field_int : t -> width:int -> string -> unitfield_int ty name ~width adds a field of size width to the bitfield with name name. The accessors will be for integers of width bits, and the setter might assert that the provided integer fits.
val total_width : t -> intTotal width in bits of the given bitfield.
Containers_codegen.Codetype t = codeval pp : t Fmt.printerval to_string : t -> stringval mk_pp : unit Fmt.printer -> tval mk_str : string -> tMake.AContainers_scc.MakeContainers_scc.ARGS.AContainers_scc.S0&&(t="."===(t=e)?null:t),t};ot({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler:function(e,t){var r,n=e.parser,a=t[4],i=t[5],o=lt(t[0]),s="atom"===o.type&&"open"===o.family?sn(o.text):null,l=lt(t[1]),h="atom"===l.type&&"close"===l.family?sn(l.text):null,m=Ut(t[2],"size"),c=null;r=!!m.isBlank||(c=m.value).number>0;var u="auto",p=t[3];if("ordgroup"===p.type){if(p.body.length>0){var d=Ut(p.body[0],"textord");u=on[Number(d.text)]}}else p=Ut(p,"textord"),u=on[Number(p.text)];return{type:"genfrac",mode:n.mode,numer:a,denom:i,continued:!1,hasBarLine:r,barSize:c,leftDelim:s,rightDelim:h,size:u}},htmlBuilder:nn,mathmlBuilder:an}),ot({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(e,t){var r=e.parser,n=(e.funcName,e.token);return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Ut(t[0],"size").value,token:n}}}),ot({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(e,t){var r=e.parser,n=(e.funcName,t[0]),a=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(Ut(t[1],"infix").size),i=t[2],o=a.number>0;return{type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:o,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:nn,mathmlBuilder:an});var ln=function(e,t){var r,n,a=t.style;"supsub"===e.type?(r=e.sup?wt(e.sup,t.havingStyle(a.sup()),t):wt(e.sub,t.havingStyle(a.sub()),t),n=Ut(e.base,"horizBrace")):n=Ut(e,"horizBrace");var i,o=wt(n.base,t.havingBaseStyle(x.DISPLAY)),s=Gt(n,t);if(n.isOver?(i=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(i=Ke.makeVList({positionType:"bottom",positionData:o.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},t)).children[0].children[0].children[0].classes.push("svg-align"),r){var l=Ke.makeSpan(["mord",n.isOver?"mover":"munder"],[i],t);i=n.isOver?Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]},t):Ke.makeVList({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return Ke.makeSpan(["mord",n.isOver?"mover":"munder"],[i],t)};ot({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=e.funcName;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:t[0]}},htmlBuilder:ln,mathmlBuilder:function(e,t){var r=Vt(e.label);return new Tt.MathNode(e.isOver?"mover":"munder",[Rt(e.base,t),r])}}),ot({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(e,t){var r=e.parser,n=t[1],a=Ut(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:a})?{type:"href",mode:r.mode,href:a,body:ht(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:function(e,t){var r=ft(e.body,t,!1);return Ke.makeAnchor(e.href,[],r,t)},mathmlBuilder:function(e,t){var r=It(e.body,t);return r instanceof zt||(r=new zt("mrow",[r])),r.setAttribute("href",e.href),r}}),ot({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(e,t){var r=e.parser,n=Ut(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var a=[],i=0;i0&&(u+=M,p-=M)}var z=[{type:"elem",elem:a,shift:p,marginRight:y,marginLeft:w},{type:"elem",elem:n,shift:-u,marginRight:y}];v=Ke.makeVList({positionType:"individualShift",children:z},t)}else if(a){p=Math.max(p,c.sub1,a.height-.8*c.xHeight);var A=[{type:"elem",elem:a,marginLeft:w,marginRight:y}];v=Ke.makeVList({positionType:"shift",positionData:p,children:A},t)}else{if(!n)throw new Error("supsub must have either sup or sub.");u=Math.max(u,i,n.depth+.25*c.xHeight),v=Ke.makeVList({positionType:"shift",positionData:-u,children:[{type:"elem",elem:n,marginRight:y}]},t)}var T=yt(m,"right")||"mord";return Ke.makeSpan([T],[m,Ke.makeSpan(["msupsub"],[v])],t)},mathmlBuilder:function(e,t){var r,n=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(n=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var a,i=[Rt(e.base,t)];if(e.sub&&i.push(Rt(e.sub,t)),e.sup&&i.push(Rt(e.sup,t)),n)a=r?"mover":"munder";else if(e.sub)if(e.sup){var o=e.base;a=o&&"op"===o.type&&o.limits&&t.style===x.DISPLAY||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(t.style===x.DISPLAY||o.limits)?"munderover":"msubsup"}else{var s=e.base;a=s&&"op"===s.type&&s.limits&&(t.style===x.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===x.DISPLAY)?"munder":"msub"}else{var l=e.base;a=l&&"op"===l.type&&l.limits&&(t.style===x.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===x.DISPLAY)?"mover":"msup"}return new Tt.MathNode(a,i)}}),st({type:"atom",htmlBuilder:function(e,t){return Ke.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mo",[Bt(e.text,e.mode)]);if("bin"===e.family){var n=qt(e,t);"bold-italic"===n&&r.setAttribute("mathvariant",n)}else"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false");return r}});var kn={mi:"italic",mn:"normal",mtext:"normal"};st({type:"mathord",htmlBuilder:function(e,t){return Ke.makeOrd(e,t,"mathord")},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mi",[Bt(e.text,e.mode,t)]),n=qt(e,t)||"italic";return n!==kn[r.type]&&r.setAttribute("mathvariant",n),r}}),st({type:"textord",htmlBuilder:function(e,t){return Ke.makeOrd(e,t,"textord")},mathmlBuilder:function(e,t){var r,n=Bt(e.text,e.mode,t),a=qt(e,t)||"normal";return r="text"===e.mode?new Tt.MathNode("mtext",[n]):/[0-9]/.test(e.text)?new Tt.MathNode("mn",[n]):"\\prime"===e.text?new Tt.MathNode("mo",[n]):new Tt.MathNode("mi",[n]),a!==kn[r.type]&&r.setAttribute("mathvariant",a),r}});var Sn={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Mn={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};st({type:"spacing",htmlBuilder:function(e,t){if(Mn.hasOwnProperty(e.text)){var r=Mn[e.text].className||"";if("text"===e.mode){var a=Ke.makeOrd(e,t,"textord");return a.classes.push(r),a}return Ke.makeSpan(["mspace",r],[Ke.mathsym(e.text,e.mode,t)],t)}if(Sn.hasOwnProperty(e.text))return Ke.makeSpan(["mspace",Sn[e.text]],[],t);throw new n('Unknown type of space "'+e.text+'"')},mathmlBuilder:function(e,t){if(!Mn.hasOwnProperty(e.text)){if(Sn.hasOwnProperty(e.text))return new Tt.MathNode("mspace");throw new n('Unknown type of space "'+e.text+'"')}return new Tt.MathNode("mtext",[new Tt.TextNode("\xa0")])}});var zn=function(){var e=new Tt.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};st({type:"tag",mathmlBuilder:function(e,t){var r=new Tt.MathNode("mtable",[new Tt.MathNode("mtr",[zn(),new Tt.MathNode("mtd",[It(e.body,t)]),zn(),new Tt.MathNode("mtd",[It(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var An={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Tn={"\\textbf":"textbf","\\textmd":"textmd"},Bn={"\\textit":"textit","\\textup":"textup"},Cn=function(e,t){var r=e.font;return r?An[r]?t.withTextFontFamily(An[r]):Tn[r]?t.withTextFontWeight(Tn[r]):t.withTextFontShape(Bn[r]):t};ot({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"text",mode:r.mode,body:ht(a),font:n}},htmlBuilder:function(e,t){var r=Cn(e,t),n=ft(e.body,r,!0);return Ke.makeSpan(["mord","text"],n,r)},mathmlBuilder:function(e,t){var r=Cn(e,t);return It(e.body,r)}}),ot({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){return{type:"underline",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var r=wt(e.body,t),n=Ke.makeLineSpan("underline-line",t),a=t.fontMetrics().defaultRuleThickness,i=Ke.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:a},{type:"elem",elem:n},{type:"kern",size:3*a},{type:"elem",elem:r}]},t);return Ke.makeSpan(["mord","underline"],[i],t)},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mo",[new Tt.TextNode("\u203e")]);r.setAttribute("stretchy","true");var n=new Tt.MathNode("munder",[Rt(e.body,t),r]);return n.setAttribute("accentunder","true"),n}}),ot({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler:function(e,t){return{type:"vcenter",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var r=wt(e.body,t),n=t.fontMetrics().axisHeight,a=.5*(r.height-n-(r.depth+n));return Ke.makeVList({positionType:"shift",positionData:a,children:[{type:"elem",elem:r}]},t)},mathmlBuilder:function(e,t){return new Tt.MathNode("mpadded",[Rt(e.body,t)],["vcenter"])}}),ot({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(e,t,r){throw new n("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(e,t){for(var r=qn(e),n=[],a=t.havingStyle(t.style.text()),i=0;i