diff --git a/adix.html b/adix.html new file mode 100644 index 0000000..8055e2f --- /dev/null +++ b/adix.html @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + +adix + + + + + + + + +
+
+

adix

+
+
+
+ +     Dark Mode +
+ +
+ Search: +
+
+ Group by: + +
+ + +
+   Source +  Edit + + +
+ +
+ +
+
+
+ + + diff --git a/adix/althash.html b/adix/althash.html new file mode 100644 index 0000000..0ba2846 --- /dev/null +++ b/adix/althash.html @@ -0,0 +1,541 @@ + + + + + + + + + + + + + + + + + + +adix/althash + + + + + + + + +
+
+

adix/althash

+
+
+
+ +     Dark Mode +
+ +
+ Search: +
+
+ Group by: + +
+ + +
+   Source +  Edit + +
+
+ +

This module provides several alternative hashes to the Nim stdlib targeting high entropy in low order bits for and mask conversion to a table index. Activate via e.g., proc hash(x: K): Hash {.inline.} = hashRoMu1(x), where K is your integer key type.

+

The fastest hash used here is a likely the multiply & rotate hash (lately called a "Fibonacci hash", after Knuth's golden ratio fascination. Knuth immediately, in context, shows it works for any irrational number and then computer arithmetic is finite anyway). This propagates entropy in key bits to the double-width product in a Pascal's Binomial Triangle sort of pattern. Middle bits have the most key related entropy (there is even a PRNG method called "middle square" based on this pattern). More specifically, consider the product of a pair of 2 digit decimal numbers: (a1*10+a0)*(b1*10+b0) = a1*b1*100 + (a1*b0+b0*a1)*10 + a0*b0. This shows the "triangle" kind of pattern that makes the mixing strongest in the middle.

+

The full product is easily accessed for half CPU register width and narrower numbers. For the widest integer type, C/backend arithmetic rules only give the modulus|lower order bits of said product (x86/amd64 does make the upper word available in another register). hashRoMu1 takes the simple portable way out and discards half of key entropy, just rotating down the more well mixed bits (bit reversal might be better, though expensive compared to rotr). Reducing hash codes to table address via shr is another way out. Getting high order avalanche is more natural than the low order avalanche needed for and mask, both may be https://burtleburtle.net/bob/hash/integer.html's "half avalanche". Anyway, rotating is portably fast (often 1 cycle latency, 1-per cycle tput for an immediate constant number of bits). Bit reversal is not so slow using a fully unrolled loop and 16 entry nibble lookup table. Different hashes will perform more/less well on different data. So, we just provide a few here, and one is based upon highly non-linear bit reversal.

+

A stronger hash is hashWangYi1 which passes SMHasher's entropy tests, but "funnels" 64 inputs into about 62-bits of output entropy. It is still the default Hash-rehasher since it is fast & tables with 2^62 entries are rare. WangYi1's primitive is the xor of the high & low parts of a double-width product of a salt with a key. The xor blends well-mixed low order bits of the high output product word with less well-mixed low order bits of the low output product word, yielding "mostly level" mixing across all bits of the hash. WangYi1 takes two rounds of such mixing to achieve avalanche. It may be possible to "nearly pass" in only one round. hashWY0 is one attempt at that, but the salt may need to be re-optimized to have any hope of doing well on SMHasher. This hash became the default hash(int) in Nim stdlib.

+

There is a motley selection of other hashes here. The strongest fast hash is Pelle Evensen's bijective (64-bits -> 64-bits) hashNASAM. It's 2-3x slower than WangYi1 on some CPU architectures, but has no known statistical flaws.

+

Incidentally, most "fast in GB/s" hashes are far too slow for just one int. Even assessing them so is misleading for lookup tables. You want time =~ a + b*nBytes where a & b maybe come from line regressions. 1/b alone says too little, especially for integer keys where a dominates. Short string hashes or a alone can similarly mislead. TLDR, want >=2 "summary numbers" not one & whole curves are best.

+

+
+

Imports

+
+bitop +
+
+

Vars

+
+
+
getSalt = vmaddrSalt
+
+ + +  Source +  Edit + +
+
+ +
+
+

Procs

+
+
+
proc hash(hsh, salt: Hash): Hash {.inline, ...raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc hashDegski[T: Ordinal | enum](x: T): Hash {.inline.}
+
+ +https://gist.github.com/degski/6e2069d6035ae04d5d6f64981c995ec2 +  Source +  Edit + +
+
+
+
proc hashIdentity[T: Ordinal | enum](x: T): Hash {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc hashMoreMur[T: Ordinal | enum](x: T): Hash {.inline.}
+
+ +This is from https://github.com/tommyettinger +  Source +  Edit + +
+
+
+
proc hashNASAM[T: Ordinal | enum](x: T): Hash {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc hashRevFib(x: int32 | uint32): Hash {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc hashRevFib(x: int64 | uint64): Hash {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc hashRevFib(x: uint): Hash {.inline, ...raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc hashRoMu1(x: SomeOrdinal | Hash): Hash {.inline.}
+
+ +1-hop of Romul-DuoJr using x as seed +  Source +  Edit + +
+
+
+
proc hashRoMu1(x: uint): Hash {.inline, ...raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc hashRoMu2(x: SomeOrdinal | Hash): Hash {.inline.}
+
+ +Just the cross terms of 128-bit whole product +  Source +  Edit + +
+
+
+
proc hashSplit64[T: Ordinal | enum](x: T): Hash {.inline.}
+
+ +https://nullprogram.com/blog/2018/07/31/ +  Source +  Edit + +
+
+
+
proc hashSplitMix[T: Ordinal | enum](x: T): Hash {.inline.}
+
+ +This is one hop of a PRNG. For more information on the PRNG part see http://docs.oracle.com/javase/8/docs/api/java/util/SplittableRandom.html +  Source +  Edit + +
+
+
+
proc hashWangYi1[T: Ordinal | enum](x: T): Hash {.inline.}
+
+ +Wang Yi's hash_v1 for 8B int. https://github.com/rurban/smhasher has more details. This passed all scrambling tests in Spring 2019 and is simple. NOTE: It's ok to define proc(x:int16): Hash=hashWangYi1(cast[Hash](x)). +  Source +  Edit + +
+
+
+
proc hashWY0[T: Ordinal | enum](x: T): Hash {.inline.}
+
+ +A slightly simplified/early version of Wang Yi's hash for 8B ints. Faster, but less scrambling. Definitely has some easy weak spots. +  Source +  Edit + +
+
+
+
proc normalized[T](x: openArray[T]): seq[float]
+
+ + +  Source +  Edit + +
+
+
+
proc raiseNotFound[K](key: K)
+
+ + +  Source +  Edit + +
+
+
+
proc secureSalt(x: pointer): Hash {.inline, ...raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc vmaddrSalt(x: pointer): Hash {.inline, ...raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc zeroSalt(x: pointer): Hash {.inline, ...raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+ +
+
+

Templates

+
+
+
template dbg(x)
+
+ + +  Source +  Edit + +
+
+ +
+ +
+
+ +
+ +
+
+
+ + + diff --git a/adix/althash.idx b/adix/althash.idx new file mode 100644 index 0000000..6651c64 --- /dev/null +++ b/adix/althash.idx @@ -0,0 +1,22 @@ +hashRoMu1 adix/althash.html#hashRoMu1 althash: hashRoMu1(x: SomeOrdinal | Hash): Hash +hashRoMu2 adix/althash.html#hashRoMu2 althash: hashRoMu2(x: SomeOrdinal | Hash): Hash +hashWangYi1 adix/althash.html#hashWangYi1,T althash: hashWangYi1[T: Ordinal | enum](x: T): Hash +hashWY0 adix/althash.html#hashWY0,T althash: hashWY0[T: Ordinal | enum](x: T): Hash +hashMoreMur adix/althash.html#hashMoreMur,T althash: hashMoreMur[T: Ordinal | enum](x: T): Hash +hashNASAM adix/althash.html#hashNASAM,T althash: hashNASAM[T: Ordinal | enum](x: T): Hash +hashIdentity adix/althash.html#hashIdentity,T althash: hashIdentity[T: Ordinal | enum](x: T): Hash +hashSplitMix adix/althash.html#hashSplitMix,T althash: hashSplitMix[T: Ordinal | enum](x: T): Hash +hashSplit64 adix/althash.html#hashSplit64,T althash: hashSplit64[T: Ordinal | enum](x: T): Hash +hashDegski adix/althash.html#hashDegski,T althash: hashDegski[T: Ordinal | enum](x: T): Hash +hashRevFib adix/althash.html#hashRevFib althash: hashRevFib(x: int32 | uint32): Hash +hashRevFib adix/althash.html#hashRevFib_2 althash: hashRevFib(x: int64 | uint64): Hash +secureSalt adix/althash.html#secureSalt,pointer althash: secureSalt(x: pointer): Hash +vmaddrSalt adix/althash.html#vmaddrSalt,pointer althash: vmaddrSalt(x: pointer): Hash +zeroSalt adix/althash.html#zeroSalt,pointer althash: zeroSalt(x: pointer): Hash +getSalt adix/althash.html#getSalt althash: getSalt +hashRoMu1 adix/althash.html#hashRoMu1,uint althash: hashRoMu1(x: uint): Hash +hashRevFib adix/althash.html#hashRevFib,uint althash: hashRevFib(x: uint): Hash +hash adix/althash.html#hash,Hash,Hash althash: hash(hsh, salt: Hash): Hash +dbg adix/althash.html#dbg.t althash: dbg(x) +raiseNotFound adix/althash.html#raiseNotFound,K althash: raiseNotFound[K](key: K) +normalized adix/althash.html#normalized,openArray[T] althash: normalized[T](x: openArray[T]): seq[float] diff --git a/adix/amoft.html b/adix/amoft.html new file mode 100644 index 0000000..b231c70 --- /dev/null +++ b/adix/amoft.html @@ -0,0 +1,292 @@ + + + + + + + + + + + + + + + + + + +adix/amoft + + + + + + + + +
+
+

adix/amoft

+
+
+
+ +     Dark Mode +
+ +
+ Search: +
+
+ Group by: + +
+ + +
+   Source +  Edit + +
+
+ +

Approximately k-Most Oft. This is constant space & constant inc&query time with adjustably small error. AMOft[K,C] augments the sketch with an O(k) paired Table & HeapQueue. Present impl does NOT scale well to very large k (past ~top-1000). E.g.:

var amo = initAMOft[int, uint32](k=10)
+for i in 0..<500: amo.inc i, i # Not v.skewed => not v.accurate
+for (i, c) in amo.mostCommon(5): echo i, " ", c

+
+

Types

+
+
+
AMOft[K; C] = object
+  sketch: CtMnSketch[K, C]
+  top: HeapQueue[(C, int)]
+  no2key: seq[K]
+  key2no: Table[K, int]
+  k: int
+
+
+ +Track most often hashable K with counters C. +  Source +  Edit + +
+
+
+
CtMnSketch[K; C] = object
+  data: seq[seq[C]]
+  salts: seq[Hash]
+  w: int
+
+
+ +CountMinSketch over hashable K & counters C. +  Source +  Edit + +
+
+ +
+
+

Procs

+
+
+
proc inc[K, C](a: var AMOft[K, C]; key: K; r = 1)
+
+ +Count key as being seen r times. +  Source +  Edit + +
+
+
+
proc inc[K, C](cs: var CtMnSketch[K, C]; key: K; r = 1): C {.discardable.}
+
+ +Count key r times; Gives new counts; I.e., (key, r=0) can query. +  Source +  Edit + +
+
+
+
proc initAMOft[K, C](k, w: int; d = 4; salts: seq[int] = @[]): AMOft[K, C]
+
+ + +  Source +  Edit + +
+
+
+
proc initCtMnSketch[K, C](w: int; d = 4; salts: seq[int] = @[]): CtMnSketch[K, C]
+
+ +w=Size(count tables), larger implies less overestimation. d=nTables, larger implies less P(overEst). salts=Override default generated salts. +  Source +  Edit + +
+
+ +
+
+

Iterators

+
+
+
iterator mostCommon[K, C](a: AMOft[K, C]; k = 0): (K, C)
+
+ +Yield (k-most common values in a, each count) tuples; k<=0 => known. +  Source +  Edit + +
+
+ +
+ +
+
+ +
+ +
+
+
+ + + diff --git a/adix/amoft.idx b/adix/amoft.idx new file mode 100644 index 0000000..51a6766 --- /dev/null +++ b/adix/amoft.idx @@ -0,0 +1,7 @@ +CtMnSketch adix/amoft.html#CtMnSketch amoft: CtMnSketch +AMOft adix/amoft.html#AMOft amoft: AMOft +initCtMnSketch adix/amoft.html#initCtMnSketch,int,int,seq[int] amoft: initCtMnSketch[K, C](w: int; d = 4; salts: seq[int] = @[]): CtMnSketch[K, C] +inc adix/amoft.html#inc,CtMnSketch[K,C],K,int amoft: inc[K, C](cs: var CtMnSketch[K, C]; key: K; r = 1): C +initAMOft adix/amoft.html#initAMOft,int,int,int,seq[int] amoft: initAMOft[K, C](k, w: int; d = 4; salts: seq[int] = @[]): AMOft[K, C] +inc adix/amoft.html#inc,AMOft[K,C],K,int amoft: inc[K, C](a: var AMOft[K, C]; key: K; r = 1) +mostCommon adix/amoft.html#mostCommon.i,AMOft[K,C],int amoft: mostCommon[K, C](a: AMOft[K, C]; k = 0): (K, C) diff --git a/adix/bist.html b/adix/bist.html new file mode 100644 index 0000000..64c1494 --- /dev/null +++ b/adix/bist.html @@ -0,0 +1,484 @@ + + + + + + + + + + + + + + + + + + +adix/bist + + + + + + + + +
+
+

adix/bist

+
+ +   Source +  Edit + +
+
+ +

Binary Indexed Sum Tree (BIST); Invented by P.Fenwick in 1994. { Fenwick proposed "BIT" but that A) collides with many uses, B) takes partial sums as implied, while the trick applies more broadly (e.g.products), and C) does not rhyme with "dist" (for distribution, which is what this is mostly about). } While the Internet has many tutorials, to my knowledge, no one (yet) collects these algorithms all in one place. Fenwick1994 itself messed up on what we here call invCDF, correcting with a tech report a year later. This implementation is also careful to only allocate needed space/handle [0].

+

The basic idea of a standard binary heap with kids(k)@[2k],[2k+1] for dynamic distributions goes back to Wong&Easton 1980 (or earlier?). Fenwick's clever index encoding/overlaid trees trick allows using 1/4 to 1/2 that space (only max index+1 array elements vs 2*lgCeil(n)). Meaningful explanations

+
really need figures as in the original Fenwick paper or another take over at
+
https://notes.tweakblogs.net/blog/9835/fenwick-trees-demystified.html.
+
+

The Bist[T] type in this module is generic over the type of counters used for partial sums|counts. For few total items, you can use a Bist[uint8] while for many you want to use Bist[uint32]. This can be space-optimized up to 2X further with a sequint specialized to store an array of B-bit counters. Also, ranked B-trees start being faster for >28-bit index spaces.

+

+ +
+

Types

+
+
+
Bist[T] = object
+  data: seq[T]
+  tot: int
+
+
+ +A razor thin wrapper around seq[T] +  Source +  Edit + +
+
+ +
+
+

Procs

+
+
+
proc `[]=`[T](t: var Bist[T]; i: int; x: T) {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc `[]`[T](t: Bist[T]; i: int): T {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc `[]`[T](t: var Bist[T]; i: int): var T {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc cdf[T](t: Bist[T]; i: int): T {.inline.}
+
+ +Inclusive sum(pmf[0..i]), (rank,EDF,prefix sum,scan,..); Tm~1 bits in i +  Source +  Edit + +
+
+
+
proc count[T](t: Bist[T]): int {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc fromCnts[T](t: var Bist[T])
+
+ +In-place bulk convert/reformat t[] from counts to BIST; Max time ~1*n. +  Source +  Edit + +
+
+
+
proc inc[T](t: var Bist[T]; i, d: SomeInteger) {.inline.}
+
+ +Adjust for count update; Eg. inc(T,i,-1) decs count@i; Tm ~ 1/2..3/4 lg n +  Source +  Edit + +
+
+
+
proc initBist[T](len: int): Bist[T] {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc invCDF[T](t: Bist[T]; s: T; s0, s1: var T): int {.inline.}
+
+ +Find i0,s0,s1 in sum(i0..i?)==s1; s0+pmf(i0)==s1 for 0<s<=tot. +  Source +  Edit + +
+
+
+
proc invCDF[T](t: Bist[T]; s: T; s0: var T): int {.inline.}
+
+ +Find i0,s0 when sum(i0..i?)==s1; s0+pmf(i0)==s1 for 0<s<=tot in lgCeil(n) array probes. (sum jumps from s0@i0-1 to s1@i0). +  Source +  Edit + +
+
+
+
proc len[T](t: Bist[T]): int {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc max[T](t: Bist[T]): int {.inline.}
+
+ +Convenience wrapper returning invCDF(t, t.count). +  Source +  Edit + +
+
+
+
proc min[T](t: Bist[T]): int {.inline.}
+
+ +Convenience wrapper returning invCDF(t, 1) +  Source +  Edit + +
+
+
+
proc pmf[T](t: Bist[T]; i: int): T {.inline.}
+
+ +Probability Mass Function @i; Avg Tm ~ 2 probes; Max Tm ~ lg n +  Source +  Edit + +
+
+
+
proc quantile[T](t: Bist[T]; q: float): float {.inline.}
+
+ +Parzen-interpolated quantile when no caller index mapping is needed +  Source +  Edit + +
+
+
+
proc quantile[T](t: Bist[T]; q: float; iL, iH: var int): float {.inline.}
+
+ +Parzen-interpolated quantile; E.g., q=0.9 => 90th percentile. answer = result*iL + (1-result)*iH, but is left to caller to do { in case it is mapping larger numeric ranges to/from iL,iH }. Tm ~ 2*lg(addrSpace). Unlike other (broken!) quantile-interpolation methods, Parzen's connects midpoints of vertical CDF jumps, not horizontal. This makes far more sense with ties, corresponding to age-old "tie mid-ranking" recommendations. +  Source +  Edit + +
+
+
+
func space[T](t: Bist[T]): int
+
+ + +  Source +  Edit + +
+
+
+
proc toCnts[T](t: var Bist[T])
+
+ +In-place bulk convert/reformat t[] from BIST to counts; Max time ~1n *Unlike the others, this routine only works for power of 2-sized arrays. +  Source +  Edit + +
+
+ +
+ +
+
+ +
+ +
+
+
+ + + diff --git a/adix/bist.idx b/adix/bist.idx new file mode 100644 index 0000000..dc4a750 --- /dev/null +++ b/adix/bist.idx @@ -0,0 +1,19 @@ +Bist adix/bist.html#Bist bist: Bist +initBist adix/bist.html#initBist,int bist: initBist[T](len: int): Bist[T] +len adix/bist.html#len,Bist[T] bist: len[T](t: Bist[T]): int +space adix/bist.html#space,Bist[T] bist: space[T](t: Bist[T]): int +count adix/bist.html#count,Bist[T] bist: count[T](t: Bist[T]): int +`[]` adix/bist.html#[],Bist[T],int bist: `[]`[T](t: Bist[T]; i: int): T +`[]` adix/bist.html#[],Bist[T],int_2 bist: `[]`[T](t: var Bist[T]; i: int): var T +`[]=` adix/bist.html#[]=,Bist[T],int,T bist: `[]=`[T](t: var Bist[T]; i: int; x: T) +inc adix/bist.html#inc,Bist[T],SomeInteger,SomeInteger bist: inc[T](t: var Bist[T]; i, d: SomeInteger) +cdf adix/bist.html#cdf,Bist[T],int bist: cdf[T](t: Bist[T]; i: int): T +pmf adix/bist.html#pmf,Bist[T],int bist: pmf[T](t: Bist[T]; i: int): T +fromCnts adix/bist.html#fromCnts,Bist[T] bist: fromCnts[T](t: var Bist[T]) +toCnts adix/bist.html#toCnts,Bist[T] bist: toCnts[T](t: var Bist[T]) +invCDF adix/bist.html#invCDF,Bist[T],T,T bist: invCDF[T](t: Bist[T]; s: T; s0: var T): int +invCDF adix/bist.html#invCDF,Bist[T],T,T,T bist: invCDF[T](t: Bist[T]; s: T; s0, s1: var T): int +min adix/bist.html#min,Bist[T] bist: min[T](t: Bist[T]): int +max adix/bist.html#max,Bist[T] bist: max[T](t: Bist[T]): int +quantile adix/bist.html#quantile,Bist[T],float,int,int bist: quantile[T](t: Bist[T]; q: float; iL, iH: var int): float +quantile adix/bist.html#quantile,Bist[T],float bist: quantile[T](t: Bist[T]; q: float): float diff --git a/adix/bitop.html b/adix/bitop.html new file mode 100644 index 0000000..0e14f5d --- /dev/null +++ b/adix/bitop.html @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + +adix/bitop + + + + + + + + +
+
+

adix/bitop

+
+
+
+ +     Dark Mode +
+ +
+ Search: +
+
+ Group by: + +
+ + +
+   Source +  Edit + +
+
+ +

This is a reimplementation of some things we need from bitops which has CT trouble due to importc's. (I feel it's a better naming/factoring, too).

+
+

Procs

+
+
+
proc ceilPow2(x: int): int {.noSideEffect, inline, ...raises: [], tags: [].}
+
+ +Returns x rounded up to the nearest power of two. <= 0 get 1. +  Source +  Edit + +
+
+
+
proc floorPow2(x: int): int {.noSideEffect, inline, ...raises: [], tags: [].}
+
+ +Returns x rounded down to the nearest power of two. +  Source +  Edit + +
+
+
+
proc isPow2(x: int): bool {....raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc lg(x: int): int {.inline, ...raises: [], tags: [].}
+
+ +short alias for lgCeil +  Source +  Edit + +
+
+
+
proc lgCeil(x: int): int {.inline, ...raises: [], tags: [].}
+
+ +integer-math only impl of ceil(log2(x)) +  Source +  Edit + +
+
+
+
proc lgFloor(x: int): int {.inline, ...raises: [], tags: [].}
+
+ +integer-math only impl of floor(log2(x)) +  Source +  Edit + +
+
+
+
proc lgPow2(x: int): int {.inline, ...raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc reverseBits(x: uint32): uint32 {....raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc reverseBits(x: uint64): uint64 {....raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc reverseBitsByte(x: uint8): uint8 {.inline, ...raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc rotateLeftBits(a: uint64; numBits: int): uint64 {.inline, ...raises: [],
+    tags: [].}
+
+ +like bitops +  Source +  Edit + +
+
+
+
proc rotateRightBits(a: uint64; numBits: int): uint64 {.inline, ...raises: [],
+    tags: [].}
+
+ +like bitops +  Source +  Edit + +
+
+ +
+ +
+
+ +
+ +
+
+
+ + + diff --git a/adix/bitop.idx b/adix/bitop.idx new file mode 100644 index 0000000..9e2c394 --- /dev/null +++ b/adix/bitop.idx @@ -0,0 +1,12 @@ +ceilPow2 adix/bitop.html#ceilPow2,int bitop: ceilPow2(x: int): int +floorPow2 adix/bitop.html#floorPow2,int bitop: floorPow2(x: int): int +lgPow2 adix/bitop.html#lgPow2,int bitop: lgPow2(x: int): int +lgCeil adix/bitop.html#lgCeil,int bitop: lgCeil(x: int): int +lgFloor adix/bitop.html#lgFloor,int bitop: lgFloor(x: int): int +lg adix/bitop.html#lg,int bitop: lg(x: int): int +rotateLeftBits adix/bitop.html#rotateLeftBits,uint64,int bitop: rotateLeftBits(a: uint64; numBits: int): uint64 +rotateRightBits adix/bitop.html#rotateRightBits,uint64,int bitop: rotateRightBits(a: uint64; numBits: int): uint64 +reverseBitsByte adix/bitop.html#reverseBitsByte,uint8 bitop: reverseBitsByte(x: uint8): uint8 +reverseBits adix/bitop.html#reverseBits,uint32 bitop: reverseBits(x: uint32): uint32 +reverseBits adix/bitop.html#reverseBits,uint64 bitop: reverseBits(x: uint64): uint64 +isPow2 adix/bitop.html#isPow2,int bitop: isPow2(x: int): bool diff --git a/adix/bltab.html b/adix/bltab.html new file mode 100644 index 0000000..9ca0106 --- /dev/null +++ b/adix/bltab.html @@ -0,0 +1,610 @@ + + + + + + + + + + + + + + + + + + +adix/bltab + + + + + + + + +
+
+

adix/bltab

+
+
+
+ +     Dark Mode +
+ +
+ Search: +
+
+ Group by: + +
+ + +
+   Source +  Edit + +
+
+ +

This module specializes to the case where keys are 1..k-bit ints & values are 0..v-bit ints (k+v<=8*int.sizeof) using one SeqUInt as backing store. (Mnemonically, "BL" = "Bit Level" or start of "BLoom Filter", a sometimes competing data structure.) Users must give a number of bits for the key. Bits for values and the sentinel key default to 0. BLTab otherwise tries to be similar to hash variants of multisets.

+ +
+

Types

+
+
+
BLTab = object
+  data: SeqUint
+  count: int
+  k, v, numer, denom, minFree, growPow2, pow2: uint8
+  rehash, robin: bool
+  salt: Hash
+  z: uint
+
+
+ +RobinHoodLP set of B-bit int keys w/small false pos. rate +  Source +  Edit + +
+
+ +
+
+

Vars

+
+
+
blDenom = 1'u8
+
+ +default denominator for lg(n) probe depth limit +  Source +  Edit + +
+
+
+
blGrowPow2 = 1'u8
+
+ +default growth power of 2; 1 means double +  Source +  Edit + +
+
+
+
blInitialSize = 2
+
+ +default initial size aka capacity aka cap +  Source +  Edit + +
+
+
+
blMinFree = 1'u8
+
+ +default min free slots; (>= 1) +  Source +  Edit + +
+
+
+
blNumer = 3'u8
+
+ +default numerator for lg(n) probe depth limit +  Source +  Edit + +
+
+
+
blRehash = false
+
+ +default hcode rehashing behavior; auto-activated +  Source +  Edit + +
+
+
+
blRobinHood = false
+
+ +default to Robin Hood re-org; auto-activated +  Source +  Edit + +
+
+
+
blSentinel = 0'u8
+
+ +default sentinel value for k+v-bit uint +  Source +  Edit + +
+
+
+
blValueBits = 0'u8
+
+ +default bits for value in k+v-bit uint +  Source +  Edit + +
+
+ +
+
+

Procs

+
+
+
proc clear(s: var BLTab) {.inline, ...raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc contains(s: BLTab; hc: Hash): bool {.inline, ...raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc containsOrIncl(s: var BLTab; hc: Hash): bool {.inline,
+    ...raises: [ResourceExhaustedError], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc debugDump(s: BLTab; label = "") {....raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc depths(s: BLTab): seq[int] {....raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc getCap(s: BLTab): int {.inline, ...raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc init(s: var BLTab; size, mask: int) {.inline, ...raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc initBLTab(size, mask: int): BLTab {.inline, ...raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc len(s: BLTab): int {.inline, ...raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc load(t: var BLTab; path: string) {....raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc loadBLTab(path: string): BLTab {....raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc missingOrExcl(s: var BLTab; hc: Hash): bool {.inline, ...raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc mmap(t: var BLTab; path: string) {....raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc save(t: BLTab; pathStub: string) {....raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+ +
+
+

Iterators

+
+
+
iterator items(s: BLTab): Hash {....raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
iterator pairs(s: BLTab): tuple[a: int, b: Hash] {....raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+ +
+ +
+
+ +
+ +
+
+
+ + + diff --git a/adix/bltab.idx b/adix/bltab.idx new file mode 100644 index 0000000..bcd0719 --- /dev/null +++ b/adix/bltab.idx @@ -0,0 +1,26 @@ +BLTab adix/bltab.html#BLTab bltab: BLTab +blInitialSize adix/bltab.html#blInitialSize bltab: blInitialSize +blValueBits adix/bltab.html#blValueBits bltab: blValueBits +blSentinel adix/bltab.html#blSentinel bltab: blSentinel +blNumer adix/bltab.html#blNumer bltab: blNumer +blDenom adix/bltab.html#blDenom bltab: blDenom +blMinFree adix/bltab.html#blMinFree bltab: blMinFree +blGrowPow2 adix/bltab.html#blGrowPow2 bltab: blGrowPow2 +blRobinHood adix/bltab.html#blRobinHood bltab: blRobinHood +blRehash adix/bltab.html#blRehash bltab: blRehash +len adix/bltab.html#len,BLTab bltab: len(s: BLTab): int +getCap adix/bltab.html#getCap,BLTab bltab: getCap(s: BLTab): int +save adix/bltab.html#save,BLTab,string bltab: save(t: BLTab; pathStub: string) +load adix/bltab.html#load,BLTab,string bltab: load(t: var BLTab; path: string) +loadBLTab adix/bltab.html#loadBLTab,string bltab: loadBLTab(path: string): BLTab +mmap adix/bltab.html#mmap,BLTab,string bltab: mmap(t: var BLTab; path: string) +init adix/bltab.html#init,BLTab,int,int bltab: init(s: var BLTab; size, mask: int) +initBLTab adix/bltab.html#initBLTab,int,int bltab: initBLTab(size, mask: int): BLTab +contains adix/bltab.html#contains,BLTab,Hash bltab: contains(s: BLTab; hc: Hash): bool +containsOrIncl adix/bltab.html#containsOrIncl,BLTab,Hash bltab: containsOrIncl(s: var BLTab; hc: Hash): bool +missingOrExcl adix/bltab.html#missingOrExcl,BLTab,Hash bltab: missingOrExcl(s: var BLTab; hc: Hash): bool +clear adix/bltab.html#clear,BLTab bltab: clear(s: var BLTab) +items adix/bltab.html#items.i,BLTab bltab: items(s: BLTab): Hash +pairs adix/bltab.html#pairs.i,BLTab bltab: pairs(s: BLTab): tuple[a: int, b: Hash] +depths adix/bltab.html#depths,BLTab bltab: depths(s: BLTab): seq[int] +debugDump adix/bltab.html#debugDump,BLTab,string bltab: debugDump(s: BLTab; label = "") diff --git a/adix/btree.html b/adix/btree.html new file mode 100644 index 0000000..247401f --- /dev/null +++ b/adix/btree.html @@ -0,0 +1,259 @@ + + + + + + + + + + + + + + + + + + +adix/btree + + + + + + + + +
+
+

adix/btree

+
+ +   Source +  Edit + +
+
+ +

I know of no other as-simple/general FOSS B-Tree (in any prog.langs|books). Theory people recurse; DB code clutters w/sync; Other APIs are less general. Correct me if I am wrong/cite this if it be your starting point. Little effort is made to explain these algos in comments as it's impractical to cram a course into this file with no figures. More details & resources are at https://en.wikipedia.org/wiki/B-tree or in Graefe & Kuno 2011.

+

This module defines a template that defines procs on a pretty general B-Tree. The tree can be positional-only, keyed-only or keyed-ranked, be either set of keyed rows or (key,value)-style, have its nodes allocated in any way (via abstract ptrs & deref, eg. on disk via memfiles, via node pools hanging off another object, or GC'd refs), & manage dup keys either inlined into the structure or handled externally (within the same rank space!). This is >36 (3rk*2kv*3alloc*2du) styles from 1 instantiation harness. The template has many parameters to control all these choices. All but Ob are defaulted:

+
  • K: Key type; Caller provides getKey(Ob):K; void if positional-only
  • +
  • Pos: type for node weight/position augmentation; void if keyed-only
  • +
  • ObSize: type for dup chain size if handled externally; void if embedded
  • +
  • nodeSize: size in bytes of a node. B-Tree Order m is inferred from this. Our notation is m..2m links split by m-1..2m-1 obs; 2 => a 234-tree; 2*m**(h-1)-1 <= numNodes <= (2m)**h-1 where h=height of tree.
  • +
  • Ix: type for object/link indices into node arrays
  • +
  • Ln: type for the link array in nodes
  • +
+

Common notation/abbreviations in this code/APiS:

+
  • s|side: 0|1 bool side of an op. Eg. successor = path.seekAdj(true).
  • +
  • Ob|ob: abstract object type being stored or an instance/array of it.
  • +
  • Ln|ln: abstract link type being stored or an instance/array of it.
  • +
  • allocProcs (btPool|btRef|btFile): allocation style for outer Nodes
  • +
  • nodeProcs (btLinearNode|btNestedNode): in-Node organization style
  • +
+ +

Notable implementation choices:

There is no "Tree" type distinct from the "SubTree/Node" type. Once made a root node never moves. That root address is the only handle needed. "nil" ptrs (in whatever allocation arena is used) are just empty trees. Because linear ordering always has exactly 2 sides, parameterization into s|side often keeps life simple/organized (cf. Mehlhorn DS&Algos|common sense).

+

Routines are all non-recursive. Instead a Path object is central to the API & we clearly separate cursor manipulation from mutation. This also makes the 3 main styles (ranked-only, keyed-only, keyed-ranked) symmetric & removes recursion overhead (big for tall trees/small m). Each instance can be a multiset/table with "sided" edits (stack/queue) of duplicate key series.

+

Victim replacement selection in internal deletes biases toward uniform node occupancy rather than minimum node count. The bulk loader to build a minimum height tree from pre-ordered inputs also allows leaving 1 (generalizable to x?) spare slot in each node to speed early inserts later. A property check routine is provided for would-be extenders. There is presently no provision for for concurrent access as the focus is just a good single-threaded tree.

+ +

Limitations/future work:

One limitation is that leaf&internal nodes have the same size&representation, wasting ~4..8*m B/leaf. This is <33% waste for Ob >=8..16 bytes. (Post aging, occupancy =~69% anyway.) This cost is spent to avoid complexity of either two node allocation pools with dynamic conversion or different-m orders for leaf & internal nodes. Max data density means wider 4..7 node split-merges (not 2..3) & specializing on key types, anyway; Eg. for string keys not duplicating prefixes in a leaf between ("aab1", "aab2").

+
This is a work in progress. Algorithmically, we should (maybe) do
+
  1. Node Structure (eg. RB tree w/1B ptr); moveMem has good const factors, but even DRAM has ideal node sz ~ 70ns*40GB/s = 2800B/(2+4)=~466
  2. +
  3. Whole tree catenate (helpful for seq style &)
  4. +
  5. More complex whole tree split
  6. +
  7. Optimizations for giant dup blocks
  8. +
+
+
+

Nim TODOs incl: make easy to include inside other generic types, add easy HashSet & Table use in terms of this lower-level core, run-tm ->CT errs, do GC'd&memfiles Ln variants, do distinct int Ln for ovrld/figure out exports.

+

+
+

Procs

+
+
+
proc orderFit(target, wtSz, ixSz, obSz, lnSz: int): int {....raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+ +
+
+

Templates

+
+
+
template btLinearNode(Ob, K, Pos: type; M: untyped; Ix, Ln: type)
+
+ +Node ops +  Source +  Edit + +
+
+
+
template btPool(Ob, Pos: type; nodeSize: int; Ix, Ln: type)
+
+ +A simple pool allocator. Easily adapted to memfiles | GC'd allocators. +  Source +  Edit + +
+
+
+
template defBTree(Ob: type; K: type = void; Pos: type = void;
+                  ObSize: type = void; nodeSize: int = 16; Ix: type = int16;
+                  Ln: type = uint16; allocProcs = btPool;
+                  nodeProcs = btLinearNode)
+
+ + +  Source +  Edit + +
+
+ +
+ +
+
+ +
+ +
+
+
+ + + diff --git a/adix/btree.idx b/adix/btree.idx new file mode 100644 index 0000000..b5c50aa --- /dev/null +++ b/adix/btree.idx @@ -0,0 +1,6 @@ +orderFit adix/btree.html#orderFit,int,int,int,int,int btree: orderFit(target, wtSz, ixSz, obSz, lnSz: int): int +btPool adix/btree.html#btPool.t,type,type,int,type,type btree: btPool(Ob, Pos: type; nodeSize: int; Ix, Ln: type) +btLinearNode adix/btree.html#btLinearNode.t,type,type,type,untyped,type,type btree: btLinearNode(Ob, K, Pos: type; M: untyped; Ix, Ln: type) +defBTree adix/btree.html#defBTree.t,type,type,type,type,int,type,type btree: defBTree(Ob: type; K: type = void; Pos: type = void; ObSize: type = void;\n nodeSize: int = 16; Ix: type = int16; Ln: type = uint16;\n allocProcs = btPool; nodeProcs = btLinearNode) +Notable implementation choices: adix/btree.html#notable-implementation-choicescolon Notable implementation choices: +Limitations/future work: adix/btree.html#limitationsslashfuture-workcolon Limitations/future work: diff --git a/adix/cpuCT.html b/adix/cpuCT.html new file mode 100644 index 0000000..6bf342d --- /dev/null +++ b/adix/cpuCT.html @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + +adix/cpuCT + + + + + + + + +
+
+

adix/cpuCT

+
+
+
+ +     Dark Mode +
+ +
+ Search: +
+
+ Group by: + +
+ + +
+   Source +  Edit + +
+
+ +

gcc/clang error out if the generated C includes a tmmintrin.h header on CPUs without -march=enabling the instructions. An admittedly expensive staticExec lets us probe a build-time system for all pre-defined C preprocessor macros in one execution. We then postprocess these into a set of flags for Nim compile-time when checks to make "fall back" easy/natural.

+
+

Types

+
+
+
X86Feature = enum
+  x86sse2, x86ssse3, x86bmi2
+
+ + +  Source +  Edit + +
+
+ +
+
+

Consts

+
+
+
ccPreDefs = "#define __AVX512F__ 1\n#define __UINT_LEAST16_MAX__ 0xffff\n#define __ATOMIC_ACQUIRE 2\n#define __tune_icelake_server__ 1\n#define __GCC_IEC_559_COMPLEX 2\n#define __UINT_LEAST8_TYPE__ unsigned char\n#define __SIZEOF_FLOAT80__ 16\n#define __DEC32_MIN_EXP__ (-94)\n#define __INTMAX_C(c) c ## L\n#define __MOVBE__ 1\n#define __WCHAR_MAX__ 0x7fffffff\n#define __UINT8_MAX__ 0xff\n#define __SCHAR_WIDTH__ 8\n#define __WINT_MAX__ 0xffffffffU\n#define __ORDER_LITTLE_ENDIAN__ 1234\n#define __SIZE_MAX__ 0xffffffffffffffffUL\n#define __SSE4_1__ 1\n#define __icelake_server 1\n#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1\n#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1\n#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1\n#define __DBL_DENORM_MIN__ ((double)4.94065645841246544176568792868221372e-324L)\n#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1\n#define __GCC_ATOMIC_CHAR_LOCK_FREE 2\n#define __GCC_IEC_559 2\n#define __FLT32X_DECIMAL_DIG__ 17\n#define __FLT_EVAL_METHOD__ 0\n#define __FLT64_DECIMAL_DIG__ 17\n#define __CET__ 3\n#define __DBL_MIN_EXP__ (-1021)\n#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2\n#define __UINT_FAST64_MAX__ 0xffffffffffffffffUL\n#define __SIG_ATOMIC_TYPE__ int\n#define __DBL_MIN_10_EXP__ (-307)\n#define __FINITE_MATH_ONLY__ 0\n#define __FLT32_HAS_DENORM__ 1\n#define __UINT_FAST8_MAX__ 0xff\n#define __FLT32_MAX_10_EXP__ 38\n#define __DEC64_MAX_EXP__ 385\n#define __INT_LEAST8_WIDTH__ 8\n#define __UINT_LEAST64_MAX__ 0xffffffffffffffffUL\n#define __SHRT_MAX__ 0x7fff\n#define __FLT64X_MAX_10_EXP__ 4932\n#define __LDBL_IS_IEC_60559__ 2\n#define __FLT64X_HAS_QUIET_NAN__ 1\n#define __INT_FAST64_TYPE__ long int\n#define __UINT_LEAST8_MAX__ 0xff\n#define __GCC_ATOMIC_BOOL_LOCK_FREE 2\n#define __FLT128_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966F128\n#define __UINTMAX_TYPE__ long unsigned int\n#define __linux 1\n#define __DEC32_EPSILON__ 1E-6DF\n#define __FLT_EVAL_METHOD_TS_18661_3__ 0\n#define __unix 1\n#define __UINT32_MAX__ 0xffffffffU\n#define __FLT128_MIN_EXP__ (-16381)\n#define __CHAR_BIT__ 8\n#define __FLT128_MIN_10_EXP__ (-4931)\n#define __FLT32X_IS_IEC_60559__ 2\n#define __INT_LEAST16_WIDTH__ 16\n#define __SCHAR_MAX__ 0x7f\n#define __FLT128_MANT_DIG__ 113\n#define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1)\n#define __INT64_C(c) c ## L\n#define __SSP_STRONG__ 3\n#define __GCC_ATOMIC_POINTER_LOCK_FREE 2\n#define __FLT32X_MAX_EXP__ 1024\n#define __INT_LEAST64_MAX__ 0x7fffffffffffffffL\n#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2\n#define __LDBL_MAX__ 1.18973149535723176502126385303097021e+4932L\n#define __USER_LABEL_PREFIX__ \n#define __FLT64X_EPSILON__ 1.08420217248550443400745280086994171e-19F64x\n#define __STDC_HOSTED__ 1\n#define __FLT64X_MIN__ 3.36210314311209350626267781732175260e-4932F64x\n#define __FLT_EPSILON__ 1.19209289550781250000000000000000000e-7F\n#define __ABM__ 1\n#define __SHRT_WIDTH__ 16\n#define __FLT128_MAX_10_EXP__ 4932\n#define __FLT32_IS_IEC_60559__ 2\n#define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L\n#define __STDC_UTF_16__ 1\n#define __DEC32_MAX__ 9.999999E96DF\n#define __FLT64X_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951F64x\n#define __CRC32__ 1\n#define __FLT32X_HAS_INFINITY__ 1\n#define __INT32_MAX__ 0x7fffffff\n#define __unix__ 1\n#define __SIZEOF_LONG__ 8\n#define __SSE__ 1\n#define __STDC_IEC_559__ 1\n#define __STDC_ISO_10646__ 201706L\n#define __UINT16_C(c) c\n#define __DECIMAL_DIG__ 21\n#define __STDC_IEC_559_COMPLEX__ 1\n#define __FLT64_EPSILON__ 2.22044604925031308084726333618164062e-16F64\n#define __DBL_DIG__ 15\n#define __gnu_linux__ 1\n#define __FLT64X_MIN_10_EXP__ (-4931)\n#define __LDBL_HAS_QUIET_NAN__ 1\n#define __FLT64X_MANT_DIG__ 64\n#define __GNUC__ 11\n#define __pie__ 2\n#define __MMX__ 1\n#define __FLT_HAS_DENORM__ 1\n#define __SIZEOF_LONG_DOUBLE__ 16\n#define __XSAVEOPT__ 1\n#define __BIGGEST_ALIGNMENT__ 64\n#define _STDC_PREDEF_H 1\n#define __PRFCHW__ 1\n#define __FLT64_MAX_10_EXP__ 308\n#define __GNUC_STDC_INLINE__ 1\n#define __DBL_IS_IEC_60559__ 2\n#define __DBL_MAX__ ((double)1.79769313486231570814527423731704357e+308L)\n#define __XSAVES__ 1\n#define __INT_FAST32_MAX__ 0x7fffffffffffffffL\n#define __LDBL_HAS_DENORM__ 1\n#define __DBL_HAS_INFINITY__ 1\n#define __SSE4_2__ 1\n#define __SIZEOF_FLOAT__ 4\n#define __RDSEED__ 1\n#define __INTPTR_WIDTH__ 64\n#define __FLT64X_HAS_INFINITY__ 1\n#define __FLT32X_HAS_DENORM__ 1\n#define __INT_FAST16_TYPE__ long int\n#define __MMX_WITH_SSE__ 1\n#define __FLT_DIG__ 6\n#define __AVX512BW__ 1\n#define __FLT128_HAS_INFINITY__ 1\n#define __DEC32_MIN__ 1E-95DF\n#define __POPCNT__ 1\n#define __DBL_MAX_EXP__ 1024\n#define __WCHAR_WIDTH__ 32\n#define __FLT32_MAX__ 3.40282346638528859811704183484516925e+38F32\n#define __DEC128_EPSILON__ 1E-33DL\n#define __SSE2_MATH__ 1\n#define __ATOMIC_HLE_RELEASE 131072\n#define __PTRDIFF_MAX__ 0x7fffffffffffffffL\n#define __FLT128_MAX_EXP__ 16384\n#define __amd64 1\n#define __AVX__ 1\n#define __LONG_LONG_MAX__ 0x7fffffffffffffffLL\n#define __SIZEOF_SIZE_T__ 8\n#define __SIG_ATOMIC_WIDTH__ 32\n#define __LZCNT__ 1\n#define __FLT64X_MIN_EXP__ (-16381)\n#define __SIZEOF_WINT_T__ 4\n#define __LONG_LONG_WIDTH__ 64\n#define __FLT32_MAX_EXP__ 128\n#define __GXX_ABI_VERSION 1016\n#define __GCC_ATOMIC_LONG_LOCK_FREE 2\n#define __FLT_MIN_EXP__ (-125)\n#define __GCC_HAVE_DWARF2_CFI_ASM 1\n#define __DEC64_MIN_EXP__ (-382)\n#define __INT16_MAX__ 0x7fff\n#define __x86_64 1\n#define __DBL_DECIMAL_DIG__ 17\n#define __FLT64_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F64\n#define __DBL_MIN__ ((double)2.22507385850720138309023271733240406e-308L)\n#define __CLFLUSHOPT__ 1\n#define __FP_FAST_FMAF64 1\n#define __PCLMUL__ 1\n#define __FLT128_EPSILON__ 1.92592994438723585305597794258492732e-34F128\n#define __FLT64X_NORM_MAX__ 1.18973149535723176502126385303097021e+4932F64x\n#define __SIZEOF_POINTER__ 8\n#define __F16C__ 1\n#define __LP64__ 1\n#define __DBL_HAS_QUIET_NAN__ 1\n#define __INT_FAST8_WIDTH__ 8\n#define __FLT32X_EPSILON__ 2.22044604925031308084726333618164062e-16F32x\n#define __LDBL_MAX_EXP__ 16384\n#define __DECIMAL_BID_FORMAT__ 1\n#define __FLT64_MIN_EXP__ (-1021)\n#define __FLT64_MIN_10_EXP__ (-307)\n#define __FLT64X_DECIMAL_DIG__ 21\n#define __DEC128_MIN__ 1E-6143DL\n#define __LAHF_SAHF__ 1\n#define __REGISTER_PREFIX__ \n#define __UINT16_MAX__ 0xffff\n#define __DBL_HAS_DENORM__ 1\n#define __LDBL_HAS_INFINITY__ 1\n#define __AVX512VL__ 1\n#define __FLT32_MIN__ 1.17549435082228750796873653722224568e-38F32\n#define __UINT8_TYPE__ unsigned char\n#define __NO_INLINE__ 1\n#define __DEC_EVAL_METHOD__ 2\n#define __FLT32X_MAX_10_EXP__ 308\n#define __LDBL_DECIMAL_DIG__ 21\n#define __UINT64_C(c) c ## UL\n#define __RTM__ 1\n#define __FMA__ 1\n#define __AVX512CD__ 1\n#define __INT_LEAST32_MAX__ 0x7fffffff\n#define __GCC_ATOMIC_INT_LOCK_FREE 2\n#define __FLT32_MANT_DIG__ 24\n#define __SIG_ATOMIC_MAX__ 0x7fffffff\n#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__\n#define __DEC32_MANT_DIG__ 7\n#define __STDC_IEC_60559_COMPLEX__ 201404L\n#define __ATOMIC_HLE_ACQUIRE 65536\n#define __FLT128_HAS_DENORM__ 1\n#define __FLT32_DECIMAL_DIG__ 9\n#define __FLT128_DIG__ 33\n#define __INT32_C(c) c\n#define __DEC64_EPSILON__ 1E-15DD\n#define __DEC128_MIN_EXP__ (-6142)\n#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL\n#define __INT_FAST32_TYPE__ long int\n#define __ORDER_PDP_ENDIAN__ 3412\n#define __FLT64_IS_IEC_60559__ 2\n#define __UINT_LEAST16_TYPE__ short unsigned int\n#define unix 1\n#define __SIZE_TYPE__ long unsigned int\n#define __UINT64_MAX__ 0xffffffffffffffffUL\n#define __FLT_IS_IEC_60559__ 2\n#define __GNUC_WIDE_EXECUTION_CHARSET_NAME \"UTF-32LE\"\n#define __FLT64X_DIG__ 18\n#define __INT8_TYPE__ signed char\n#define __ELF__ 1\n#define __GCC_ASM_FLAG_OUTPUTS__ 1\n#define __UINT32_TYPE__ unsigned int\n#define __FP_FAST_FMA 1\n#define __FLT_RADIX__ 2\n#define __INT_LEAST16_TYPE__ short int\n#define __LDBL_EPSILON__ 1.08420217248550443400745280086994171e-19L\n#define __UINTMAX_C(c) c ## UL\n#define __SSE_MATH__ 1\n#define __FLT32X_MIN__ 2.22507385850720138309023271733240406e-308F32x\n#define __STDC_IEC_60559_BFP__ 201404L\n#define __SIZEOF_PTRDIFF_T__ 8\n#define __BMI__ 1\n#define __FLT32_HAS_INFINITY__ 1\n#define __INT_WIDTH__ 32\n#define __LDBL_DIG__ 18\n#define __x86_64__ 1\n#define __FLT32X_MIN_EXP__ (-1021)\n#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF\n#define __INT_FAST16_MAX__ 0x7fffffffffffffffL\n#define __AVX512DQ__ 1\n#define __FLT64_DIG__ 15\n#define __UINT_FAST32_MAX__ 0xffffffffffffffffUL\n#define __UINT_LEAST64_TYPE__ long unsigned int\n#define __FLT_HAS_QUIET_NAN__ 1\n#define __FLT_MAX_10_EXP__ 38\n#define __FLT64X_HAS_DENORM__ 1\n#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL\n#define __FLT_HAS_INFINITY__ 1\n#define __GNUC_EXECUTION_CHARSET_NAME \"UTF-8\"\n#define __UINT_FAST16_TYPE__ long unsigned int\n#define __DEC64_MAX__ 9.999999999999999E384DD\n#define __INT_FAST32_WIDTH__ 64\n#define __CHAR16_TYPE__ short unsigned int\n#define __FLT64X_MAX_EXP__ 16384\n#define __PRAGMA_REDEFINE_EXTNAME 1\n#define __SIZE_WIDTH__ 64\n#define __SEG_FS 1\n#define __INT_LEAST16_MAX__ 0x7fff\n#define __DEC64_MANT_DIG__ 16\n#define __INT64_MAX__ 0x7fffffffffffffffL\n#define __SEG_GS 1\n#define __FLT32_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F32\n#define __INT_LEAST64_TYPE__ long int\n#define __ORDER_BIG_ENDIAN__ 4321\n#define __INT16_TYPE__ short int\n#define __INT_LEAST8_TYPE__ signed char\n#define __STDC_VERSION__ 201710L\n#define __SIZEOF_INT__ 4\n#define __DEC32_MAX_EXP__ 97\n#define __INT_FAST8_MAX__ 0x7f\n#define __FLT128_MAX__ 1.18973149535723176508575932662800702e+4932F128\n#define __INTPTR_MAX__ 0x7fffffffffffffffL\n#define linux 1\n#define __AVX2__ 1\n#define __FLT64_HAS_QUIET_NAN__ 1\n#define __FLT32_MIN_10_EXP__ (-37)\n#define __SSSE3__ 1\n#define __FLT32X_DIG__ 15\n#define __RDRND__ 1\n#define __PTRDIFF_WIDTH__ 64\n#define __LDBL_MANT_DIG__ 64\n#define __FLT64_HAS_INFINITY__ 1\n#define __FLT64X_MAX__ 1.18973149535723176502126385303097021e+4932F64x\n#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1)\n#define __code_model_small__ 1\n#define __INTPTR_TYPE__ long int\n#define __UINT16_TYPE__ short unsigned int\n#define __WCHAR_TYPE__ int\n#define __pic__ 2\n#define __UINTPTR_MAX__ 0xffffffffffffffffUL\n#define __INT_FAST64_WIDTH__ 64\n#define __INT_FAST64_MAX__ 0x7fffffffffffffffL\n#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1\n#define __FLT_NORM_MAX__ 3.40282346638528859811704183484516925e+38F\n#define __UINT_FAST64_TYPE__ long unsigned int\n#define __icelake_server__ 1\n#define __XSAVE__ 1\n#define __INT_MAX__ 0x7fffffff\n#define __linux__ 1\n#define __INT64_TYPE__ long int\n#define __FLT_MAX_EXP__ 128\n#define __DBL_MANT_DIG__ 53\n#define __SIZEOF_FLOAT128__ 16\n#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2\n#define __FP_FAST_FMAF32 1\n#define __DEC64_MIN__ 1E-383DD\n#define __WINT_TYPE__ unsigned int\n#define __UINT_LEAST32_TYPE__ unsigned int\n#define __SIZEOF_SHORT__ 2\n#define __FLT32_NORM_MAX__ 3.40282346638528859811704183484516925e+38F32\n#define __LDBL_MIN_EXP__ (-16381)\n#define __FLT64_MAX__ 1.79769313486231570814527423731704357e+308F64\n#define __WINT_WIDTH__ 32\n#define __INT_LEAST8_MAX__ 0x7f\n#define __INT_LEAST64_WIDTH__ 64\n#define __SIZEOF_INT128__ 16\n#define __FLT64X_IS_IEC_60559__ 2\n#define __LDBL_MAX_10_EXP__ 4932\n#define __ATOMIC_RELAXED 0\n#define __DBL_EPSILON__ ((double)2.22044604925031308084726333618164062e-16L)\n#define __FLT32_MIN_EXP__ (-125)\n#define __FLT128_MIN__ 3.36210314311209350626267781732175260e-4932F128\n#define _LP64 1\n#define __UINT8_C(c) c\n#define __FLT64_MAX_EXP__ 1024\n#define __INT_LEAST32_TYPE__ int\n#define __SIZEOF_WCHAR_T__ 4\n#define __UINT64_TYPE__ long unsigned int\n#define __FP_FAST_FMAF 1\n#define __GNUC_PATCHLEVEL__ 0\n#define __FLT128_NORM_MAX__ 1.18973149535723176508575932662800702e+4932F128\n#define __FLT_MIN__ 1.17549435082228750796873653722224568e-38F\n#define __amd64__ 1\n#define __FLT64_NORM_MAX__ 1.79769313486231570814527423731704357e+308F64\n#define __FLT128_HAS_QUIET_NAN__ 1\n#define __INTMAX_MAX__ 0x7fffffffffffffffL\n#define __SSE3__ 1\n#define __INT_FAST8_TYPE__ signed char\n#define __FLT64_HAS_DENORM__ 1\n#define __FLT32_EPSILON__ 1.19209289550781250000000000000000000e-7F32\n#define __FP_FAST_FMAF32x 1\n#define __STDC_UTF_32__ 1\n#define __FXSR__ 1\n#define __FLT32X_MAX__ 1.79769313486231570814527423731704357e+308F32x\n#define __DBL_NORM_MAX__ ((double)1.79769313486231570814527423731704357e+308L)\n#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__\n#define __INTMAX_WIDTH__ 64\n#define __FLT32_DIG__ 6\n#define __UINT32_C(c) c ## U\n#define __FLT_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F\n#define __WINT_MIN__ 0U\n#define __FLT128_IS_IEC_60559__ 2\n#define __INT8_MAX__ 0x7f\n#define __LONG_WIDTH__ 64\n#define __PIC__ 2\n#define __UINT_FAST32_TYPE__ long unsigned int\n#define __FLT32X_NORM_MAX__ 1.79769313486231570814527423731704357e+308F32x\n#define __CHAR32_TYPE__ unsigned int\n#define __FLT_MAX__ 3.40282346638528859811704183484516925e+38F\n#define __SSE2__ 1\n#define __INT32_TYPE__ int\n#define __SIZEOF_DOUBLE__ 8\n#define __FLT_MIN_10_EXP__ (-37)\n#define __FLT_MANT_DIG__ 24\n#define __FLT64_MIN__ 2.22507385850720138309023271733240406e-308F64\n#define __INT_LEAST32_WIDTH__ 32\n#define __INTMAX_TYPE__ long int\n#define __XSAVEC__ 1\n#define __DEC128_MAX_EXP__ 6145\n#define __FSGSBASE__ 1\n#define __FLT32X_HAS_QUIET_NAN__ 1\n#define __ATOMIC_CONSUME 1\n#define __GNUC_MINOR__ 3\n#define __INT_FAST16_WIDTH__ 64\n#define __UINTMAX_MAX__ 0xffffffffffffffffUL\n#define __PIE__ 2\n#define __FLT32X_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F32x\n#define __DBL_MAX_10_EXP__ 308\n#define __LDBL_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951L\n#define __BMI2__ 1\n#define __INT16_C(c) c\n#define __STDC__ 1\n#define __AES__ 1\n#define __PTRDIFF_TYPE__ long int\n#define __VERSION__ \"11.3.0\"\n#define __FLT64_MANT_DIG__ 53\n#define __ATOMIC_SEQ_CST 5\n#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 1\n#define __ADX__ 1\n#define __LONG_MAX__ 0x7fffffffffffffffL\n#define __FLT32X_MIN_10_EXP__ (-307)\n#define __UINTPTR_TYPE__ long unsigned int\n#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD\n#define __DEC128_MANT_DIG__ 34\n#define __LDBL_MIN_10_EXP__ (-4931)\n#define __INT8_C(c) c\n#define __SIZEOF_LONG_LONG__ 8\n#define __HAVE_SPECULATION_SAFE_VALUE 1\n#define __FLT128_DECIMAL_DIG__ 36\n#define __GCC_ATOMIC_LLONG_LOCK_FREE 2\n#define __FLT32X_MANT_DIG__ 53\n#define __FLT32_HAS_QUIET_NAN__ 1\n#define __FLT_DECIMAL_DIG__ 9\n#define __UINT_FAST16_MAX__ 0xffffffffffffffffUL\n#define __LDBL_NORM_MAX__ 1.18973149535723176502126385303097021e+4932L\n#define __GCC_ATOMIC_SHORT_LOCK_FREE 2\n#define __UINT_FAST8_TYPE__ unsigned char\n#define __UINT_LEAST32_MAX__ 0xffffffffU\n#define __ATOMIC_ACQ_REL 4\n#define __ATOMIC_RELEASE 3"
+
+ + +  Source +  Edit + +
+
+
+
x86features = {x86sse2, x86ssse3, x86bmi2}
+
+ + +  Source +  Edit + +
+
+ +
+ +
+
+ +
+ +
+
+
+ + + diff --git a/adix/cpuCT.idx b/adix/cpuCT.idx new file mode 100644 index 0000000..7058636 --- /dev/null +++ b/adix/cpuCT.idx @@ -0,0 +1,6 @@ +ccPreDefs adix/cpuCT.html#ccPreDefs cpuCT: ccPreDefs +x86sse2 adix/cpuCT.html#x86sse2 X86Feature.x86sse2 +x86ssse3 adix/cpuCT.html#x86ssse3 X86Feature.x86ssse3 +x86bmi2 adix/cpuCT.html#x86bmi2 X86Feature.x86bmi2 +X86Feature adix/cpuCT.html#X86Feature cpuCT: X86Feature +x86features adix/cpuCT.html#x86features cpuCT: x86features diff --git a/adix/cumsum.html b/adix/cumsum.html new file mode 100644 index 0000000..4c3dc2d --- /dev/null +++ b/adix/cumsum.html @@ -0,0 +1,252 @@ + + + + + + + + + + + + + + + + + + +adix/cumsum + + + + + + + + +
+
+

adix/cumsum

+
+ +   Source +  Edit + +
+
+ +

+
+

Imports

+
+cpuCT +
+
+

Procs

+
+
+
proc cumsum(c: ptr UncheckedArray[uint8]; n: uint) {....raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc cumsum(c: ptr UncheckedArray[uint16]; n: uint) {....raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc cumsum(c: ptr UncheckedArray[uint32]; n: uint) {....raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc cumsum(c: ptr UncheckedArray[uint64]; n: uint) {....raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc cumsum[T](c: ptr T; n: uint) {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc cumsum[T](c: ptr UncheckedArray[T]; n: uint)
+
+ + +  Source +  Edit + +
+
+
+
proc cumsum[T](c: var openArray[T]) {.inline.}
+
+ + +  Source +  Edit + +
+
+ +
+ +
+
+ +
+ +
+
+
+ + + diff --git a/adix/cumsum.idx b/adix/cumsum.idx new file mode 100644 index 0000000..a50f58a --- /dev/null +++ b/adix/cumsum.idx @@ -0,0 +1,7 @@ +cumsum adix/cumsum.html#cumsum,ptr.UncheckedArray[T],uint cumsum: cumsum[T](c: ptr UncheckedArray[T]; n: uint) +cumsum adix/cumsum.html#cumsum,ptr.UncheckedArray[uint8],uint cumsum: cumsum(c: ptr UncheckedArray[uint8]; n: uint) +cumsum adix/cumsum.html#cumsum,ptr.UncheckedArray[uint16],uint cumsum: cumsum(c: ptr UncheckedArray[uint16]; n: uint) +cumsum adix/cumsum.html#cumsum,ptr.UncheckedArray[uint32],uint cumsum: cumsum(c: ptr UncheckedArray[uint32]; n: uint) +cumsum adix/cumsum.html#cumsum,ptr.UncheckedArray[uint64],uint cumsum: cumsum(c: ptr UncheckedArray[uint64]; n: uint) +cumsum adix/cumsum.html#cumsum,openArray[T] cumsum: cumsum[T](c: var openArray[T]) +cumsum adix/cumsum.html#cumsum,ptr.T,uint cumsum: cumsum[T](c: ptr T; n: uint) diff --git a/adix/ditab.html b/adix/ditab.html new file mode 100644 index 0000000..69da62b --- /dev/null +++ b/adix/ditab.html @@ -0,0 +1,1648 @@ + + + + + + + + + + + + + + + + + + +adix/ditab + + + + + + + + +
+
+

adix/ditab

+
+
+
+ +     Dark Mode +
+ +
+ Search: +
+
+ Group by: + +
+ + +
+   Source +  Edit + +
+
+ +

This module provides a directly indexed set/table representation via a dense seq[T] with an auxiliary sparse direct index to accelerate searching. "direct" means the same size as the key space or "alphabet". The index says what seq index has each (unique) key. This can do any unordered set op in guaranteed unit time cost per element -- make, insert, delete, member query, iterate, union/intersect/etc. -- all with arbitrarily "aged" sets.

+

The catch is that the "unit" in said cost will only be small if the key space is small enough to afford allocating index space & if the working set of the index fits into low enough latency memory to not be too slow. Otherwise, other data structures like hash tables & B-trees will outperform this. Iteration is always in insertion order whenever no deletes have occurred. The "unit" is also 2 memory accesses per operation, vs. often 1 for lptabz. So, very large scale can make this guaranteed to be ~2X slowe than a good average case for lptabz, all depending upon exact requirements, of course.

+

The earliest reference I have elaborating the properties of this approach is An Efficient Representation for Sparse Sets by Preston Briggs & Linda Torczon from Rice in 1993. It's simple enough that the idea may date back to early 1960s DB work (likely by Codd), maybe under a term like "direct indexing". The key type here must have an available conversion to int. Duplicate keys are not allowed for this one.

+Below here is pretty standard except for the generic signatures

+ +
+

Types

+
+
+
DISet[K] = DITab[K, void]
+
+ +DITab specialized to sets +  Source +  Edit + +
+
+
+
DITab[K; V] = object
+  when V is void:
+      data: seq[K]
+
+  else:
+      data: seq[tuple[key: K, val: V]]
+
+  range: int
+  idx: SeqUint
+
+
+ +Alphabet size determines K; V may be void +  Source +  Edit + +
+
+ +
+
+

Vars

+
+
+
diDenom = 0
+
+ +default denominator (unused) +  Source +  Edit + +
+
+
+
diGrowPow2 = 0
+
+ +default growth power of 2 (unused) +  Source +  Edit + +
+
+
+
diInitialSize = 0
+
+ +default numerator (unused) +  Source +  Edit + +
+
+
+
diMinFree = 0
+
+ +default min free slots (unused) +  Source +  Edit + +
+
+
+
diNumer = 0
+
+ +default numerator (unused) +  Source +  Edit + +
+
+
+
diRehash = false
+
+ +default hcode rehashing behavior (unused) +  Source +  Edit + +
+
+
+
diRobinHood = false
+
+ +default to Robin Hood (unused) +  Source +  Edit + +
+
+ +
+
+

Procs

+
+
+
proc `$`[K, V: not void](t: DITab[K, V]): string
+
+ + +  Source +  Edit + +
+
+
+
proc `$`[K](s: DITab[K, void]): string
+
+ + +  Source +  Edit + +
+
+
+
proc `*`[K](s1, s2: DITab[K, void]): DITab[K, void] {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc `+`[K](s1, s2: DITab[K, void]): DITab[K, void] {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc `-+-`[K](s1, s2: DITab[K, void]): DITab[K, void] {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc `-`[K](s1, s2: DITab[K, void]): DITab[K, void] {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc `<=`[K](s, t: DITab[K, void]): bool
+
+ + +  Source +  Edit + +
+
+
+
proc `<`[K](s, t: DITab[K, void]): bool
+
+ + +  Source +  Edit + +
+
+
+
proc `==`[K, V](x, y: DITab[K, V]): bool
+
+ + +  Source +  Edit + +
+
+
+
proc `==`[K](s, t: DITab[K, void]): bool
+
+ + +  Source +  Edit + +
+
+
+
proc `[]=`[K, V](t: var DITab[K, V]; key: K; val: V)
+
+ + +  Source +  Edit + +
+
+
+
proc `[]`[K, V](t: DITab[K, V]; key: K): V {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc `[]`[K, V](t: var DITab[K, V]; key: K): var V {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc `{}=`[K, V](t: var DITab[K, V]; key: K; val: V) {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc `{}`[K, V](t: DITab[K, V]; key: K): V {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc `{}`[K, V](t: var DITab[K, V]; key: K): var V {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc card[K](s: DITab[K, void]): int {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc clear[K, V](t: var DITab[K, V]) {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc contains[K, V](t: DITab[K, V]; key: K): bool {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc containsOrIncl[K](t: var DITab[K, void]; key: K): bool {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc debugDump[K, V](t: DITab[K, V]; label = "")
+
+ + +  Source +  Edit + +
+
+
+
proc del[K, V](t: var DITab[K, V]; key: K) {.inline.}
+
+ +delete one key key from t; If you want to know if it was present then use missingOrExcl, take, or pop instead. +  Source +  Edit + +
+
+
+
proc depths[K, V](t: DITab[K, V]): seq[int]
+
+ + +  Source +  Edit + +
+
+
+
proc depthStats[K, V](s: DITab[K, V]): tuple[m1, m2: float, mx: int]
+
+ + +  Source +  Edit + +
+
+
+
proc difference[K](s1, s2: DITab[K, void]): DITab[K, void]
+
+ + +  Source +  Edit + +
+
+
+
proc disjoint[K](s1, s2: DITab[K, void]): bool
+
+ + +  Source +  Edit + +
+
+
+
proc editKey[K, V](t: var DITab[K, V]; old, new: K) {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc excl[K](s: var DITab[K, void]; elt: K) {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc excl[K](s: var DITab[K, void]; other: DITab[K, void])
+
+ + +  Source +  Edit + +
+
+
+
proc getCap[K, V](t: var DITab[K, V]): int {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc getOrDefault[K, V](t: DITab[K, V]; key: K; default = default(V)): V {.
+    inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc hash[K](s: DITab[K, void]): Hash
+
+ + +  Source +  Edit + +
+
+
+
proc hasKey[K, V](t: DITab[K, V]; key: K): bool {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc hasKeyOrPut[K, V](t: var DITab[K, V]; key: K; val: V): bool {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc inc[K, V: SomeInteger](t: var DITab[K, V]; key: K; amount: SomeInteger = 1) {.
+    inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc incl[K](s: var DITab[K, void]; elt: K) {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc incl[K](s: var DITab[K, void]; other: DITab[K, void])
+
+ + +  Source +  Edit + +
+
+
+
proc indexBy[A, K, V](collection: A; index: proc (x: V): K): DITab[K, V]
+
+ + +  Source +  Edit + +
+
+
+
proc init[K, V](t: var DITab[K, V]; initialSize = 0; numer = 0; denom = 0;
+                minFree = 0; growPow2 = 0; rehash = false; robinhood = false) {.
+    inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc initDISet[K](initialSize = 0; numer = diNumer; denom = diDenom;
+                  minFree = diMinFree; growPow2 = diGrowPow2; rehash = diRehash;
+                  robinhood = diRobinHood): DISet[K] {.inline.}
+
+ +Return an DITab specialized to sets operations. See initDITab for parameter details. +  Source +  Edit + +
+
+
+
proc initDITab[K, V](initialSize = 0; numer = 0; denom = 0; minFree = 0;
+                     growPow2 = 0; rehash = false; robinhood = false): DITab[K,
+    V] {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc intersection[K](s1, s2: DITab[K, void]): DITab[K, void]
+
+ + +  Source +  Edit + +
+
+
+
proc len[K, V](t: DITab[K, V]): int {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc map[K, A](data: DITab[K, void]; op: proc (x: K): A {.closure.}): DITab[A,
+    void]
+
+ + +  Source +  Edit + +
+
+
+
proc merge[K, V: SomeInteger](c: var DITab[K, V]; b: DITab[K, V])
+
+ + +  Source +  Edit + +
+
+
+
proc mgetOrPut[K, V](t: var DITab[K, V]; key: K; val: V): var V {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc mgetOrPut[K, V](t: var DITab[K, V]; key: K; val: V; had: var bool): var V {.
+    inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc missingOrExcl[K, V](t: var DITab[K, V]; key: K): bool
+
+ + +  Source +  Edit + +
+
+
+
proc nthKey[K](t: DITab[K, void]; n: int): K {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc nthPair[K, V: not void](t: DITab[K, V]; n: int): (K, V) {.inline.}
+
+ +Insertion-ordered tables support 0-origin nth-in-order pair. +  Source +  Edit + +
+
+
+
proc nthPair[K, V: not void](t: var DITab[K, V]; n: int): (K, ptr V) {.inline.}
+
+ +Insertion-ordered tables support 0-origin nth-in-order pair w/editable val. +  Source +  Edit + +
+
+
+
proc pop[K, V: not void](t: var DITab[K, V]): (K, V) {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc pop[K, V: not void](t: var DITab[K, V]; key: K; val: var V): bool {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc pop[K](s: var DITab[K, void]; key: var K): bool {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc pop[K](t: var DITab[K, void]): K {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc rightSize(count: int; numer = 0; denom = 0; minFree = 0): int {.inline,
+    ...deprecated: "Deprecated since 0.2; identity function", raises: [], tags: [].}
+
+
+ Deprecated: Deprecated since 0.2; identity function +
+ + +  Source +  Edit + +
+
+
+
proc setCap[K, V](t: var DITab[K, V]; newSize = -1)
+
+ + +  Source +  Edit + +
+
+
+
proc setOrIncl[K](t: var DITab[K, void]; key: K): bool {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc setPolicy[K, V](t: var DITab[K, V]; numer = 0; denom = 0; minFree = 0;
+                     growPow2 = 0; rehash = 0; robinhood = 0) {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc symmetricDifference[K](s1, s2: DITab[K, void]): DITab[K, void]
+
+ + +  Source +  Edit + +
+
+
+
proc take[K, V: not void](t: var DITab[K, V]; key: K; val: var V): bool {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc take[K](t: var DITab[K, void]; key: var K): bool {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc toDITab[K, V: not void](pairs: openArray[(K, V)]; dups = false): DITab[K, V]
+
+ + +  Source +  Edit + +
+
+
+
proc toDITab[K](keys: openArray[K]; dups = false): DITab[K, void]
+
+ + +  Source +  Edit + +
+
+
+
proc union[K](s1, s2: DITab[K, void]): DITab[K, void]
+
+ + +  Source +  Edit + +
+
+ +
+
+

Iterators

+
+
+
iterator hcodes[K, V](t: DITab[K, V]): (int, Hash)
+
+ + +  Source +  Edit + +
+
+
+
iterator items[K](t: DITab[K, void]): K
+
+ + +  Source +  Edit + +
+
+
+
iterator keys[K, V](t: DITab[K, V]): K
+
+ + +  Source +  Edit + +
+
+
+
iterator mitems[K](t: var DITab[K, void]): var K
+
+ + +  Source +  Edit + +
+
+
+
iterator mpairs[K, V: not void](t: DITab[K, V]): (K, var V)
+
+ + +  Source +  Edit + +
+
+
+
iterator mvalues[K, V](t: var DITab[K, V]): var V
+
+ + +  Source +  Edit + +
+
+
+
iterator pairs[K, V: not void](t: DITab[K, V]): (K, V)
+
+ + +  Source +  Edit + +
+
+
+
iterator pairs[K](t: DITab[K, void]): (int, K)
+
+ + +  Source +  Edit + +
+
+
+
iterator topByVal[K, V](c: DITab[K, V]; n = 10; min = V.low): (K, V)
+
+ + +  Source +  Edit + +
+
+
+
iterator values[K, V](t: DITab[K, V]): V
+
+ + +  Source +  Edit + +
+
+ +
+
+

Templates

+
+
+
template editOrInit[K, V](t: var DITab[K, V]; key: K; v, body1, body2: untyped)
+
+ + +  Source +  Edit + +
+
+
+
template withValue[K, V](t: var DITab[K, V]; key: K;
+                         value, body1, body2: untyped)
+
+ + +  Source +  Edit + +
+
+
+
template withValue[K, V](t: var DITab[K, V]; key: K; value, body: untyped)
+
+ + +  Source +  Edit + +
+
+ +
+ +
+
+ +
+ +
+
+
+ + + diff --git a/adix/ditab.idx b/adix/ditab.idx new file mode 100644 index 0000000..438cef0 --- /dev/null +++ b/adix/ditab.idx @@ -0,0 +1,87 @@ +DITab adix/ditab.html#DITab ditab: DITab +DISet adix/ditab.html#DISet ditab: DISet +len adix/ditab.html#len,DITab[K,V] ditab: len[K, V](t: DITab[K, V]): int +depths adix/ditab.html#depths,DITab[K,V] ditab: depths[K, V](t: DITab[K, V]): seq[int] +diInitialSize adix/ditab.html#diInitialSize ditab: diInitialSize +diNumer adix/ditab.html#diNumer ditab: diNumer +diDenom adix/ditab.html#diDenom ditab: diDenom +diMinFree adix/ditab.html#diMinFree ditab: diMinFree +diGrowPow2 adix/ditab.html#diGrowPow2 ditab: diGrowPow2 +diRehash adix/ditab.html#diRehash ditab: diRehash +diRobinHood adix/ditab.html#diRobinHood ditab: diRobinHood +init adix/ditab.html#init,DITab[K,V],int,int,int,int,int ditab: init[K, V](t: var DITab[K, V]; initialSize = 0; numer = 0; denom = 0;\n minFree = 0; growPow2 = 0; rehash = false; robinhood = false) +initDITab adix/ditab.html#initDITab,int,int,int,int,int ditab: initDITab[K, V](initialSize = 0; numer = 0; denom = 0; minFree = 0;\n growPow2 = 0; rehash = false; robinhood = false): DITab[K, V] +setPolicy adix/ditab.html#setPolicy,DITab[K,V],int,int,int,int,int,int ditab: setPolicy[K, V](t: var DITab[K, V]; numer = 0; denom = 0; minFree = 0;\n growPow2 = 0; rehash = 0; robinhood = 0) +rightSize adix/ditab.html#rightSize,int,int,int,int ditab: rightSize(count: int; numer = 0; denom = 0; minFree = 0): int +getCap adix/ditab.html#getCap,DITab[K,V] ditab: getCap[K, V](t: var DITab[K, V]): int +setCap adix/ditab.html#setCap,DITab[K,V],int ditab: setCap[K, V](t: var DITab[K, V]; newSize = -1) +contains adix/ditab.html#contains,DITab[K,V],K ditab: contains[K, V](t: DITab[K, V]; key: K): bool +containsOrIncl adix/ditab.html#containsOrIncl,DITab[K,void],K ditab: containsOrIncl[K](t: var DITab[K, void]; key: K): bool +setOrIncl adix/ditab.html#setOrIncl,DITab[K,void],K ditab: setOrIncl[K](t: var DITab[K, void]; key: K): bool +mgetOrPut adix/ditab.html#mgetOrPut,DITab[K,V],K,V ditab: mgetOrPut[K, V](t: var DITab[K, V]; key: K; val: V): var V +mgetOrPut adix/ditab.html#mgetOrPut,DITab[K,V],K,V,bool ditab: mgetOrPut[K, V](t: var DITab[K, V]; key: K; val: V; had: var bool): var V +editOrInit adix/ditab.html#editOrInit.t,DITab[K,V],K,untyped,untyped,untyped ditab: editOrInit[K, V](t: var DITab[K, V]; key: K; v, body1, body2: untyped) +missingOrExcl adix/ditab.html#missingOrExcl,DITab[K,V],K ditab: missingOrExcl[K, V](t: var DITab[K, V]; key: K): bool +take adix/ditab.html#take,DITab[K,void],K ditab: take[K](t: var DITab[K, void]; key: var K): bool +take adix/ditab.html#take,DITab[K: not void,V: not void],K,V ditab: take[K, V: not void](t: var DITab[K, V]; key: K; val: var V): bool +pop adix/ditab.html#pop,DITab[K,void] ditab: pop[K](t: var DITab[K, void]): K +pop adix/ditab.html#pop,DITab[K: not void,V: not void] ditab: pop[K, V: not void](t: var DITab[K, V]): (K, V) +clear adix/ditab.html#clear,DITab[K,V] ditab: clear[K, V](t: var DITab[K, V]) +items adix/ditab.html#items.i,DITab[K,void] ditab: items[K](t: DITab[K, void]): K +mitems adix/ditab.html#mitems.i,DITab[K,void] ditab: mitems[K](t: var DITab[K, void]): var K +pairs adix/ditab.html#pairs.i,DITab[K,void] ditab: pairs[K](t: DITab[K, void]): (int, K) +pairs adix/ditab.html#pairs.i,DITab[K: not void,V: not void] ditab: pairs[K, V: not void](t: DITab[K, V]): (K, V) +mpairs adix/ditab.html#mpairs.i,DITab[K: not void,V: not void] ditab: mpairs[K, V: not void](t: DITab[K, V]): (K, var V) +hcodes adix/ditab.html#hcodes.i,DITab[K,V] ditab: hcodes[K, V](t: DITab[K, V]): (int, Hash) +debugDump adix/ditab.html#debugDump,DITab[K,V],string ditab: debugDump[K, V](t: DITab[K, V]; label = "") +keys adix/ditab.html#keys.i,DITab[K,V] ditab: keys[K, V](t: DITab[K, V]): K +values adix/ditab.html#values.i,DITab[K,V] ditab: values[K, V](t: DITab[K, V]): V +mvalues adix/ditab.html#mvalues.i,DITab[K,V] ditab: mvalues[K, V](t: var DITab[K, V]): var V +pop adix/ditab.html#pop,DITab[K,void],K ditab: pop[K](s: var DITab[K, void]; key: var K): bool +incl adix/ditab.html#incl,DITab[K,void],K ditab: incl[K](s: var DITab[K, void]; elt: K) +excl adix/ditab.html#excl,DITab[K,void],K ditab: excl[K](s: var DITab[K, void]; elt: K) +incl adix/ditab.html#incl,DITab[K,void],DITab[K,void] ditab: incl[K](s: var DITab[K, void]; other: DITab[K, void]) +excl adix/ditab.html#excl,DITab[K,void],DITab[K,void] ditab: excl[K](s: var DITab[K, void]; other: DITab[K, void]) +card adix/ditab.html#card,DITab[K,void] ditab: card[K](s: DITab[K, void]): int +union adix/ditab.html#union,DITab[K,void],DITab[K,void] ditab: union[K](s1, s2: DITab[K, void]): DITab[K, void] +intersection adix/ditab.html#intersection,DITab[K,void],DITab[K,void] ditab: intersection[K](s1, s2: DITab[K, void]): DITab[K, void] +difference adix/ditab.html#difference,DITab[K,void],DITab[K,void] ditab: difference[K](s1, s2: DITab[K, void]): DITab[K, void] +symmetricDifference adix/ditab.html#symmetricDifference,DITab[K,void],DITab[K,void] ditab: symmetricDifference[K](s1, s2: DITab[K, void]): DITab[K, void] +`+` adix/ditab.html#+,DITab[K,void],DITab[K,void] ditab: `+`[K](s1, s2: DITab[K, void]): DITab[K, void] +`*` adix/ditab.html#*,DITab[K,void],DITab[K,void] ditab: `*`[K](s1, s2: DITab[K, void]): DITab[K, void] +`-` adix/ditab.html#-,DITab[K,void],DITab[K,void] ditab: `-`[K](s1, s2: DITab[K, void]): DITab[K, void] +`-+-` adix/ditab.html#-+-,DITab[K,void],DITab[K,void] ditab: `-+-`[K](s1, s2: DITab[K, void]): DITab[K, void] +disjoint adix/ditab.html#disjoint,DITab[K,void],DITab[K,void] ditab: disjoint[K](s1, s2: DITab[K, void]): bool +`<=` adix/ditab.html#<=,DITab[K,void],DITab[K,void] ditab: `<=`[K](s, t: DITab[K, void]): bool +`<` adix/ditab.html#<,DITab[K,void],DITab[K,void] ditab: `<`[K](s, t: DITab[K, void]): bool +`==` adix/ditab.html#==,DITab[K,void],DITab[K,void] ditab: `==`[K](s, t: DITab[K, void]): bool +map adix/ditab.html#map,DITab[K,void],proc(K) ditab: map[K, A](data: DITab[K, void]; op: proc (x: K): A {.closure.}): DITab[A, void] +toDITab adix/ditab.html#toDITab,openArray[K] ditab: toDITab[K](keys: openArray[K]; dups = false): DITab[K, void] +`$` adix/ditab.html#$,DITab[K,void] ditab: `$`[K](s: DITab[K, void]): string +hash adix/ditab.html#hash,DITab[K,void] ditab: hash[K](s: DITab[K, void]): Hash +depthStats adix/ditab.html#depthStats,DITab[K,V] ditab: depthStats[K, V](s: DITab[K, V]): tuple[m1, m2: float, mx: int] +toDITab adix/ditab.html#toDITab,openArray[] ditab: toDITab[K, V: not void](pairs: openArray[(K, V)]; dups = false): DITab[K, V] +`$` adix/ditab.html#$,DITab[K: not void,V: not void] ditab: `$`[K, V: not void](t: DITab[K, V]): string +pop adix/ditab.html#pop,DITab[K: not void,V: not void],K,V ditab: pop[K, V: not void](t: var DITab[K, V]; key: K; val: var V): bool +withValue adix/ditab.html#withValue.t,DITab[K,V],K,untyped,untyped ditab: withValue[K, V](t: var DITab[K, V]; key: K; value, body: untyped) +withValue adix/ditab.html#withValue.t,DITab[K,V],K,untyped,untyped,untyped ditab: withValue[K, V](t: var DITab[K, V]; key: K; value, body1, body2: untyped) +`[]` adix/ditab.html#[],DITab[K,V],K ditab: `[]`[K, V](t: DITab[K, V]; key: K): V +`[]` adix/ditab.html#[],DITab[K,V],K_2 ditab: `[]`[K, V](t: var DITab[K, V]; key: K): var V +`[]=` adix/ditab.html#[]=,DITab[K,V],K,V ditab: `[]=`[K, V](t: var DITab[K, V]; key: K; val: V) +`{}` adix/ditab.html#{},DITab[K,V],K ditab: `{}`[K, V](t: DITab[K, V]; key: K): V +`{}` adix/ditab.html#{},DITab[K,V],K_2 ditab: `{}`[K, V](t: var DITab[K, V]; key: K): var V +`{}=` adix/ditab.html#{}=,DITab[K,V],K,V ditab: `{}=`[K, V](t: var DITab[K, V]; key: K; val: V) +hasKey adix/ditab.html#hasKey,DITab[K,V],K ditab: hasKey[K, V](t: DITab[K, V]; key: K): bool +hasKeyOrPut adix/ditab.html#hasKeyOrPut,DITab[K,V],K,V ditab: hasKeyOrPut[K, V](t: var DITab[K, V]; key: K; val: V): bool +getOrDefault adix/ditab.html#getOrDefault,DITab[K,V],K,typeof(default(V)) ditab: getOrDefault[K, V](t: DITab[K, V]; key: K; default = default(V)): V +del adix/ditab.html#del,DITab[K,V],K ditab: del[K, V](t: var DITab[K, V]; key: K) +`==` adix/ditab.html#==,DITab[K,V],DITab[K,V] ditab: `==`[K, V](x, y: DITab[K, V]): bool +indexBy adix/ditab.html#indexBy,A,proc(V) ditab: indexBy[A, K, V](collection: A; index: proc (x: V): K): DITab[K, V] +editKey adix/ditab.html#editKey,DITab[K,V],K,K ditab: editKey[K, V](t: var DITab[K, V]; old, new: K) +nthKey adix/ditab.html#nthKey,DITab[K,void],int ditab: nthKey[K](t: DITab[K, void]; n: int): K +nthPair adix/ditab.html#nthPair,DITab[K: not void,V: not void],int ditab: nthPair[K, V: not void](t: DITab[K, V]; n: int): (K, V) +nthPair adix/ditab.html#nthPair,DITab[K: not void,V: not void],int_2 ditab: nthPair[K, V: not void](t: var DITab[K, V]; n: int): (K, ptr V) +inc adix/ditab.html#inc,DITab[K: SomeInteger,V: SomeInteger],K,SomeInteger ditab: inc[K, V: SomeInteger](t: var DITab[K, V]; key: K; amount: SomeInteger = 1) +merge adix/ditab.html#merge,DITab[K: SomeInteger,V: SomeInteger],DITab[K: SomeInteger,V: SomeInteger] ditab: merge[K, V: SomeInteger](c: var DITab[K, V]; b: DITab[K, V]) +topByVal adix/ditab.html#topByVal.i,DITab[K,V],int ditab: topByVal[K, V](c: DITab[K, V]; n = 10; min = V.low): (K, V) +initDISet adix/ditab.html#initDISet,int ditab: initDISet[K](initialSize = 0; numer = diNumer; denom = diDenom;\n minFree = diMinFree; growPow2 = diGrowPow2; rehash = diRehash;\n robinhood = diRobinHood): DISet[K] diff --git a/adix/lghisto.html b/adix/lghisto.html new file mode 100644 index 0000000..53a772c --- /dev/null +++ b/adix/lghisto.html @@ -0,0 +1,523 @@ + + + + + + + + + + + + + + + + + + +adix/lghisto + + + + + + + + +
+
+

adix/lghisto

+
+ +   Source +  Edit + +
+
+ +

LgHisto is a simple application of BISTs to log-spaced histograms that can yield efficient, dynamic quantiles. log-spacing supports high dynamic range without inordinate cost while Fenwick/BIST supports dynamic membership with operation-balanced perf.

+

Quantile error is absolute {not relative to q*(1-q) like a t-Digest} & easily bounded as <~ 1/2 bin width {about 10^(lg(b/a)/n/2)}. So, if you need 3 places or your data is clustered within a few orders of magnitude then you can likely just use 1e4 bins and your counters will remain very L1 cache resident, depending upon resource competition. Cache is the main cost Re: speed. Re: space, since 99% of bins are 0 in many cases, net/disk transfer cost can be improved via simple run-length encoding.

+

The way Fenwick BISTs work, the generic parameter C must be a wide enough integer type to hold both elemental bin counts AND grand totals. uint32 is likely enough for many applications, though some might sneak by with uint16 and a few might need uint64. This scales bin size/space cost.

+

t-Digests are a well marketed competitor using ~10X less space BUT with >>5X slower quantiles of similar accuracy. Actual cost is sensitive to operation mixes. { This may change, but present t-Digest impls, even with trees, linear scan for quantile/CDFs. None even offer "batch" APIs to do N quantiles in one such scan. "Histo B-trees" should allow better scaling for such. } A BIST basis differs from t-Digests in other important ways. First, BISTs are well suited for pop or moving data window operations with strict finite memory, for e.g. translation of full streams to moving quantiles as in Bollinger Band style smooths. Second, floating point weights for EWMA-like decaying memory are not possible since FP arithmetic kind of breaks BISTs.

+

+
+

Imports

+
+bist +
+
+

Types

+
+
+
LgHisto[C] = object
+  n: int
+  a, b: float
+  aLn, h, hInv: float
+  bist: Bist[C]
+
+
+ +Log-spaced histogram with Bist[C] backing +  Source +  Edit + +
+
+ +
+
+

Procs

+
+
+
proc `$`[C](s: LgHisto[C]; nonZero = true): string
+
+ +Formatting operator; Warning: output can be large, esp. if nonZero=false +  Source +  Edit + +
+
+
+
func add[F, C](s: var LgHisto[C]; x: F; w = 1.C)
+
+ +Increment bin for value x by weight w +  Source +  Edit + +
+
+
+
func binAB[F, C](s: LgHisto[C]; x: F): (float, float)
+
+ +Range in data space of the bin containing x; Costs 2 fromIxs. +  Source +  Edit + +
+
+
+
func bist[C](s: LgHisto[C]): Bist[C]
+
+ + +  Source +  Edit + +
+
+
+
func cdf[F, C](s: LgHisto[C]; x: F): C
+
+ +Raw count; Leave to caller to multiply by 1/s.bist.count; XXX Interpolate? +  Source +  Edit + +
+
+
+
func fromIx[F, C](s: LgHisto[C]; i: int; offset: F = 0.5): F
+
+ +Geometric mean of left&right edge log-shifted offset fraction into bin +  Source +  Edit + +
+
+
+
func high[C](s: LgHisto[C]): float
+
+ + +  Source +  Edit + +
+
+
+
func init[C](s: var LgHisto[C]; a = 1e-16; b = 1e+20; n = 8300)
+
+ +Init histo w/2n+1 log-spaced bins: [-∞..-b; -b..-a; 0; a..<b; b..∞]. +  Source +  Edit + +
+
+
+
func initLgHisto[C](a = 1e-16; b = 1e+20; n = 8300): LgHisto[C]
+
+ +Get Histo w/2n+1 log-spaced bins: [-inf..<-b; -b..<-a; 0; a..<b; b..inf]. +  Source +  Edit + +
+
+
+
func low[C](s: LgHisto[C]): float
+
+ + +  Source +  Edit + +
+
+
+
func merge[C](dst: var LgHisto[C]; src: LgHisto[C])
+
+ +Merge counts from src into dst. +  Source +  Edit + +
+
+
+
func nBin[C](s: LgHisto[C]): int
+
+ + +  Source +  Edit + +
+
+
+
func overflows[C](s: LgHisto[C]): int
+
+ + +  Source +  Edit + +
+
+
+
func pop[F, C](s: var LgHisto[C]; x: F; w = 1.C)
+
+ +Alias for add with a negative weight argument +  Source +  Edit + +
+
+
+
func quantile[F, C](s: LgHisto[C]; q: F): F
+
+ +Basic quantile; XXX Can log-spacing savvy interpolation be more accurate? +  Source +  Edit + +
+
+
+
func space[C](s: LgHisto[C]): int
+
+ +Estimate space taken up by data structure in bytes +  Source +  Edit + +
+
+
+
func toIx[F, C](s: LgHisto[C]; x: F): int
+
+ +Find bin index for value x; underflows get [0] & overflows get [2*n]. +  Source +  Edit + +
+
+
+
func underflows[C](s: LgHisto[C]): int
+
+ + +  Source +  Edit + +
+
+ +
+
+

Iterators

+
+
+
iterator bins[C](s: LgHisto[C]): (float, float, C)
+
+ +Yield (lo, hi, count) for each bin covered +  Source +  Edit + +
+
+ +
+ +
+
+ +
+ +
+
+
+ + + diff --git a/adix/lghisto.idx b/adix/lghisto.idx new file mode 100644 index 0000000..c967be0 --- /dev/null +++ b/adix/lghisto.idx @@ -0,0 +1,20 @@ +LgHisto adix/lghisto.html#LgHisto lghisto: LgHisto +underflows adix/lghisto.html#underflows,LgHisto[C] lghisto: underflows[C](s: LgHisto[C]): int +overflows adix/lghisto.html#overflows,LgHisto[C] lghisto: overflows[C](s: LgHisto[C]): int +low adix/lghisto.html#low,LgHisto[C] lghisto: low[C](s: LgHisto[C]): float +high adix/lghisto.html#high,LgHisto[C] lghisto: high[C](s: LgHisto[C]): float +nBin adix/lghisto.html#nBin,LgHisto[C] lghisto: nBin[C](s: LgHisto[C]): int +bist adix/lghisto.html#bist,LgHisto[C] lghisto: bist[C](s: LgHisto[C]): Bist[C] +init adix/lghisto.html#init,LgHisto[C],float,float,int lghisto: init[C](s: var LgHisto[C]; a = 1e-16; b = 1e+20; n = 8300) +initLgHisto adix/lghisto.html#initLgHisto,float,float,int lghisto: initLgHisto[C](a = 1e-16; b = 1e+20; n = 8300): LgHisto[C] +space adix/lghisto.html#space,LgHisto[C] lghisto: space[C](s: LgHisto[C]): int +toIx adix/lghisto.html#toIx,LgHisto[C],F lghisto: toIx[F, C](s: LgHisto[C]; x: F): int +fromIx adix/lghisto.html#fromIx,LgHisto[C],int,F lghisto: fromIx[F, C](s: LgHisto[C]; i: int; offset: F = 0.5): F +binAB adix/lghisto.html#binAB,LgHisto[C],F lghisto: binAB[F, C](s: LgHisto[C]; x: F): (float, float) +add adix/lghisto.html#add,LgHisto[C],F,typeof(1.C) lghisto: add[F, C](s: var LgHisto[C]; x: F; w = 1.C) +pop adix/lghisto.html#pop,LgHisto[C],F,typeof(1.C) lghisto: pop[F, C](s: var LgHisto[C]; x: F; w = 1.C) +bins adix/lghisto.html#bins.i,LgHisto[C] lghisto: bins[C](s: LgHisto[C]): (float, float, C) +`$` adix/lghisto.html#$,LgHisto[C] lghisto: `$`[C](s: LgHisto[C]; nonZero = true): string +quantile adix/lghisto.html#quantile,LgHisto[C],F lghisto: quantile[F, C](s: LgHisto[C]; q: F): F +cdf adix/lghisto.html#cdf,LgHisto[C],F lghisto: cdf[F, C](s: LgHisto[C]; x: F): C +merge adix/lghisto.html#merge,LgHisto[C],LgHisto[C] lghisto: merge[C](dst: var LgHisto[C]; src: LgHisto[C]) diff --git a/adix/lptabz.html b/adix/lptabz.html new file mode 100644 index 0000000..ba808b2 --- /dev/null +++ b/adix/lptabz.html @@ -0,0 +1,2139 @@ + + + + + + + + + + + + + + + + + + +adix/lptabz + + + + + + + + +
+
+

adix/lptabz

+
+
+
+ +     Dark Mode +
+ +
+ Search: +
+
+ Group by: + +
+ + +
+   Source +  Edit + +
+
+ +

This module provides an (in|un)ordered multiset/multitable representation via Linear Probing with aging friendly Backshift Delete(Knuth TAOCPv3) & optional Robin Hood re-org (Celis,1986). Linear probing collision clusters yields "no tuning needed" locality of reference: 1 DRAM hit per access for large tables of small items. RH sorts collision clusters by search depth which adds nice properties: faster miss search (eg. for inserts, usually compensating for data motion) and min depth variance (no unlucky keys). The latter enables ~100% table space utilization (we need one empty slot to halt some loops).

+

Misuse/attack is always possible. Note that inserting many duplicates causes overlong scans as hash collisions can and is thus "misuse". If this is likely then use V=seq[T] instead. We provide a few mitigations

+
triggered, like table growth, by overlong scans on underfull tables:
+
  1. automatic rehash of user hash output with a strong integer hash,
  2. +
  3. overlong scan warnings (disabled in danger mode),
  4. +
  5. automatic Robin Hood re-org activation, and
  6. +
  7. use althash.getSalt to allow hard to predict per-table hash salt.
  8. +
+
+
+

Program-wide-tunable defaults are to rehash, warn, re-org & salt with vmAddr since this is the safest portable mode, but most can also be set init time.

+

MultiSET personality ensues when the V value type generic parameter is void. Otherwise the style of interface is multiTABLE. Every attempt is made for either personality to be drop-in compatible with Nim's standard library sets & tables, but extra features are provided here.

+

Space-time optimization of a sentinel key (a value of K disallowed for ordinary keys) is supported through the final two generic parameters, Z, and z. If Z is void, hash codes are saved and z is ignored. If Z==K, z is the sentinel key value.

+

If Z is neither K nor void then compact, insertion-ordered mode is used and z means how many bits of hcode are saved beside an index into a dense seq[(K,V)]. 6..8 bits avoids most "double cache misses" for miss lookups/inserts. z=0 works if space matters more than time.

+

+ +
+

Types

+
+
+
LPSet[K] = LPTabz[K, void, void, 0]
+
+ +LPTabz for no-sentinel Set +  Source +  Edit + +
+
+
+
LPSetz[K; Z; z] = LPTabz[K, void, Z, z]
+
+ +LPTabz for sentinel Set +  Source +  Edit + +
+
+
+
LPTab[K; V] = LPTabz[K, V, void, 0]
+
+ +LPTabz for no-sentinel Tab +  Source +  Edit + +
+
+
+
LPTabz[K; V; Z; z] = object
+  when Z is K or Z is void:
+      data: seq[HCell[K, V, Z, z]]
+      count: int
+
+  else:
+      data: seq[HCell[K, V, Z, z]]
+      idx: SeqUint
+      hcBits: uint8
+
+  numer, denom, minFree, growPow2, pow2: uint8
+  rehash, robin: bool
+  salt: Hash
+
+
+ +Robin Hood Hash Set +  Source +  Edit + +
+
+ +
+
+

Vars

+
+
+
lpDenom = 1
+
+ +default denominator for lg(n) probe depth limit +  Source +  Edit + +
+
+
+
lpGrowPow2 = 1
+
+ +default growth power of 2; 1 means double +  Source +  Edit + +
+
+
+
lpInitialSize = 2
+
+ +default initial size aka capacity aka cap +  Source +  Edit + +
+
+
+
lpMaxWarn = 10
+
+ +Most warnings per program invocation +  Source +  Edit + +
+
+
+
lpMinFree = 1
+
+ +default min free slots; (>= 1) +  Source +  Edit + +
+
+
+
lpNumer = 3
+
+ +default numerator for lg(n) probe depth limit +  Source +  Edit + +
+
+
+
lpRehash = false
+
+ +default hcode rehashing behavior; auto-activated +  Source +  Edit + +
+
+
+
lpRobinHood = false
+
+ +default to Robin Hood re-org; auto-activated +  Source +  Edit + +
+
+
+
lpWarn = stderr
+
+ +Set to wherever you want warnings to go +  Source +  Edit + +
+
+ +
+
+

Procs

+
+
+
proc `$`[K, V: not void; Z; z: static int](t: LPTabz[K, V, Z, z]): string
+
+ + +  Source +  Edit + +
+
+
+
proc `$`[K, Z; z: static int](s: LPTabz[K, void, Z, z]): string
+
+ + +  Source +  Edit + +
+
+
+
proc `*`[K, Z; z: static int](s1, s2: LPTabz[K, void, Z, z]): LPTabz[K, void, Z,
+    z]
+
+ + +  Source +  Edit + +
+
+
+
proc `+`[K, Z; z: static int](s1, s2: LPTabz[K, void, Z, z]): LPTabz[K, void, Z,
+    z]
+
+ + +  Source +  Edit + +
+
+
+
proc `-+-`[K, Z; z: static int](s1, s2: LPTabz[K, void, Z, z]): LPTabz[K, void,
+    Z, z]
+
+ + +  Source +  Edit + +
+
+
+
proc `-`[K, Z; z: static int](s1, s2: LPTabz[K, void, Z, z]): LPTabz[K, void, Z,
+    z]
+
+ + +  Source +  Edit + +
+
+
+
proc `<=`[K, Z; z: static int](s, t: LPTabz[K, void, Z, z]): bool
+
+ + +  Source +  Edit + +
+
+
+
proc `<`[K, Z; z: static int](s, t: LPTabz[K, void, Z, z]): bool
+
+ + +  Source +  Edit + +
+
+
+
proc `==`[K, V: not void; Z; z: static int](x, y: LPTabz[K, V, Z, z]): bool
+
+ + +  Source +  Edit + +
+
+
+
proc `==`[K, Z; z: static int](s, t: LPTabz[K, void, Z, z]): bool
+
+ + +  Source +  Edit + +
+
+
+
proc `[]=`[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K; val: V) {.
+    inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc `[]`[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]; key: K): V {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc `[]`[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K): var V {.
+    inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc `{}=`[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K; val: V) {.
+    inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc `{}`[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]; key: K): V {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc `{}`[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K): var V {.
+    inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc add[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K; val: V) {.
+    inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc add[K, Z; z: static int](t: var LPTabz[K, void, Z, z]; key: K) {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc allValues[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]; key: K;
+                                       vals: var seq[V]): bool {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc card[K, Z; z: static int](s: LPTabz[K, void, Z, z]): int {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc clear[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z])
+
+ + +  Source +  Edit + +
+
+
+
proc contains[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]; key: K): bool {.
+    inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc containsOrIncl[K, Z; z: static int](t: var LPTabz[K, void, Z, z]; key: K): bool {.
+    inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc debugDump[K, V, Z; z: static int](s: LPTabz[K, V, Z, z]; label = "")
+
+ + +  Source +  Edit + +
+
+
+
proc del[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K) {.inline.}
+
+ +delete one key key from t; If you want to know if it was present then use missingOrExcl, take, or pop instead. +  Source +  Edit + +
+
+
+
proc depths[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]): seq[int]
+
+ +Compute & return exact distribution of search depths over a set +  Source +  Edit + +
+
+
+
proc depthStats[K, V, Z; z: static int](s: LPTabz[K, V, Z, z]): tuple[
+    m1, m2: float, mx: int]
+
+ +Performance Forensics +  Source +  Edit + +
+
+
+
proc difference[K, Z; z: static int](s1, s2: LPTabz[K, void, Z, z]): LPTabz[K,
+    void, Z, z]
+
+ + +  Source +  Edit + +
+
+
+
proc disjoint[K, Z; z: static int](s1, s2: LPTabz[K, void, Z, z]): bool
+
+ + +  Source +  Edit + +
+
+
+
proc editKey[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; old, new: K)
+
+ +Insertion-ordered tables support editing keys while keeping iteration order. +  Source +  Edit + +
+
+
+
proc excl[K, Z; z: static int](s: var LPTabz[K, void, Z, z];
+                               other: LPTabz[K, void, Z, z])
+
+ + +  Source +  Edit + +
+
+
+
proc excl[K, Z; z: static int](s: var LPTabz[K, void, Z, z]; elt: K) {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc getCap[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]): int {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc getOrDefault[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]; key: K;
+    default = default(V)): V {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc hash[K, Z; z: static int](s: LPTabz[K, void, Z, z]): Hash
+
+ + +  Source +  Edit + +
+
+
+
proc hasKey[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]; key: K): bool {.
+    inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc hasKeyOrPut[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K;
+    val: V): bool {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc inc[K, V, Z; z: static int](c: var LPTabz[K, V, Z, z]; key: K;
+                                 amount: V = 1) {.inline.}
+
+ +Increment a key counter in table t by amount. +  Source +  Edit + +
+
+
+
proc incl[K, Z; z: static int](s: var LPTabz[K, void, Z, z];
+                               other: LPTabz[K, void, Z, z])
+
+ + +  Source +  Edit + +
+
+
+
proc incl[K, Z; z: static int](s: var LPTabz[K, void, Z, z]; elt: K) {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc indexBy[A, K, V, Z; z: static int](collection: A; index: proc (x: V): K): LPTabz[
+    K, V, Z, z]
+
+ + +  Source +  Edit + +
+
+
+
proc init[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z];
+                                  initialSize = lpInitialSize; numer = lpNumer;
+                                  denom = lpDenom; minFree = lpMinFree;
+                                  growPow2 = lpGrowPow2; rehash = lpRehash;
+                                  robinhood = lpRobinHood) {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc initLPSet[K](initialSize = lpInitialSize; numer = lpNumer; denom = lpDenom;
+                  minFree = lpMinFree; growPow2 = lpGrowPow2; rehash = lpRehash;
+                  robinhood = lpRobinHood): LPSet[K] {.inline.}
+
+ +Return an LPTabz specialized to sets with no sentinel key. See initLPTabz for parameter details. +  Source +  Edit + +
+
+
+
proc initLPSetz[K, Z; z: static int](initialSize = lpInitialSize;
+                                     numer = lpNumer; denom = lpDenom;
+                                     minFree = lpMinFree; growPow2 = lpGrowPow2;
+                                     rehash = lpRehash; robinhood = lpRobinHood): LPSetz[
+    K, Z, z] {.inline.}
+
+ +Return an LPTabz specialized to sets with a sentinel key. See initLPTabz for parameter details. +  Source +  Edit + +
+
+
+
proc initLPTab[K, V](initialSize = lpInitialSize; numer = lpNumer;
+                     denom = lpDenom; minFree = lpMinFree;
+                     growPow2 = lpGrowPow2; rehash = lpRehash;
+                     robinhood = lpRobinHood): LPTab[K, V] {.inline.}
+
+ +Return an LPTabz specialized to tables with no sentinel key. See initLPTabz for parameter details. +  Source +  Edit + +
+
+
+
proc initLPTabz[K, V, Z; z: static int](initialSize = lpInitialSize;
+                                        numer = lpNumer; denom = lpDenom;
+                                        minFree = lpMinFree;
+                                        growPow2 = lpGrowPow2;
+                                        rehash = lpRehash;
+                                        robinhood = lpRobinHood): LPTabz[K, V,
+    Z, z] {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc intersection[K, Z; z: static int](s1, s2: LPTabz[K, void, Z, z]): LPTabz[K,
+    void, Z, z]
+
+ + +  Source +  Edit + +
+
+
+
proc len[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]): int {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc load[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; path: string)
+
+ + +  Source +  Edit + +
+
+
+
proc loadLPTabz[K, V, Z; z: static int](path: string): LPTabz[K, V, Z, z]
+
+ + +  Source +  Edit + +
+
+
+
proc map[K, A, Z; z: static int](data: LPTabz[K, void, Z, z];
+                                 op: proc (x: K): A {.closure.}): LPTabz[A,
+    void, Z, z]
+
+ + +  Source +  Edit + +
+
+
+
proc merge[K, V, Z; z: static int](c: var LPTabz[K, V, Z, z];
+                                   b: LPTabz[K, V, Z, z])
+
+ +Merge values from CountTable/histogram b into histogram c. +  Source +  Edit + +
+
+
+
proc mgetOrPut[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K; val: V): var V {.
+    inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc mgetOrPut[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K;
+                                       val: V; had: var bool): var V {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc missingOrExcl[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K): bool
+
+ + +  Source +  Edit + +
+
+
+
proc mmap[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; path: string)
+
+ +NOTE: Read-Only memory map; Attempted edits => run-time errors (like SEGV). +  Source +  Edit + +
+
+
+
proc nthKey[K, Z; z: static int](t: LPTabz[K, void, Z, z]; n: int): K {.inline.}
+
+ +Insertion-ordered multisets support 0-origin nth-in-order key. +  Source +  Edit + +
+
+
+
proc nthPair[K, V: not void; Z; z: static int](t: LPTabz[K, V, Z, z]; n: int): (
+    K, V)
+
+ +Insertion-ordered tables support 0-origin nth-in-order pair. +  Source +  Edit + +
+
+
+
proc nthPair[K, V: not void; Z; z: static int](t: var LPTabz[K, V, Z, z]; n: int): (
+    K, ptr V) {.inline.}
+
+ +Insertion-ordered tables support 0-origin nth-in-order pair w/editable val. +  Source +  Edit + +
+
+
+
proc numItems[K, Z; z: static int](t: LPTabz[K, void, Z, z]; key: K): int {.
+    inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc pop[K, V: not void; Z; z: static int](t: var LPTabz[K, V, Z, z]): (K, V) {.
+    inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc pop[K, V: not void; Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K;
+    val: var V): bool {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc pop[K, Z; z: static int](s: var LPTabz[K, void, Z, z]; key: var K): bool
+
+ + +  Source +  Edit + +
+
+
+
proc pop[K, Z; z: static int](t: var LPTabz[K, void, Z, z]): K {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc rightSize(count: int; numer = 0; denom = 0; minFree = 0): int {.inline,
+    ...deprecated: "Deprecated since 0.2; identity function", raises: [], tags: [].}
+
+
+ Deprecated: Deprecated since 0.2; identity function +
+ + +  Source +  Edit + +
+
+
+
proc save[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]; pathStub: string)
+
+ + +  Source +  Edit + +
+
+
+
proc setCap[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; newSize = -1)
+
+ + +  Source +  Edit + +
+
+
+
proc setOrIncl[K, Z; z: static int](t: var LPTabz[K, void, Z, z]; key: K): bool {.
+    inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc setPolicy[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z];
+                                       numer = lpNumer; denom = lpDenom;
+                                       minFree = lpMinFree;
+                                       growPow2 = lpGrowPow2; rehash = lpRehash;
+                                       robinhood = lpRobinHood) {.inline.}
+
+ +Must call setCap after changing certain params here (e.g. rehash). +  Source +  Edit + +
+
+
+
proc symmetricDifference[K, Z; z: static int](s1, s2: LPTabz[K, void, Z, z]): LPTabz[
+    K, void, Z, z]
+
+ + +  Source +  Edit + +
+
+
+
proc take[K, V: not void; Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K;
+    val: var V): bool {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc take[K, Z; z: static int](t: var LPTabz[K, void, Z, z]; key: var K): bool
+
+ + +  Source +  Edit + +
+
+
+
proc toLPTabz[K; V: not void; Z; z: static int](pairs: openArray[(K, V)];
+    dups = false): LPTabz[K, V, Z, z]
+
+ + +  Source +  Edit + +
+
+
+
proc toLPTabz[K; V: void; Z; z: static int](keys: openArray[K]; dups = false): LPTabz[
+    K, V, Z, z]
+
+ + +  Source +  Edit + +
+
+
+
proc union[K, Z; z: static int](s1, s2: LPTabz[K, void, Z, z]): LPTabz[K, void,
+    Z, z]
+
+ + +  Source +  Edit + +
+
+ +
+
+

Iterators

+
+
+
iterator allItems[K, Z; z: static int](s: LPTabz[K, void, Z, z]; key: K): K
+
+ + +  Source +  Edit + +
+
+
+
iterator allValues[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]; key: K): V
+
+ + +  Source +  Edit + +
+
+
+
iterator allValues[K, V, Z; z: static int](t: LPTabz[K, V, Z, z];
+    vals: var seq[V]): K
+
+ + +  Source +  Edit + +
+
+
+
iterator hcodes[K, Z; z: static int](s: LPTabz[K, void, Z, z]): (int, Hash)
+
+ + +  Source +  Edit + +
+
+
+
iterator items[K, Z; z: static int](s: LPTabz[K, void, Z, z]): K
+
+ + +  Source +  Edit + +
+
+
+
iterator keys[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]): K
+
+ + +  Source +  Edit + +
+
+
+
iterator mitems[K, Z; z: static int](s: var LPTabz[K, void, Z, z]): var K
+
+ + +  Source +  Edit + +
+
+
+
iterator mostCommon[K](xs: openArray[K]; n = 10): (K, int)
+
+ +Iterate over (n most common values in xs, their counts) tuples. +  Source +  Edit + +
+
+
+
iterator mpairs[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]): (K, var V)
+
+ + +  Source +  Edit + +
+
+
+
iterator mvalues[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]): var V
+
+ + +  Source +  Edit + +
+
+
+
iterator numItems[K, Z; z: static int](t: LPTabz[K, void, Z, z]): (K, int)
+
+ + +  Source +  Edit + +
+
+
+
iterator pairs[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]): (K, V)
+
+ + +  Source +  Edit + +
+
+
+
iterator pairs[K, Z; z: static int](t: LPTabz[K, void, Z, z]): (int, K)
+
+ + +  Source +  Edit + +
+
+
+
iterator topByVal[K, V, Z; z: static int](c: LPTabz[K, V, Z, z]; n = 10;
+    min = V.low): (K, V)
+
+ +Iterate from smallest to largest over biggest n items by value in c. If n==0 this is effectively heap sort of c by value V. +  Source +  Edit + +
+
+
+
iterator values[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]): V
+
+ + +  Source +  Edit + +
+
+ +
+
+

Templates

+
+
+
template editOrInit[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K;
+    v, found, missing: untyped): untyped
+
+ + +  Source +  Edit + +
+
+
+
template getItOrFail[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]; k: K;
+    found, missing): untyped
+
+ +Provide value it corresponding to key k in found or do missing. +  Source +  Edit + +
+
+
+
template withIt[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; k: K;
+                                        edit, init): untyped
+
+ +Provide value variable it corresponding to key k in both bodies that represents the value found|allocated in the table. +  Source +  Edit + +
+
+
+
template withValue[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K;
+    value, found, missing: untyped): untyped
+
+ + +  Source +  Edit + +
+
+
+
template withValue[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K;
+    value, found: untyped): untyped
+
+ + +  Source +  Edit + +
+
+ +
+ + +
+
+ +
+ +
+
+
+ + + diff --git a/adix/lptabz.idx b/adix/lptabz.idx new file mode 100644 index 0000000..98273c1 --- /dev/null +++ b/adix/lptabz.idx @@ -0,0 +1,108 @@ +LPTabz adix/lptabz.html#LPTabz lptabz: LPTabz +LPSetz adix/lptabz.html#LPSetz lptabz: LPSetz +LPTab adix/lptabz.html#LPTab lptabz: LPTab +LPSet adix/lptabz.html#LPSet lptabz: LPSet +lpInitialSize adix/lptabz.html#lpInitialSize lptabz: lpInitialSize +lpNumer adix/lptabz.html#lpNumer lptabz: lpNumer +lpDenom adix/lptabz.html#lpDenom lptabz: lpDenom +lpMinFree adix/lptabz.html#lpMinFree lptabz: lpMinFree +lpGrowPow2 adix/lptabz.html#lpGrowPow2 lptabz: lpGrowPow2 +lpRobinHood adix/lptabz.html#lpRobinHood lptabz: lpRobinHood +lpRehash adix/lptabz.html#lpRehash lptabz: lpRehash +lpWarn adix/lptabz.html#lpWarn lptabz: lpWarn +lpMaxWarn adix/lptabz.html#lpMaxWarn lptabz: lpMaxWarn +save adix/lptabz.html#save,LPTabz[K,V,Z,z],string lptabz: save[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]; pathStub: string) +load adix/lptabz.html#load,LPTabz[K,V,Z,z],string lptabz: load[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; path: string) +loadLPTabz adix/lptabz.html#loadLPTabz,string lptabz: loadLPTabz[K, V, Z; z: static int](path: string): LPTabz[K, V, Z, z] +mmap adix/lptabz.html#mmap,LPTabz[K,V,Z,z],string lptabz: mmap[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; path: string) +len adix/lptabz.html#len,LPTabz[K,V,Z,z] lptabz: len[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]): int +getCap adix/lptabz.html#getCap,LPTabz[K,V,Z,z] lptabz: getCap[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]): int +depths adix/lptabz.html#depths,LPTabz[K,V,Z,z] lptabz: depths[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]): seq[int] +init adix/lptabz.html#init,LPTabz[K,V,Z,z] lptabz: init[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z];\n initialSize = lpInitialSize; numer = lpNumer;\n denom = lpDenom; minFree = lpMinFree;\n growPow2 = lpGrowPow2; rehash = lpRehash;\n robinhood = lpRobinHood) +setCap adix/lptabz.html#setCap,LPTabz[K,V,Z,z],int lptabz: setCap[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; newSize = -1) +initLPTabz adix/lptabz.html#initLPTabz lptabz: initLPTabz[K, V, Z; z: static int](initialSize = lpInitialSize; numer = lpNumer;\n denom = lpDenom; minFree = lpMinFree;\n growPow2 = lpGrowPow2; rehash = lpRehash;\n robinhood = lpRobinHood): LPTabz[K, V, Z, z] +setPolicy adix/lptabz.html#setPolicy,LPTabz[K,V,Z,z] lptabz: setPolicy[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; numer = lpNumer;\n denom = lpDenom; minFree = lpMinFree;\n growPow2 = lpGrowPow2; rehash = lpRehash;\n robinhood = lpRobinHood) +rightSize adix/lptabz.html#rightSize,int,int,int,int lptabz: rightSize(count: int; numer = 0; denom = 0; minFree = 0): int +contains adix/lptabz.html#contains,LPTabz[K,V,Z,z],K lptabz: contains[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]; key: K): bool +containsOrIncl adix/lptabz.html#containsOrIncl,LPTabz[K,void,Z,z],K lptabz: containsOrIncl[K, Z; z: static int](t: var LPTabz[K, void, Z, z]; key: K): bool +setOrIncl adix/lptabz.html#setOrIncl,LPTabz[K,void,Z,z],K lptabz: setOrIncl[K, Z; z: static int](t: var LPTabz[K, void, Z, z]; key: K): bool +mgetOrPut adix/lptabz.html#mgetOrPut,LPTabz[K,V,Z,z],K,V lptabz: mgetOrPut[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K; val: V): var V +mgetOrPut adix/lptabz.html#mgetOrPut,LPTabz[K,V,Z,z],K,V,bool lptabz: mgetOrPut[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K; val: V;\n had: var bool): var V +editOrInit adix/lptabz.html#editOrInit.t,LPTabz[K,V,Z,z],K,untyped,untyped,untyped lptabz: editOrInit[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K;\n v, found, missing: untyped): untyped +withIt adix/lptabz.html#withIt.t,LPTabz[K,V,Z,z],K,, lptabz: withIt[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; k: K; edit, init): untyped +getItOrFail adix/lptabz.html#getItOrFail.t,LPTabz[K,V,Z,z],K,, lptabz: getItOrFail[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]; k: K; found, missing): untyped +add adix/lptabz.html#add,LPTabz[K,void,Z,z],K lptabz: add[K, Z; z: static int](t: var LPTabz[K, void, Z, z]; key: K) +add adix/lptabz.html#add,LPTabz[K,V,Z,z],K,V lptabz: add[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K; val: V) +missingOrExcl adix/lptabz.html#missingOrExcl,LPTabz[K,V,Z,z],K lptabz: missingOrExcl[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K): bool +take adix/lptabz.html#take,LPTabz[K,void,Z,z],K lptabz: take[K, Z; z: static int](t: var LPTabz[K, void, Z, z]; key: var K): bool +take adix/lptabz.html#take,LPTabz[K: not void,V: not void,Z,z],K,V lptabz: take[K, V: not void; Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K;\n val: var V): bool +pop adix/lptabz.html#pop,LPTabz[K,void,Z,z] lptabz: pop[K, Z; z: static int](t: var LPTabz[K, void, Z, z]): K +pop adix/lptabz.html#pop,LPTabz[K: not void,V: not void,Z,z] lptabz: pop[K, V: not void; Z; z: static int](t: var LPTabz[K, V, Z, z]): (K, V) +editKey adix/lptabz.html#editKey,LPTabz[K,V,Z,z],K,K lptabz: editKey[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; old, new: K) +nthKey adix/lptabz.html#nthKey,LPTabz[K,void,Z,z],int lptabz: nthKey[K, Z; z: static int](t: LPTabz[K, void, Z, z]; n: int): K +nthPair adix/lptabz.html#nthPair,LPTabz[K: not void,V: not void,Z,z],int lptabz: nthPair[K, V: not void; Z; z: static int](t: LPTabz[K, V, Z, z]; n: int): (K, V) +nthPair adix/lptabz.html#nthPair,LPTabz[K: not void,V: not void,Z,z],int_2 lptabz: nthPair[K, V: not void; Z; z: static int](t: var LPTabz[K, V, Z, z]; n: int): (\n K, ptr V) +clear adix/lptabz.html#clear,LPTabz[K,V,Z,z] lptabz: clear[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]) +items adix/lptabz.html#items.i,LPTabz[K,void,Z,z] lptabz: items[K, Z; z: static int](s: LPTabz[K, void, Z, z]): K +mitems adix/lptabz.html#mitems.i,LPTabz[K,void,Z,z] lptabz: mitems[K, Z; z: static int](s: var LPTabz[K, void, Z, z]): var K +hcodes adix/lptabz.html#hcodes.i,LPTabz[K,void,Z,z] lptabz: hcodes[K, Z; z: static int](s: LPTabz[K, void, Z, z]): (int, Hash) +allItems adix/lptabz.html#allItems.i,LPTabz[K,void,Z,z],K lptabz: allItems[K, Z; z: static int](s: LPTabz[K, void, Z, z]; key: K): K +numItems adix/lptabz.html#numItems,LPTabz[K,void,Z,z],K lptabz: numItems[K, Z; z: static int](t: LPTabz[K, void, Z, z]; key: K): int +numItems adix/lptabz.html#numItems.i,LPTabz[K,void,Z,z] lptabz: numItems[K, Z; z: static int](t: LPTabz[K, void, Z, z]): (K, int) +pairs adix/lptabz.html#pairs.i,LPTabz[K,void,Z,z] lptabz: pairs[K, Z; z: static int](t: LPTabz[K, void, Z, z]): (int, K) +pairs adix/lptabz.html#pairs.i,LPTabz[K,V,Z,z] lptabz: pairs[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]): (K, V) +mpairs adix/lptabz.html#mpairs.i,LPTabz[K,V,Z,z] lptabz: mpairs[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]): (K, var V) +keys adix/lptabz.html#keys.i,LPTabz[K,V,Z,z] lptabz: keys[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]): K +values adix/lptabz.html#values.i,LPTabz[K,V,Z,z] lptabz: values[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]): V +mvalues adix/lptabz.html#mvalues.i,LPTabz[K,V,Z,z] lptabz: mvalues[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]): var V +allValues adix/lptabz.html#allValues.i,LPTabz[K,V,Z,z],K lptabz: allValues[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]; key: K): V +allValues adix/lptabz.html#allValues.i,LPTabz[K,V,Z,z],seq[V] lptabz: allValues[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]; vals: var seq[V]): K +allValues adix/lptabz.html#allValues,LPTabz[K,V,Z,z],K,seq[V] lptabz: allValues[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]; key: K;\n vals: var seq[V]): bool +debugDump adix/lptabz.html#debugDump,LPTabz[K,V,Z,z],string lptabz: debugDump[K, V, Z; z: static int](s: LPTabz[K, V, Z, z]; label = "") +pop adix/lptabz.html#pop,LPTabz[K,void,Z,z],K lptabz: pop[K, Z; z: static int](s: var LPTabz[K, void, Z, z]; key: var K): bool +incl adix/lptabz.html#incl,LPTabz[K,void,Z,z],K lptabz: incl[K, Z; z: static int](s: var LPTabz[K, void, Z, z]; elt: K) +excl adix/lptabz.html#excl,LPTabz[K,void,Z,z],K lptabz: excl[K, Z; z: static int](s: var LPTabz[K, void, Z, z]; elt: K) +incl adix/lptabz.html#incl,LPTabz[K,void,Z,z],LPTabz[K,void,Z,z] lptabz: incl[K, Z; z: static int](s: var LPTabz[K, void, Z, z];\n other: LPTabz[K, void, Z, z]) +excl adix/lptabz.html#excl,LPTabz[K,void,Z,z],LPTabz[K,void,Z,z] lptabz: excl[K, Z; z: static int](s: var LPTabz[K, void, Z, z];\n other: LPTabz[K, void, Z, z]) +card adix/lptabz.html#card,LPTabz[K,void,Z,z] lptabz: card[K, Z; z: static int](s: LPTabz[K, void, Z, z]): int +union adix/lptabz.html#union,LPTabz[K,void,Z,z],LPTabz[K,void,Z,z] lptabz: union[K, Z; z: static int](s1, s2: LPTabz[K, void, Z, z]): LPTabz[K, void, Z, z] +intersection adix/lptabz.html#intersection,LPTabz[K,void,Z,z],LPTabz[K,void,Z,z] lptabz: intersection[K, Z; z: static int](s1, s2: LPTabz[K, void, Z, z]): LPTabz[K,\n void, Z, z] +difference adix/lptabz.html#difference,LPTabz[K,void,Z,z],LPTabz[K,void,Z,z] lptabz: difference[K, Z; z: static int](s1, s2: LPTabz[K, void, Z, z]): LPTabz[K, void,\n Z, z] +symmetricDifference adix/lptabz.html#symmetricDifference,LPTabz[K,void,Z,z],LPTabz[K,void,Z,z] lptabz: symmetricDifference[K, Z; z: static int](s1, s2: LPTabz[K, void, Z, z]): LPTabz[\n K, void, Z, z] +`+` adix/lptabz.html#+,LPTabz[K,void,Z,z],LPTabz[K,void,Z,z] lptabz: `+`[K, Z; z: static int](s1, s2: LPTabz[K, void, Z, z]): LPTabz[K, void, Z, z] +`*` adix/lptabz.html#*,LPTabz[K,void,Z,z],LPTabz[K,void,Z,z] lptabz: `*`[K, Z; z: static int](s1, s2: LPTabz[K, void, Z, z]): LPTabz[K, void, Z, z] +`-` adix/lptabz.html#-,LPTabz[K,void,Z,z],LPTabz[K,void,Z,z] lptabz: `-`[K, Z; z: static int](s1, s2: LPTabz[K, void, Z, z]): LPTabz[K, void, Z, z] +`-+-` adix/lptabz.html#-+-,LPTabz[K,void,Z,z],LPTabz[K,void,Z,z] lptabz: `-+-`[K, Z; z: static int](s1, s2: LPTabz[K, void, Z, z]): LPTabz[K, void, Z, z] +disjoint adix/lptabz.html#disjoint,LPTabz[K,void,Z,z],LPTabz[K,void,Z,z] lptabz: disjoint[K, Z; z: static int](s1, s2: LPTabz[K, void, Z, z]): bool +`<=` adix/lptabz.html#<=,LPTabz[K,void,Z,z],LPTabz[K,void,Z,z] lptabz: `<=`[K, Z; z: static int](s, t: LPTabz[K, void, Z, z]): bool +`<` adix/lptabz.html#<,LPTabz[K,void,Z,z],LPTabz[K,void,Z,z] lptabz: `<`[K, Z; z: static int](s, t: LPTabz[K, void, Z, z]): bool +`==` adix/lptabz.html#==,LPTabz[K,void,Z,z],LPTabz[K,void,Z,z] lptabz: `==`[K, Z; z: static int](s, t: LPTabz[K, void, Z, z]): bool +map adix/lptabz.html#map,LPTabz[K,void,Z,z],proc(K) lptabz: map[K, A, Z; z: static int](data: LPTabz[K, void, Z, z];\n op: proc (x: K): A {.closure.}): LPTabz[A, void, Z,\n z] +toLPTabz adix/lptabz.html#toLPTabz,openArray[K] lptabz: toLPTabz[K; V: void; Z; z: static int](keys: openArray[K]; dups = false): LPTabz[\n K, V, Z, z] +`$` adix/lptabz.html#$,LPTabz[K,void,Z,z] lptabz: `$`[K, Z; z: static int](s: LPTabz[K, void, Z, z]): string +hash adix/lptabz.html#hash,LPTabz[K,void,Z,z] lptabz: hash[K, Z; z: static int](s: LPTabz[K, void, Z, z]): Hash +depthStats adix/lptabz.html#depthStats,LPTabz[K,V,Z,z] lptabz: depthStats[K, V, Z; z: static int](s: LPTabz[K, V, Z, z]): tuple[m1, m2: float,\n mx: int] +toLPTabz adix/lptabz.html#toLPTabz,openArray[] lptabz: toLPTabz[K; V: not void; Z; z: static int](pairs: openArray[(K, V)];\n dups = false): LPTabz[K, V, Z, z] +`$` adix/lptabz.html#$,LPTabz[K: not void,V: not void,Z,z] lptabz: `$`[K, V: not void; Z; z: static int](t: LPTabz[K, V, Z, z]): string +pop adix/lptabz.html#pop,LPTabz[K: not void,V: not void,Z,z],K,V lptabz: pop[K, V: not void; Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K;\n val: var V): bool +withValue adix/lptabz.html#withValue.t,LPTabz[K,V,Z,z],K,untyped,untyped lptabz: withValue[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K;\n value, found: untyped): untyped +withValue adix/lptabz.html#withValue.t,LPTabz[K,V,Z,z],K,untyped,untyped,untyped lptabz: withValue[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K;\n value, found, missing: untyped): untyped +`[]` adix/lptabz.html#[],LPTabz[K,V,Z,z],K lptabz: `[]`[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]; key: K): V +`[]` adix/lptabz.html#[],LPTabz[K,V,Z,z],K_2 lptabz: `[]`[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K): var V +`[]=` adix/lptabz.html#[]=,LPTabz[K,V,Z,z],K,V lptabz: `[]=`[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K; val: V) +`{}` adix/lptabz.html#{},LPTabz[K,V,Z,z],K lptabz: `{}`[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]; key: K): V +`{}` adix/lptabz.html#{},LPTabz[K,V,Z,z],K_2 lptabz: `{}`[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K): var V +`{}=` adix/lptabz.html#{}=,LPTabz[K,V,Z,z],K,V lptabz: `{}=`[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K; val: V) +hasKey adix/lptabz.html#hasKey,LPTabz[K,V,Z,z],K lptabz: hasKey[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]; key: K): bool +hasKeyOrPut adix/lptabz.html#hasKeyOrPut,LPTabz[K,V,Z,z],K,V lptabz: hasKeyOrPut[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K; val: V): bool +getOrDefault adix/lptabz.html#getOrDefault,LPTabz[K,V,Z,z],K,typeof(default(V)) lptabz: getOrDefault[K, V, Z; z: static int](t: LPTabz[K, V, Z, z]; key: K;\n default = default(V)): V +del adix/lptabz.html#del,LPTabz[K,V,Z,z],K lptabz: del[K, V, Z; z: static int](t: var LPTabz[K, V, Z, z]; key: K) +`==` adix/lptabz.html#==,LPTabz[K: not void,V: not void,Z,z],LPTabz[K: not void,V: not void,Z,z] lptabz: `==`[K, V: not void; Z; z: static int](x, y: LPTabz[K, V, Z, z]): bool +indexBy adix/lptabz.html#indexBy,A,proc(V) lptabz: indexBy[A, K, V, Z; z: static int](collection: A; index: proc (x: V): K): LPTabz[\n K, V, Z, z] +inc adix/lptabz.html#inc,LPTabz[K,V,Z,z],K,V lptabz: inc[K, V, Z; z: static int](c: var LPTabz[K, V, Z, z]; key: K; amount: V = 1) +merge adix/lptabz.html#merge,LPTabz[K,V,Z,z],LPTabz[K,V,Z,z] lptabz: merge[K, V, Z; z: static int](c: var LPTabz[K, V, Z, z]; b: LPTabz[K, V, Z, z]) +topByVal adix/lptabz.html#topByVal.i,LPTabz[K,V,Z,z],int lptabz: topByVal[K, V, Z; z: static int](c: LPTabz[K, V, Z, z]; n = 10; min = V.low): (\n K, V) +mostCommon adix/lptabz.html#mostCommon.i,openArray[K],int lptabz: mostCommon[K](xs: openArray[K]; n = 10): (K, int) +initLPSetz adix/lptabz.html#initLPSetz lptabz: initLPSetz[K, Z; z: static int](initialSize = lpInitialSize; numer = lpNumer;\n denom = lpDenom; minFree = lpMinFree;\n growPow2 = lpGrowPow2; rehash = lpRehash;\n robinhood = lpRobinHood): LPSetz[K, Z, z] +initLPSet adix/lptabz.html#initLPSet lptabz: initLPSet[K](initialSize = lpInitialSize; numer = lpNumer; denom = lpDenom;\n minFree = lpMinFree; growPow2 = lpGrowPow2; rehash = lpRehash;\n robinhood = lpRobinHood): LPSet[K] +initLPTab adix/lptabz.html#initLPTab lptabz: initLPTab[K, V](initialSize = lpInitialSize; numer = lpNumer; denom = lpDenom;\n minFree = lpMinFree; growPow2 = lpGrowPow2; rehash = lpRehash;\n robinhood = lpRobinHood): LPTab[K, V] diff --git a/adix/memutil.html b/adix/memutil.html new file mode 100644 index 0000000..1e15bb4 --- /dev/null +++ b/adix/memutil.html @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + + + + +adix/memutil + + + + + + + + +
+
+

adix/memutil

+
+
+
+ +     Dark Mode +
+ +
+ Search: +
+
+ Group by: + +
+ + +
+   Source +  Edit + +
+
+ +

+
+

Procs

+
+
+
proc pullDown[T](x: var seq[T]; i, n: int) {.inline.}
+
+ +move n items down 1; i.e. x[i..i+n-1] = x[i+1..i+n] +  Source +  Edit + +
+
+
+
proc pushUp[T](x: var seq[T]; i, n: int) {.inline.}
+
+ +move n items up 1; i.e. x[i+1..i+n] = x[i..i+n-1] +  Source +  Edit + +
+
+ +
+ +
+
+ +
+ +
+
+
+ + + diff --git a/adix/memutil.idx b/adix/memutil.idx new file mode 100644 index 0000000..061aa00 --- /dev/null +++ b/adix/memutil.idx @@ -0,0 +1,2 @@ +pushUp adix/memutil.html#pushUp,seq[T],int,int memutil: pushUp[T](x: var seq[T]; i, n: int) +pullDown adix/memutil.html#pullDown,seq[T],int,int memutil: pullDown[T](x: var seq[T]; i, n: int) diff --git a/adix/metab.html b/adix/metab.html new file mode 100644 index 0000000..69dfd0c --- /dev/null +++ b/adix/metab.html @@ -0,0 +1,302 @@ + + + + + + + + + + + + + + + + + + +adix/metab + + + + + + + + +
+
+

adix/metab

+
+ +   Source +  Edit + +
+
+ +

This module provides an easy way to do compile-time switched impl swaps for various table/set reprs with various compile-time switched defaults. You should really just learn how to use LPTabz[..] directly, though.

+ +
+

Types

+
+
+
Set[K] = LPTabz[K, void, void, 0]
+
+ + +  Source +  Edit + +
+
+
+
Tab[K; V] = LPTabz[K, V, void, 0]
+
+ + +  Source +  Edit + +
+
+ +
+
+

Procs

+
+
+
proc initSet[K](sz = lpInitialSize; numer = lpNumer; denom = lpDenom;
+                minFree = lpMinFree; growPow2 = lpGrowPow2; rehash = rDefault;
+                robinHood = rhDefault): Set[K] {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc initTab[K, V](sz = lpInitialSize; numer = lpNumer; denom = lpDenom;
+                   minFree = lpMinFree; growPow2 = lpGrowPow2;
+                   rehash = rDefault; robinHood = rhDefault): Tab[K, V] {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc rightSz(x: Natural): int {.inline, ...deprecated: "Only identity now",
+                                raises: [], tags: [].}
+
+
+ Deprecated: Only identity now +
+ + +  Source +  Edit + +
+
+
+
proc toSet[K](keys: openArray[K]; dups = false): Set[K]
+
+ + +  Source +  Edit + +
+
+
+
proc toTab[K, V](pairs: openArray[(K, V)]; dups = false): Tab[K, V]
+
+ + +  Source +  Edit + +
+
+ +
+ + +
+
+ +
+ +
+
+
+ + + diff --git a/adix/metab.idx b/adix/metab.idx new file mode 100644 index 0000000..dc8cd4d --- /dev/null +++ b/adix/metab.idx @@ -0,0 +1,7 @@ +rightSz adix/metab.html#rightSz,Natural metab: rightSz(x: Natural): int +Tab adix/metab.html#Tab metab: Tab +initTab adix/metab.html#initTab metab: initTab[K, V](sz = lpInitialSize; numer = lpNumer; denom = lpDenom;\n minFree = lpMinFree; growPow2 = lpGrowPow2; rehash = rDefault;\n robinHood = rhDefault): Tab[K, V] +toTab adix/metab.html#toTab,openArray[] metab: toTab[K, V](pairs: openArray[(K, V)]; dups = false): Tab[K, V] +Set adix/metab.html#Set metab: Set +initSet adix/metab.html#initSet metab: initSet[K](sz = lpInitialSize; numer = lpNumer; denom = lpDenom;\n minFree = lpMinFree; growPow2 = lpGrowPow2; rehash = rDefault;\n robinHood = rhDefault): Set[K] +toSet adix/metab.html#toSet,openArray[K] metab: toSet[K](keys: openArray[K]; dups = false): Set[K] diff --git a/adix/mvstat.html b/adix/mvstat.html new file mode 100644 index 0000000..5e07b76 --- /dev/null +++ b/adix/mvstat.html @@ -0,0 +1,967 @@ + + + + + + + + + + + + + + + + + + +adix/mvstat + + + + + + + + +
+
+

adix/mvstat

+
+
+
+ +     Dark Mode +
+ +
+ Search: +
+
+ Group by: + +
+ + +
+   Source +  Edit + +
+
+ +

Summary stats built in running/online fashion (as std/stats) BUT over (maybe) MOVING data windows (via pop) and (sometimes) 50X faster & a million X more accurate. Speed up comes from SIMD auto-vectorization in whole openArray[] calls (in --passC:-ffast-math|-Ofast backend modes) aided by "shift" idea at en.wikipedia.org/wiki/Algorithms_for_calculating_variance (both simpler & faster than Welford). Both var & non-var overloads are provided to allow caching 1.0/n which may be identical-but-expensive (eg. reporting at each cycle of a 1 pop per push (so fixed n) window over data).

+

Note: this all costs more in both time & space than exponentially weighted equivalents but has precise rather than infinite memory which can be nice. I.e., it can perfectly "forget" a large spike when it leaves a window.

+

+ +
+

Types

+
+
+
BasicStats[F] = object
+  n*: int                    ## sample size
+  min*, max*, mean*, sdev*: F ## the usual suspects.
+  
+
+ +Result type for parallel-mergable stats +  Source +  Edit + +
+
+
+
MovingStat[F; C] = object
+  options*: set[Option]
+  n*, n4Inv: int             ## amount of pushed data
+  nIn, dx, s1, s2, s3, s4: F
+  min*, max*: F
+  lgHisto*: LgHisto[C]
+
+
+ +Statistical data accumulator +  Source +  Edit + +
+
+
+
Option = enum
+  OrderStats
+
+ + +  Source +  Edit + +
+
+ +
+
+

Procs

+
+
+
proc `$`[F: SomeFloat; C: SomeInteger](s: MovingStat[F, C]): string
+
+ +A string representation of a MovingStat[F,C]. +  Source +  Edit + +
+
+
+
func `+=`[F](a: var BasicStats[F]; b: BasicStats[F])
+
+ +Operator notation for add. +  Source +  Edit + +
+
+
+
func `+`[F](a, b: BasicStats[F]): BasicStats[F]
+
+ +Operator notation for add. +  Source +  Edit + +
+
+
+
func add[F](a: var BasicStats[F]; b: BasicStats[F])
+
+ +Combines two BasicStats. Useful to combine partial result sets. +  Source +  Edit + +
+
+
+
func basicStats[F: SomeFloat](xs: openArray[F]): BasicStats[F] {.
+    codegenDecl: "__attribute__((optimize(\"Ofast\", \"fast-math\"))) $# $#$#".}
+
+ +Some summary stats in 1-pass using vector-CPU instructions, if possible. +  Source +  Edit + +
+
+
+
func cdf[F: SomeFloat; C: SomeInteger](s: MovingStat[F, C]; x: float): float {.
+    inline.}
+
+ +Estimated moving CDF(x) +  Source +  Edit + +
+
+
+
func clear[F: SomeFloat; C: SomeInteger](s: var MovingStat[F, C]) {.inline.}
+
+ +Reset s to same as var s: MovingStat[F,C]. +  Source +  Edit + +
+
+
+
func init[F: SomeFloat; C: SomeInteger](s: var MovingStat[F, C]; a = 1e-16;
+                                        b = 1e+20; n = 8300;
+                                        options: set[Option] = {}) {.inline.}
+
+ +Initialized a MovingStat[F,C] with a [-b,b] log-spaced histogram. +  Source +  Edit + +
+
+
+
func initMovingStat[F: SomeFloat; C: SomeInteger](a = 1e-16; b = 1e+20;
+    n = 8300; options: set[Option] = {}): MovingStat[F, C] {.inline.}
+
+ +Return initialized MovingStat[F,C] with a [-b,b] log-spaced histogram. +  Source +  Edit + +
+
+
+
func kurtosis[F: SomeFloat; C: SomeInteger](s: MovingStat[F, C]): float {.inline.}
+
+ +Moving excess-relative to Gaussian kurtosis (population) over data window. +  Source +  Edit + +
+
+
+
func kurtosis[F: SomeFloat; C: SomeInteger](s: var MovingStat[F, C]): float {.
+    inline.}
+
+ +Moving excess-relative to Gaussian kurtosis (population) over data window. +  Source +  Edit + +
+
+
+
func kurtosis[T: SomeNumber](xs: openArray[T]; accum = 32): float
+
+ +excess kurtosis (population). accum != 32 => 64-bit accumulation. +  Source +  Edit + +
+
+
+
func kurtosisS[F: SomeFloat; C: SomeInteger](s`gensym35: MovingStat[F, C]): float
+
+ + +  Source +  Edit + +
+
+
+
func kurtosisS[F: SomeFloat; C: SomeInteger](
+    s`gensym35: var MovingStat[F, C]): float
+
+ + +  Source +  Edit + +
+
+
+
func kurtosisS[T: SomeNumber](xs`gensym35: openArray[T]; accum`gensym35 = 32): float
+
+ + +  Source +  Edit + +
+
+
+
func mean[F: SomeFloat; C: SomeInteger](s: MovingStat[F, C]): float {.inline.}
+
+ +Moving mean/average over data window. +  Source +  Edit + +
+
+
+
func mean[F: SomeFloat; C: SomeInteger](s: var MovingStat[F, C]): float {.inline.}
+
+ +Moving mean/average over data window. +  Source +  Edit + +
+
+
+
func mean[T: SomeNumber](xs: openArray[T]): float {.
+    codegenDecl: "__attribute__((optimize(\"Ofast\", \"fast-math\"))) $# $#$#".}
+
+ + +  Source +  Edit + +
+
+
+
func nInv[F: SomeFloat; C: SomeInteger](s: MovingStat[F, C]): F {.inline.}
+
+ +A reciprocal caching 1.0/s.n; cannot update reciprocal. +  Source +  Edit + +
+
+
+
func nInv[F: SomeFloat; C: SomeInteger](s: var MovingStat[F, C]): F {.inline.}
+
+ +A reciprocal caching 1.0/s.n. +  Source +  Edit + +
+
+
+
func pop[F: SomeFloat; C: SomeInteger](s: var MovingStat[F, C]; x: SomeNumber)
+
+ +Pops (aka removes the influence) of a value x from running sums. +  Source +  Edit + +
+
+
+
func push[F: SomeFloat; C: SomeInteger](s: var MovingStat[F, C]; x: SomeNumber)
+
+ +Pushes a value x into running sums. +  Source +  Edit + +
+
+
+
func quantile[F: SomeFloat; C: SomeInteger](s: MovingStat[F, C]; q: float): float {.
+    inline.}
+
+ +Estimated moving quantile q; E.g. q=0.5 is the moving median. +  Source +  Edit + +
+
+
+
func range[F: SomeFloat](xs: openArray[F]): (F, F) {.
+    codegenDecl: "__attribute__((optimize(\"Ofast\", \"fast-math\"))) $# $#$#".}
+
+ +Data range in 1-pass using vector-CPU instructions, if possible. E.g., let (mn,mx) = x.range. +  Source +  Edit + +
+
+
+
func skewness[F: SomeFloat; C: SomeInteger](s: MovingStat[F, C]): float {.inline.}
+
+ +Moving skewness (population) over data window. +  Source +  Edit + +
+
+
+
func skewness[F: SomeFloat; C: SomeInteger](s: var MovingStat[F, C]): float {.
+    inline.}
+
+ +Moving skewness (population) over data window. +  Source +  Edit + +
+
+
+
func skewness[T: SomeNumber](xs: openArray[T]; accum = 32): float
+
+ +skewness (population). accum != 32 => 64-bit accumulation. +  Source +  Edit + +
+
+
+
func skewnessS[F: SomeFloat; C: SomeInteger](s`gensym28: MovingStat[F, C]): float
+
+ + +  Source +  Edit + +
+
+
+
func skewnessS[F: SomeFloat; C: SomeInteger](
+    s`gensym28: var MovingStat[F, C]): float
+
+ + +  Source +  Edit + +
+
+
+
func skewnessS[T: SomeNumber](xs`gensym28: openArray[T]; accum`gensym28 = 32): float
+
+ + +  Source +  Edit + +
+
+
+
func standardDeviation[F: SomeFloat; C: SomeInteger](s: MovingStat[F, C]): float {.
+    inline.}
+
+ +Moving standard deviation (population) over data window. +  Source +  Edit + +
+
+
+
func standardDeviation[F: SomeFloat; C: SomeInteger](s: var MovingStat[F, C]): float {.
+    inline.}
+
+ +Moving standard deviation (population) over data window. +  Source +  Edit + +
+
+
+
func standardDeviation[T: SomeNumber](xs: openArray[T]; accum = 32): float
+
+ +standard deviation (population). accum != 32 => 64-bit accumulation. +  Source +  Edit + +
+
+
+
func standardDeviationS[F: SomeFloat; C: SomeInteger](s: MovingStat[F, C]): float
+
+ + +  Source +  Edit + +
+
+
+
func standardDeviationS[F: SomeFloat; C: SomeInteger](s: var MovingStat[F, C]): float
+
+ + +  Source +  Edit + +
+
+
+
func standardDeviationS[T: SomeNumber](xs: openArray[T]; accum = 32): float
+
+ + +  Source +  Edit + +
+
+
+
func stderror[F: SomeFloat; C: SomeInteger](s: MovingStat[F, C]): float {.inline.}
+
+ +Moving standard error (standard deviation of the mean) over data window. +  Source +  Edit + +
+
+
+
func stderror[F: SomeFloat; C: SomeInteger](s: var MovingStat[F, C]): float {.
+    inline.}
+
+ +Moving standard error (standard deviation of the mean) over data window. +  Source +  Edit + +
+
+
+
func stderror[T: SomeNumber](xs: openArray[T]; accum = 32): float
+
+ +standard error (std dev of the mean). accum != 32 => 64-bit accumulation. +  Source +  Edit + +
+
+
+
func sum[F: SomeFloat; C: SomeInteger](s: MovingStat[F, C]): float {.inline.}
+
+ +Moving sum/total over data window. +  Source +  Edit + +
+
+
+
func variance[F: SomeFloat; C: SomeInteger](s: MovingStat[F, C]): float {.inline.}
+
+ +Moving variance (population) over data window. +  Source +  Edit + +
+
+
+
func variance[F: SomeFloat; C: SomeInteger](s: var MovingStat[F, C]): float {.
+    inline.}
+
+ +Moving variance (population) over data window. +  Source +  Edit + +
+
+
+
func variance[T: SomeNumber](xs: openArray[T]; accum = 32): float {.
+    codegenDecl: "__attribute__((optimize(\"Ofast\", \"fast-math\"))) $# $#$#".}
+
+ +variance (population). accum != 32 => 64-bit accumulation. +  Source +  Edit + +
+
+
+
func varianceS[F: SomeFloat; C: SomeInteger](s`gensym21: MovingStat[F, C]): float
+
+ + +  Source +  Edit + +
+
+
+
func varianceS[F: SomeFloat; C: SomeInteger](
+    s`gensym21: var MovingStat[F, C]): float
+
+ + +  Source +  Edit + +
+
+
+
func varianceS[T: SomeNumber](xs`gensym21: openArray[T]; accum`gensym21 = 32): float
+
+ + +  Source +  Edit + +
+
+ +
+ +
+
+ +
+ +
+
+
+ + + diff --git a/adix/mvstat.idx b/adix/mvstat.idx new file mode 100644 index 0000000..d3b9fe8 --- /dev/null +++ b/adix/mvstat.idx @@ -0,0 +1,50 @@ +OrderStats adix/mvstat.html#OrderStats Option.OrderStats +Option adix/mvstat.html#Option mvstat: Option +MovingStat adix/mvstat.html#MovingStat mvstat: MovingStat +BasicStats adix/mvstat.html#BasicStats mvstat: BasicStats +init adix/mvstat.html#init,MovingStat[F: SomeFloat,C: SomeInteger],float,float,int,set[Option] mvstat: init[F: SomeFloat; C: SomeInteger](s: var MovingStat[F, C]; a = 1e-16;\n b = 1e+20; n = 8300;\n options: set[Option] = {}) +initMovingStat adix/mvstat.html#initMovingStat,float,float,int,set[Option] mvstat: initMovingStat[F: SomeFloat; C: SomeInteger](a = 1e-16; b = 1e+20; n = 8300;\n options: set[Option] = {}): MovingStat[F, C] +nInv adix/mvstat.html#nInv,MovingStat[F: SomeFloat,C: SomeInteger] mvstat: nInv[F: SomeFloat; C: SomeInteger](s: var MovingStat[F, C]): F +nInv adix/mvstat.html#nInv,MovingStat[F: SomeFloat,C: SomeInteger]_2 mvstat: nInv[F: SomeFloat; C: SomeInteger](s: MovingStat[F, C]): F +clear adix/mvstat.html#clear,MovingStat[F: SomeFloat,C: SomeInteger] mvstat: clear[F: SomeFloat; C: SomeInteger](s: var MovingStat[F, C]) +push adix/mvstat.html#push,MovingStat[F: SomeFloat,C: SomeInteger],SomeNumber mvstat: push[F: SomeFloat; C: SomeInteger](s: var MovingStat[F, C]; x: SomeNumber) +pop adix/mvstat.html#pop,MovingStat[F: SomeFloat,C: SomeInteger],SomeNumber mvstat: pop[F: SomeFloat; C: SomeInteger](s: var MovingStat[F, C]; x: SomeNumber) +quantile adix/mvstat.html#quantile,MovingStat[F: SomeFloat,C: SomeInteger],float mvstat: quantile[F: SomeFloat; C: SomeInteger](s: MovingStat[F, C]; q: float): float +cdf adix/mvstat.html#cdf,MovingStat[F: SomeFloat,C: SomeInteger],float mvstat: cdf[F: SomeFloat; C: SomeInteger](s: MovingStat[F, C]; x: float): float +sum adix/mvstat.html#sum,MovingStat[F: SomeFloat,C: SomeInteger] mvstat: sum[F: SomeFloat; C: SomeInteger](s: MovingStat[F, C]): float +mean adix/mvstat.html#mean,MovingStat[F: SomeFloat,C: SomeInteger] mvstat: mean[F: SomeFloat; C: SomeInteger](s: MovingStat[F, C]): float +mean adix/mvstat.html#mean,MovingStat[F: SomeFloat,C: SomeInteger]_2 mvstat: mean[F: SomeFloat; C: SomeInteger](s: var MovingStat[F, C]): float +variance adix/mvstat.html#variance,MovingStat[F: SomeFloat,C: SomeInteger] mvstat: variance[F: SomeFloat; C: SomeInteger](s: MovingStat[F, C]): float +variance adix/mvstat.html#variance,MovingStat[F: SomeFloat,C: SomeInteger]_2 mvstat: variance[F: SomeFloat; C: SomeInteger](s: var MovingStat[F, C]): float +standardDeviation adix/mvstat.html#standardDeviation,MovingStat[F: SomeFloat,C: SomeInteger] mvstat: standardDeviation[F: SomeFloat; C: SomeInteger](s: MovingStat[F, C]): float +standardDeviation adix/mvstat.html#standardDeviation,MovingStat[F: SomeFloat,C: SomeInteger]_2 mvstat: standardDeviation[F: SomeFloat; C: SomeInteger](s: var MovingStat[F, C]): float +stderror adix/mvstat.html#stderror,MovingStat[F: SomeFloat,C: SomeInteger] mvstat: stderror[F: SomeFloat; C: SomeInteger](s: MovingStat[F, C]): float +stderror adix/mvstat.html#stderror,MovingStat[F: SomeFloat,C: SomeInteger]_2 mvstat: stderror[F: SomeFloat; C: SomeInteger](s: var MovingStat[F, C]): float +skewness adix/mvstat.html#skewness,MovingStat[F: SomeFloat,C: SomeInteger] mvstat: skewness[F: SomeFloat; C: SomeInteger](s: MovingStat[F, C]): float +skewness adix/mvstat.html#skewness,MovingStat[F: SomeFloat,C: SomeInteger]_2 mvstat: skewness[F: SomeFloat; C: SomeInteger](s: var MovingStat[F, C]): float +kurtosis adix/mvstat.html#kurtosis,MovingStat[F: SomeFloat,C: SomeInteger] mvstat: kurtosis[F: SomeFloat; C: SomeInteger](s: MovingStat[F, C]): float +kurtosis adix/mvstat.html#kurtosis,MovingStat[F: SomeFloat,C: SomeInteger]_2 mvstat: kurtosis[F: SomeFloat; C: SomeInteger](s: var MovingStat[F, C]): float +`$` adix/mvstat.html#$,MovingStat[F: SomeFloat,C: SomeInteger] mvstat: `$`[F: SomeFloat; C: SomeInteger](s: MovingStat[F, C]): string +add adix/mvstat.html#add,BasicStats[F],BasicStats[F] mvstat: add[F](a: var BasicStats[F]; b: BasicStats[F]) +`+=` adix/mvstat.html#+=,BasicStats[F],BasicStats[F] mvstat: `+=`[F](a: var BasicStats[F]; b: BasicStats[F]) +`+` adix/mvstat.html#+,BasicStats[F],BasicStats[F] mvstat: `+`[F](a, b: BasicStats[F]): BasicStats[F] +mean adix/mvstat.html#mean,openArray[T] mvstat: mean[T: SomeNumber](xs: openArray[T]): float +variance adix/mvstat.html#variance,openArray[T],int mvstat: variance[T: SomeNumber](xs: openArray[T]; accum = 32): float +range adix/mvstat.html#range,openArray[F] mvstat: range[F: SomeFloat](xs: openArray[F]): (F, F) +basicStats adix/mvstat.html#basicStats,openArray[F] mvstat: basicStats[F: SomeFloat](xs: openArray[F]): BasicStats[F] +standardDeviation adix/mvstat.html#standardDeviation,openArray[T],int mvstat: standardDeviation[T: SomeNumber](xs: openArray[T]; accum = 32): float +stderror adix/mvstat.html#stderror,openArray[T],int mvstat: stderror[T: SomeNumber](xs: openArray[T]; accum = 32): float +skewness adix/mvstat.html#skewness,openArray[T],int mvstat: skewness[T: SomeNumber](xs: openArray[T]; accum = 32): float +kurtosis adix/mvstat.html#kurtosis,openArray[T],int mvstat: kurtosis[T: SomeNumber](xs: openArray[T]; accum = 32): float +varianceS adix/mvstat.html#varianceS mvstat: varianceS[F: SomeFloat; C: SomeInteger](s`gensym21: MovingStat[F, C]): float +varianceS adix/mvstat.html#varianceS_2 mvstat: varianceS[F: SomeFloat; C: SomeInteger](s`gensym21: var MovingStat[F, C]): float +varianceS adix/mvstat.html#varianceS,,int mvstat: varianceS[T: SomeNumber](xs`gensym21: openArray[T]; accum`gensym21 = 32): float +skewnessS adix/mvstat.html#skewnessS mvstat: skewnessS[F: SomeFloat; C: SomeInteger](s`gensym28: MovingStat[F, C]): float +skewnessS adix/mvstat.html#skewnessS_2 mvstat: skewnessS[F: SomeFloat; C: SomeInteger](s`gensym28: var MovingStat[F, C]): float +skewnessS adix/mvstat.html#skewnessS,,int mvstat: skewnessS[T: SomeNumber](xs`gensym28: openArray[T]; accum`gensym28 = 32): float +kurtosisS adix/mvstat.html#kurtosisS mvstat: kurtosisS[F: SomeFloat; C: SomeInteger](s`gensym35: MovingStat[F, C]): float +kurtosisS adix/mvstat.html#kurtosisS_2 mvstat: kurtosisS[F: SomeFloat; C: SomeInteger](s`gensym35: var MovingStat[F, C]): float +kurtosisS adix/mvstat.html#kurtosisS,,int mvstat: kurtosisS[T: SomeNumber](xs`gensym35: openArray[T]; accum`gensym35 = 32): float +standardDeviationS adix/mvstat.html#standardDeviationS,MovingStat[F: SomeFloat,C: SomeInteger] mvstat: standardDeviationS[F: SomeFloat; C: SomeInteger](s: MovingStat[F, C]): float +standardDeviationS adix/mvstat.html#standardDeviationS,MovingStat[F: SomeFloat,C: SomeInteger]_2 mvstat: standardDeviationS[F: SomeFloat; C: SomeInteger](s: var MovingStat[F, C]): float +standardDeviationS adix/mvstat.html#standardDeviationS,openArray[T],int mvstat: standardDeviationS[T: SomeNumber](xs: openArray[T]; accum = 32): float diff --git a/adix/nsort.html b/adix/nsort.html new file mode 100644 index 0000000..0a8bcd0 --- /dev/null +++ b/adix/nsort.html @@ -0,0 +1,323 @@ + + + + + + + + + + + + + + + + + + +adix/nsort + + + + + + + + +
+
+

adix/nsort

+
+ +   Source +  Edit + +
+
+ +

This numeric sort module encapsulates sorting by native numeric keys embedded at some offset inside Nim objects of any size (well, <= 256 bytes for char- keyed obs, but you should "tag sort" objects > 64B anyway). This kind of interface allows low overhead generality and enables algorithms specialized to number types. Such algorithms are often many times faster than comparison sorts. The algo is roughly counting sort for 1-Byte keys and for [248]Byte native type keys an LSD radix sort with optional transforms from signed|float domains. This implementation has several sadly rare optimizations.

+

FIRST, total order and order by digit0 is checked in the first histogramming pass to decide if remaining work can be skipped. Hence, if run on an already sorted array, only one read-only pass over the data is done to confirm order. Similarly, items already sorted by digit0 induce no re-ordering write phase. Reverse order is also detected. These non-branching integer comparisons add little work and potentially save a lot.

+

SECOND, only 2 counter buffers are ever needed at once - current pass write pointers & next pass read histogram. Using more wastes limited L1/L2 space and/or shrinks max histogram size (increasing number of passes). The buffers for these two "alternate" histograms just toggle across passes. (A several- histogram-at-once counting pass can also achieve no excess re-fetches, but at higher cache usage. Cache use is same for 2B keys, but only high whole byte constancy can yield skipped 2nd passes. The best 2B method depends on keys.)

+

THIRD, histogram details are optimized. For moderate n, prefix summing histograms into cumulative distribution functions (really output bin offsets) is a dominant cost. So, this impl does SIMD parallel prefix sum. This optim is more effective as more counters fit into vector registers. So, this impl uses the smallest [1248]Byte counter needed for n items & takes care to align the 2 power of 2-sized counter buffers to maximize vector use. Last, a time cost estimate formula & Newton's method is used to decide pass sizes.

+

FOURTH, bits that vary across keys are measured (mask or=(x[i-1] xor x[i])) in the first read-pass. Key-wise constant bits are zero in said mask. Since an array MUST be sorted by constant key bits, smart digit plans can skip them to maybe shrink pass count. pext32/pext64 from Intel's Advanced Bit Manipulation subset (Haswell 2014) are a cheap way to use the above mask. This optimization does not help bitwise non-constant data (other than ease of digit formation afforded by pext). However, this impl is structured so there is almost no added cost to access the potentially large savings. Work on digit plans is ongoing. This optimization is novel to my knowledge. It seems small for an academic paper (maybe optimal digit plans would add enough to discuss) but likely to have been mentioned offhand already. I'd cite a reference if I could and please cite me if you don't have one. How well this does depends strongly upon bit-entropy of keys. Eg., time(2) outputs, over allocated 8B ints, 64-bit VM addrs & positive floats spanning 1..2 octaves may be constant above 12-24 LSbits. Some samples may even get sorted in just one pass! I'd bet much real-world f32 data is 2pass w/b0=12.

+

One undone optimization is multi-threads for counting phases. This can boost L3->L1 read throughput by 2-9x (but since scattered writes are much slower than streaming reads, overall speed-up is likely limited). Another maybe useful optimization is saving transformed keys in the tmp arrays (but this also needs inverse transforms on the final pass & current xforms are already cheap compared to L2 or worse bandwidth costs. So, 5-20% boost, I'd guess.)

+

+ +
+

Types

+
+
+
XForm = enum
+  xfNone, xfRev, xfSgn, xfSgnRev, xfFlt, xfFltRev ## Transforms
+
+ + +  Source +  Edit + +
+
+ +
+
+

Vars

+
+
+
verb = 0
+
+ +verbosity level +  Source +  Edit + +
+
+ +
+
+

Procs

+
+
+
proc nsort(obs, tmp: pointer; n, sz: int; off: uint8; xf: XForm; b0 = 0): pointer {.
+    ...raises: [], tags: [].}
+
+ +Specialization of power-user interface for uint8-width keys. +  Source +  Edit + +
+
+
+
proc nsort[O, W](obs: var openArray[O]; off: W; xf = xfNone; b0 = 0)
+
+ +Radix sort obs by W-width key at in-object offset off, transforming keys according to xf. b0 is the number of bits for the first pass histogram. 0 means use a good default. Uses temporary space equal to the size of obs. Does tiled merge sort for big data. +  Source +  Edit + +
+
+
+
proc nsort[W: Ui248](obs, tmp: pointer; n, sz: int; off: W; xf: XForm; b0 = 0): pointer
+
+ +A power-user interface that allows skipping a final copy back to obs. It uses n to decide what sort algo to use. Returns -1 if reversed. +  Source +  Edit + +
+
+ +
+
+

Templates

+
+
+
template nsortBy(x, field: untyped; b0 = 0): untyped
+
+ +

Convenience template around nsort proc to reduce typing. b0 is the number of bits for the first pass histogram. 0 means use a good default.

+

You can only nsort by one numeric field at a time, but sorts are stable. Do x.nsortBy foo; x.nsortBy bar to do a multi-level sort.

+
import nsort
+var recs = @[(f: 3.0, age: 50), (f: 6.0, age: 30), (f: 5.0, age: 30)]
+recs.nsortBy f         # Multi-level sort by `age` then `f`.  Invoke
+recs.nsortBy age       # ..in REVERSE order of usual comparison-order.
+for r in recs: echo r  # Right output: @[(5.0,30), (6.0,30), (3.0,50)]
+  Source +  Edit + +
+
+
+
template nsortByRaw(x, field: untyped; b0 = 0): untyped
+
+ +Used by nsortBy for small objects (or directly by users who know what they are doing). +  Source +  Edit + +
+
+
+
template nsortByTag(x, field: untyped; b0 = 0): untyped
+
+ +So-called tag sort used by nsortBy for large objects (or directly by users who know what they are doing). +  Source +  Edit + +
+
+ +
+ +
+
+ +
+ +
+
+
+ + + diff --git a/adix/nsort.idx b/adix/nsort.idx new file mode 100644 index 0000000..a0f005f --- /dev/null +++ b/adix/nsort.idx @@ -0,0 +1,14 @@ +xfNone adix/nsort.html#xfNone XForm.xfNone +xfRev adix/nsort.html#xfRev XForm.xfRev +xfSgn adix/nsort.html#xfSgn XForm.xfSgn +xfSgnRev adix/nsort.html#xfSgnRev XForm.xfSgnRev +xfFlt adix/nsort.html#xfFlt XForm.xfFlt +xfFltRev adix/nsort.html#xfFltRev XForm.xfFltRev +XForm adix/nsort.html#XForm nsort: XForm +verb adix/nsort.html#verb nsort: verb +nsort adix/nsort.html#nsort,pointer,pointer,int,int,uint8,XForm,int nsort: nsort(obs, tmp: pointer; n, sz: int; off: uint8; xf: XForm; b0 = 0): pointer +nsort adix/nsort.html#nsort,pointer,pointer,int,int,W,XForm,int nsort: nsort[W: Ui248](obs, tmp: pointer; n, sz: int; off: W; xf: XForm; b0 = 0): pointer +nsort adix/nsort.html#nsort,openArray[O],W,int nsort: nsort[O, W](obs: var openArray[O]; off: W; xf = xfNone; b0 = 0) +nsortByRaw adix/nsort.html#nsortByRaw.t,untyped,untyped,int nsort: nsortByRaw(x, field: untyped; b0 = 0): untyped +nsortByTag adix/nsort.html#nsortByTag.t,untyped,untyped,int nsort: nsortByTag(x, field: untyped; b0 = 0): untyped +nsortBy adix/nsort.html#nsortBy.t,untyped,untyped,int nsort: nsortBy(x, field: untyped; b0 = 0): untyped diff --git a/adix/sequint.html b/adix/sequint.html new file mode 100644 index 0000000..296c779 --- /dev/null +++ b/adix/sequint.html @@ -0,0 +1,456 @@ + + + + + + + + + + + + + + + + + + +adix/sequint + + + + + + + + +
+
+

adix/sequint

+
+
+
+ +     Dark Mode +
+ +
+ Search: +
+
+ Group by: + +
+ + +
+   Source +  Edit + +
+
+ +

This module provides a memory optimized seq[uint] for a user-given range of numbers (by default its own initial length). E.g., if the range is 0..7, it uses just 3 bits per number (plus rounding error). Other pithy descriptions are "the array version of bit fields" | "the matrix version of bit vectors".

+

In the best case, this allows packing numbers 8x (e.g., 8/1) more densely than a "next biggest CPU int rounded" approach (like 8,16,32,64). The public API uses uint, usually a 64-bit unsigned integer.

+

To store n indices from 0..n-1 takes n*ceil(lg(n)) bits. E.g., circa 2020 L3 CPU caches have become large enough to support any permutation of 0..2^24-1 since (242*24/8 = 48 MiB).

+

Using the widest type for backing store and limiting the design to hold only numbers up to said wide type ensures <= 2 consecutive backing items are ever needed to access a given number.

+

While dynamically growing a SeqUint works, changing element size doesn't. So, callers must t=initSeqUint(s.len, 1 shl (s.bits+1)) & copy as needed.

+

+
+

Imports

+
+bitop +
+
+

Types

+
+
+
SeqUint = object
+  data: seq[uint]
+  len: int
+  bits: int8
+
+
+ +A space-optimized seq[uint] +  Source +  Edit + +
+
+ +
+
+

Procs

+
+
+
proc `$`(s: SeqUint): string {....raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc `[]=`(s: var SeqUint; i: int | uint; x: int | uint) {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc `[]`(s: SeqUint; i: int | uint): uint {.inline.}
+
+ + +  Source +  Edit + +
+
+
+
proc add(s: var SeqUint; v: uint) {.inline, ...raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc addr0(s: SeqUint): pointer {.inline, ...raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc bits(s: SeqUint): int {.inline, ...raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc clear(s: var SeqUint) {.inline, ...raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc high(s: SeqUint): int {.inline, ...raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc init(s: var SeqUint; initialSize = 0; numBound = 0) {.inline, ...raises: [],
+    tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc initSeqUint(initialSize = 0; numBound = 0): SeqUint {.inline, ...raises: [],
+    tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc len(s: SeqUint): int {.inline, ...raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc low(s: SeqUint): int {.inline, ...raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
proc setLen(s: var SeqUint; size: int) {.inline, ...raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+ +
+
+

Iterators

+
+
+
iterator items(s: SeqUint): uint {....raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
iterator pairs(s: SeqUint): (int, uint) {....raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+ +
+ +
+
+ +
+ +
+
+
+ + + diff --git a/adix/sequint.idx b/adix/sequint.idx new file mode 100644 index 0000000..0206831 --- /dev/null +++ b/adix/sequint.idx @@ -0,0 +1,16 @@ +SeqUint adix/sequint.html#SeqUint sequint: SeqUint +bits adix/sequint.html#bits,SeqUint sequint: bits(s: SeqUint): int +low adix/sequint.html#low,SeqUint sequint: low(s: SeqUint): int +addr0 adix/sequint.html#addr0,SeqUint sequint: addr0(s: SeqUint): pointer +len adix/sequint.html#len,SeqUint sequint: len(s: SeqUint): int +high adix/sequint.html#high,SeqUint sequint: high(s: SeqUint): int +clear adix/sequint.html#clear,SeqUint sequint: clear(s: var SeqUint) +init adix/sequint.html#init,SeqUint,int,int sequint: init(s: var SeqUint; initialSize = 0; numBound = 0) +initSeqUint adix/sequint.html#initSeqUint,int,int sequint: initSeqUint(initialSize = 0; numBound = 0): SeqUint +`[]` adix/sequint.html#[],SeqUint, sequint: `[]`(s: SeqUint; i: int | uint): uint +`[]=` adix/sequint.html#[]=,SeqUint,, sequint: `[]=`(s: var SeqUint; i: int | uint; x: int | uint) +setLen adix/sequint.html#setLen,SeqUint,int sequint: setLen(s: var SeqUint; size: int) +add adix/sequint.html#add,SeqUint,uint sequint: add(s: var SeqUint; v: uint) +items adix/sequint.html#items.i,SeqUint sequint: items(s: SeqUint): uint +pairs adix/sequint.html#pairs.i,SeqUint sequint: pairs(s: SeqUint): (int, uint) +`$` adix/sequint.html#$,SeqUint sequint: `$`(s: SeqUint): string diff --git a/adix/stat.html b/adix/stat.html new file mode 100644 index 0000000..c47f297 --- /dev/null +++ b/adix/stat.html @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + +adix/stat + + + + + + + + +
+
+

adix/stat

+
+
+
+ +     Dark Mode +
+ +
+ Search: +
+
+ Group by: + +
+ + +
+   Source +  Edit + + +
+ +
+ +
+
+
+ + + diff --git a/adix/tdigest.html b/adix/tdigest.html new file mode 100644 index 0000000..ba91bbd --- /dev/null +++ b/adix/tdigest.html @@ -0,0 +1,413 @@ + + + + + + + + + + + + + + + + + + +adix/tdigest + + + + + + + + +
+
+

adix/tdigest

+
+
+
+ +     Dark Mode +
+ +
+ Search: +
+
+ Group by: + +
+ + +
+   Source +  Edit + +
+
+ +

This is a "tail digest" {github/tdunning/t-digest|arxiv.org/abs/1902.04023}. Counter decs are not possible. (So, moving quantiles are unsupported.) In my experiments, quantiles are 5X slower than adix/lghisto. Tail quantiles do deliver better accuracy for less space (but lghisto already needs little local cache space | network BW in absolute terms). There may be a way to adapt my B-Tree to speed up the idea. { tDig is also very involved - folks just intuit histo(ln(x)), but that is a more subjective critique. }

+
+

Types

+
+
+
DigesT = object
+  scale*: Scale              ## What scale function to use
+  nMerges: int
+  min, max: float
+  cpr, pubCpr: float
+  nM, nT: int
+  wTot, wBuf: float
+  mrg, buf: seq[Group]
+
+
+ + +  Source +  Edit + +
+
+
+
Group = object
+  m*: float                  ## mean
+  w*: int                    ## weight
+  
+
+ +Group/Cluster/Centroid +  Source +  Edit + +
+
+
+
Scale = enum
+  scLog                      ## Other scales possible, but unimpl here
+
+ + +  Source +  Edit + +
+
+ +
+
+

Procs

+
+
+
func add(s: var DigesT; others: var openArray[DigesT]) {....raises: [ValueError],
+    tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
func add(s: var DigesT; x: float; w = 1) {....raises: [ValueError], tags: [].}
+
+ +Main update API +  Source +  Edit + +
+
+
+
func cdf(s: var DigesT; x: float): float {....raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
func compress(s: var DigesT) {....raises: [], tags: [].}
+
+ +best done only when we want to show results to the outside world. +  Source +  Edit + +
+
+
+
func init(s: var DigesT; cpr = 100.0; scale = scLog; mainLen = 0; nBuf = 0) {.
+    ...raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
func initDigesT(cpr = 100.0; scale = scLog; mainLen = 0; nBuf = 0): DigesT {.
+    ...raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
func mergeNew(s: var DigesT; force = false; cpr = -1.0) {....raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
func quantile(s: var DigesT; q: float): float {....raises: [ValueError], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
func space(s: DigesT): int {....raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+
+
func weight(s: DigesT): int {....raises: [], tags: [].}
+
+ +total count represented +  Source +  Edit + +
+
+ +
+
+

Iterators

+
+
+
iterator groups(s: DigesT): Group {....raises: [], tags: [].}
+
+ + +  Source +  Edit + +
+
+ +
+ +
+
+ +
+ +
+
+
+ + + diff --git a/adix/tdigest.idx b/adix/tdigest.idx new file mode 100644 index 0000000..2e4f465 --- /dev/null +++ b/adix/tdigest.idx @@ -0,0 +1,15 @@ +scLog adix/tdigest.html#scLog Scale.scLog +Scale adix/tdigest.html#Scale tdigest: Scale +Group adix/tdigest.html#Group tdigest: Group +DigesT adix/tdigest.html#DigesT tdigest: DigesT +init adix/tdigest.html#init,DigesT,float,int,int tdigest: init(s: var DigesT; cpr = 100.0; scale = scLog; mainLen = 0; nBuf = 0) +initDigesT adix/tdigest.html#initDigesT,float,int,int tdigest: initDigesT(cpr = 100.0; scale = scLog; mainLen = 0; nBuf = 0): DigesT +space adix/tdigest.html#space,DigesT tdigest: space(s: DigesT): int +weight adix/tdigest.html#weight,DigesT tdigest: weight(s: DigesT): int +mergeNew adix/tdigest.html#mergeNew,DigesT,float tdigest: mergeNew(s: var DigesT; force = false; cpr = -1.0) +add adix/tdigest.html#add,DigesT,float,int tdigest: add(s: var DigesT; x: float; w = 1) +compress adix/tdigest.html#compress,DigesT tdigest: compress(s: var DigesT) +groups adix/tdigest.html#groups.i,DigesT tdigest: groups(s: DigesT): Group +add adix/tdigest.html#add,DigesT,openArray[DigesT] tdigest: add(s: var DigesT; others: var openArray[DigesT]) +quantile adix/tdigest.html#quantile,DigesT,float tdigest: quantile(s: var DigesT; q: float): float +cdf adix/tdigest.html#cdf,DigesT,float tdigest: cdf(s: var DigesT; x: float): float diff --git a/adix/uniqce.html b/adix/uniqce.html new file mode 100644 index 0000000..0591bdd --- /dev/null +++ b/adix/uniqce.html @@ -0,0 +1,288 @@ + + + + + + + + + + + + + + + + + + +adix/uniqce + + + + + + + + +
+
+

adix/uniqce

+
+ +   Source +  Edit + +
+
+ +

The min-count sketch (NOT count-min) idea is to see hash(x) as a U(0,1) & use P(sampleMax<x)=x^n for sample size n. Low art inverts a confidence.ival for h.max to estimate n. Tracking k-most distinct h gives better accuracy and is usually called a KMV sketch. (Intuition is that k-th edge val => average gap between k-1 uniques&averaging cuts noise.) See Bar-Yossef 2002 "Counting Distinct..", Giroire05 "Order statistics & estimating cardinalities" & Ting14 "Streamed approximate counting..".

+
+

Types

+
+
+
UniqCe[F] = object
+  tail: seq[F]
+  k: int
+  est: float64
+
+
+ + +  Source +  Edit + +
+
+ +
+
+

Procs

+
+
+
proc initUniqCe[F: SomeFloat](k = 1024): UniqCe[F]
+
+ +Return initialized UniqCe with tail size k. k=1024 costs 4K|1VM page +  Source +  Edit + +
+
+
+
proc jaccard[F: SomeFloat](a: UniqCe[F]; b: UniqCe[F]): float32
+
+ +Exact Jaccard coefficient (|intersect|/|union|) of the two sample tails. NOTE: jaccard(a,b) * union(a, b).nUnique estimates nUnique(a ^ b). +  Source +  Edit + +
+
+
+
proc nUnique[F: SomeFloat](uc: UniqCe[F]): float32
+
+ +Estimate number of unique elements seen so far. +  Source +  Edit + +
+
+
+
proc nUniqueErr[F: SomeFloat](uc: UniqCe[F]): float32
+
+ +Estimated error on estimate of unique elements seen so far. +  Source +  Edit + +
+
+
+
proc push[F: SomeFloat](uc: var UniqCe[F]; h: F)
+
+ +Incorporate visitation of an element. NOTE: std/hashes.hash(string) OUTPUT ONLY FILLS 32-BITS => push takes x on [0,1] instead of a key|hash() val. +  Source +  Edit + +
+
+
+
proc union[F: SomeFloat](a: UniqCe[F]; b: UniqCe[F]): UniqCe[F]
+
+ +Return merge/union of a & b. +  Source +  Edit + +
+
+
+
proc union[F: SomeFloat](a: var UniqCe[F]; b: UniqCe[F])
+
+ +Push all hashes from b onto a effecting an estimated set union. +  Source +  Edit + +
+
+ +
+ +
+
+ +
+ +
+
+
+ + + diff --git a/adix/uniqce.idx b/adix/uniqce.idx new file mode 100644 index 0000000..afa07f3 --- /dev/null +++ b/adix/uniqce.idx @@ -0,0 +1,8 @@ +UniqCe adix/uniqce.html#UniqCe uniqce: UniqCe +initUniqCe adix/uniqce.html#initUniqCe,int uniqce: initUniqCe[F: SomeFloat](k = 1024): UniqCe[F] +push adix/uniqce.html#push,UniqCe[F: SomeFloat],F uniqce: push[F: SomeFloat](uc: var UniqCe[F]; h: F) +nUnique adix/uniqce.html#nUnique,UniqCe[F: SomeFloat] uniqce: nUnique[F: SomeFloat](uc: UniqCe[F]): float32 +nUniqueErr adix/uniqce.html#nUniqueErr,UniqCe[F: SomeFloat] uniqce: nUniqueErr[F: SomeFloat](uc: UniqCe[F]): float32 +jaccard adix/uniqce.html#jaccard,UniqCe[F: SomeFloat],UniqCe[F: SomeFloat] uniqce: jaccard[F: SomeFloat](a: UniqCe[F]; b: UniqCe[F]): float32 +union adix/uniqce.html#union,UniqCe[F: SomeFloat],UniqCe[F: SomeFloat] uniqce: union[F: SomeFloat](a: var UniqCe[F]; b: UniqCe[F]) +union adix/uniqce.html#union,UniqCe[F: SomeFloat],UniqCe[F: SomeFloat]_2 uniqce: union[F: SomeFloat](a: UniqCe[F]; b: UniqCe[F]): UniqCe[F] diff --git a/adix/xlang.html b/adix/xlang.html new file mode 100644 index 0000000..2b22750 --- /dev/null +++ b/adix/xlang.html @@ -0,0 +1,253 @@ + + + + + + + + + + + + + + + + + + +adix/xlang + + + + + + + + +
+
+

adix/xlang

+
+
+
+ +     Dark Mode +
+ +
+ Search: +
+
+ Group by: + +
+ + +
+   Source +  Edit + +
+
+ +

+
+

Procs

+
+
+
proc `&=`[T, U](a: var T; b: U) {.inline.}
+
+ +Updating bit-wise and +  Source +  Edit + +
+
+
+
proc `<<=`[T, U](a: var T; b: U) {.inline.}
+
+ +Updating bit-wise shl +  Source +  Edit + +
+
+
+
proc `>>=`[T, U](a: var T; b: U) {.inline.}
+
+ +Updating bit-wise shr +  Source +  Edit + +
+
+
+
proc `^=`[T, U](a: var T; b: U) {.inline.}
+
+ +Updating bit-wise xor +  Source +  Edit + +
+
+
+
proc `|=`[T, U](a: var T; b: U) {.inline.}
+
+ +Updating bit-wise or +  Source +  Edit + +
+
+ +
+
+

Templates

+
+
+
template cfor(init, test, update, body: untyped)
+
+ +C-like for loop template. May need () around arguments at call site. Usage is like: cfor (var i = 0), i < 16, i += 2: body +  Source +  Edit + +
+
+ +
+ +
+
+ +
+ +
+
+
+ + + diff --git a/adix/xlang.idx b/adix/xlang.idx new file mode 100644 index 0000000..3f247aa --- /dev/null +++ b/adix/xlang.idx @@ -0,0 +1,6 @@ +cfor adix/xlang.html#cfor.t,untyped,untyped,untyped,untyped xlang: cfor(init, test, update, body: untyped) +`&=` adix/xlang.html#&=,T,U xlang: `&=`[T, U](a: var T; b: U) +`|=` adix/xlang.html#|=,T,U xlang: `|=`[T, U](a: var T; b: U) +`^=` adix/xlang.html#^=,T,U xlang: `^=`[T, U](a: var T; b: U) +`<<=` adix/xlang.html#<<=,T,U xlang: `<<=`[T, U](a: var T; b: U) +`>>=` adix/xlang.html#>>=,T,U xlang: `>>=`[T, U](a: var T; b: U) diff --git a/dochack.js b/dochack.js new file mode 100644 index 0000000..354cb43 --- /dev/null +++ b/dochack.js @@ -0,0 +1,2036 @@ +/* Generated by the Nim Compiler v1.6.15 */ +var framePtr = null; +var excHandler = 0; +var lastJSError = null; +var NTI654311438 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI503317017 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI637534300 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI637534299 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI637534298 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI637534297 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI637534296 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI637534295 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI637534294 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI637534293 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI637534292 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI637534291 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI637534290 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI637534289 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI637534288 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI637534287 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI637534286 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI637534285 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI637534284 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI637534283 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI637534282 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI637534281 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI637534280 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI637534279 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI637534278 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI637534277 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI637534276 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI637534349 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI637534238 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI637534396 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI637534393 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI637534392 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI637534273 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI637534395 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI637534274 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI637534342 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI637534232 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI637534331 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI637534343 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI637534233 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI637534330 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI637534329 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI637534348 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI637534237 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI637534328 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI637534327 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI637534344 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI637534234 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI637534326 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI637534334 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI637534345 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI637534235 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI637534333 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI33554456 = {size: 0,kind: 31,base: null,node: null,finalizer: null}; +var NTI637534347 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI637534346 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI637534236 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI33554466 = {size: 0,kind: 1,base: null,node: null,finalizer: null}; +var NTI637534318 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI637534222 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI637534332 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI637534226 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI637534325 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI637534225 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI637534223 = {size: 0, kind: 14, base: null, node: null, finalizer: null}; +var NTI637534324 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI637534323 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI637534322 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI637534321 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI637534224 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI637534652 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI33555124 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI33555128 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI33555130 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI33555083 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI33555165 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI33554439 = {size: 0,kind: 28,base: null,node: null,finalizer: null}; +var NTI33554440 = {size: 0,kind: 29,base: null,node: null,finalizer: null}; +var NTI33555164 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI33555112 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI33555113 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI33555120 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI33555122 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NNI33555122 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; +NTI33555122.node = NNI33555122; +var NNI33555120 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; +NTI33555120.node = NNI33555120; +var NNI33555113 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; +NTI33555113.node = NNI33555113; +NTI33555164.base = NTI33555112; +NTI33555165.base = NTI33555112; +var NNI33555112 = {kind: 2, len: 5, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "parent", len: 0, typ: NTI33555164, name: "parent", sons: null}, +{kind: 1, offset: "name", len: 0, typ: NTI33554440, name: "name", sons: null}, +{kind: 1, offset: "message", len: 0, typ: NTI33554439, name: "msg", sons: null}, +{kind: 1, offset: "trace", len: 0, typ: NTI33554439, name: "trace", sons: null}, +{kind: 1, offset: "up", len: 0, typ: NTI33555165, name: "up", sons: null}]}; +NTI33555112.node = NNI33555112; +var NNI33555083 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; +NTI33555083.node = NNI33555083; +NTI33555112.base = NTI33555083; +NTI33555113.base = NTI33555112; +NTI33555120.base = NTI33555113; +NTI33555122.base = NTI33555120; +var NNI33555130 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; +NTI33555130.node = NNI33555130; +NTI33555130.base = NTI33555113; +var NNI33555128 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; +NTI33555128.node = NNI33555128; +NTI33555128.base = NTI33555113; +var NNI33555124 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; +NTI33555124.node = NNI33555124; +NTI33555124.base = NTI33555113; +NTI637534322.base = NTI637534224; +NTI637534323.base = NTI637534224; +NTI637534324.base = NTI637534224; +var NNI637534223 = {kind: 2, offset: 0, typ: null, name: null, len: 12, sons: {"1": {kind: 1, offset: 1, typ: NTI637534223, name: "ElementNode", len: 0, sons: null}, +"2": {kind: 1, offset: 2, typ: NTI637534223, name: "AttributeNode", len: 0, sons: null}, +"3": {kind: 1, offset: 3, typ: NTI637534223, name: "TextNode", len: 0, sons: null}, +"4": {kind: 1, offset: 4, typ: NTI637534223, name: "CDATANode", len: 0, sons: null}, +"5": {kind: 1, offset: 5, typ: NTI637534223, name: "EntityRefNode", len: 0, sons: null}, +"6": {kind: 1, offset: 6, typ: NTI637534223, name: "EntityNode", len: 0, sons: null}, +"7": {kind: 1, offset: 7, typ: NTI637534223, name: "ProcessingInstructionNode", len: 0, sons: null}, +"8": {kind: 1, offset: 8, typ: NTI637534223, name: "CommentNode", len: 0, sons: null}, +"9": {kind: 1, offset: 9, typ: NTI637534223, name: "DocumentNode", len: 0, sons: null}, +"10": {kind: 1, offset: 10, typ: NTI637534223, name: "DocumentTypeNode", len: 0, sons: null}, +"11": {kind: 1, offset: 11, typ: NTI637534223, name: "DocumentFragmentNode", len: 0, sons: null}, +"12": {kind: 1, offset: 12, typ: NTI637534223, name: "NotationNode", len: 0, sons: null}}}; +NTI637534223.node = NNI637534223; +var NNI637534318 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; +NTI637534318.node = NNI637534318; +NTI637534318.base = NTI33555083; +NTI637534222.base = NTI637534318; +NTI637534347.base = NTI637534226; +var NNI637534346 = {kind: 2, len: 10, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "acceptCharset", len: 0, typ: NTI33554440, name: "acceptCharset", sons: null}, +{kind: 1, offset: "action", len: 0, typ: NTI33554440, name: "action", sons: null}, +{kind: 1, offset: "autocomplete", len: 0, typ: NTI33554440, name: "autocomplete", sons: null}, +{kind: 1, offset: "elements", len: 0, typ: NTI637534347, name: "elements", sons: null}, +{kind: 1, offset: "encoding", len: 0, typ: NTI33554440, name: "encoding", sons: null}, +{kind: 1, offset: "enctype", len: 0, typ: NTI33554440, name: "enctype", sons: null}, +{kind: 1, offset: "length", len: 0, typ: NTI33554456, name: "length", sons: null}, +{kind: 1, offset: "method", len: 0, typ: NTI33554440, name: "method", sons: null}, +{kind: 1, offset: "noValidate", len: 0, typ: NTI33554466, name: "noValidate", sons: null}, +{kind: 1, offset: "target", len: 0, typ: NTI33554440, name: "target", sons: null}]}; +NTI637534346.node = NNI637534346; +NTI637534346.base = NTI637534332; +NTI637534236.base = NTI637534346; +var NNI637534345 = {kind: 2, len: 5, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "defaultSelected", len: 0, typ: NTI33554466, name: "defaultSelected", sons: null}, +{kind: 1, offset: "selected", len: 0, typ: NTI33554466, name: "selected", sons: null}, +{kind: 1, offset: "selectedIndex", len: 0, typ: NTI33554456, name: "selectedIndex", sons: null}, +{kind: 1, offset: "text", len: 0, typ: NTI33554440, name: "text", sons: null}, +{kind: 1, offset: "value", len: 0, typ: NTI33554440, name: "value", sons: null}]}; +NTI637534345.node = NNI637534345; +NTI637534345.base = NTI637534332; +NTI637534235.base = NTI637534345; +NTI637534333.base = NTI637534235; +NTI637534334.base = NTI637534235; +var NNI637534332 = {kind: 2, len: 20, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "className", len: 0, typ: NTI33554440, name: "className", sons: null}, +{kind: 1, offset: "classList", len: 0, typ: NTI637534222, name: "classList", sons: null}, +{kind: 1, offset: "checked", len: 0, typ: NTI33554466, name: "checked", sons: null}, +{kind: 1, offset: "defaultChecked", len: 0, typ: NTI33554466, name: "defaultChecked", sons: null}, +{kind: 1, offset: "defaultValue", len: 0, typ: NTI33554440, name: "defaultValue", sons: null}, +{kind: 1, offset: "disabled", len: 0, typ: NTI33554466, name: "disabled", sons: null}, +{kind: 1, offset: "form", len: 0, typ: NTI637534236, name: "form", sons: null}, +{kind: 1, offset: "name", len: 0, typ: NTI33554440, name: "name", sons: null}, +{kind: 1, offset: "readOnly", len: 0, typ: NTI33554466, name: "readOnly", sons: null}, +{kind: 1, offset: "options", len: 0, typ: NTI637534333, name: "options", sons: null}, +{kind: 1, offset: "selectedOptions", len: 0, typ: NTI637534334, name: "selectedOptions", sons: null}, +{kind: 1, offset: "clientWidth", len: 0, typ: NTI33554456, name: "clientWidth", sons: null}, +{kind: 1, offset: "clientHeight", len: 0, typ: NTI33554456, name: "clientHeight", sons: null}, +{kind: 1, offset: "contentEditable", len: 0, typ: NTI33554440, name: "contentEditable", sons: null}, +{kind: 1, offset: "isContentEditable", len: 0, typ: NTI33554466, name: "isContentEditable", sons: null}, +{kind: 1, offset: "dir", len: 0, typ: NTI33554440, name: "dir", sons: null}, +{kind: 1, offset: "offsetHeight", len: 0, typ: NTI33554456, name: "offsetHeight", sons: null}, +{kind: 1, offset: "offsetWidth", len: 0, typ: NTI33554456, name: "offsetWidth", sons: null}, +{kind: 1, offset: "offsetLeft", len: 0, typ: NTI33554456, name: "offsetLeft", sons: null}, +{kind: 1, offset: "offsetTop", len: 0, typ: NTI33554456, name: "offsetTop", sons: null}]}; +NTI637534332.node = NNI637534332; +NTI637534332.base = NTI637534321; +NTI637534226.base = NTI637534332; +var NNI637534344 = {kind: 2, len: 3, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "text", len: 0, typ: NTI33554440, name: "text", sons: null}, +{kind: 1, offset: "x", len: 0, typ: NTI33554456, name: "x", sons: null}, +{kind: 1, offset: "y", len: 0, typ: NTI33554456, name: "y", sons: null}]}; +NTI637534344.node = NNI637534344; +NTI637534344.base = NTI637534332; +NTI637534234.base = NTI637534344; +NTI637534326.base = NTI637534234; +NTI637534327.base = NTI637534236; +var NNI637534348 = {kind: 2, len: 8, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "border", len: 0, typ: NTI33554456, name: "border", sons: null}, +{kind: 1, offset: "complete", len: 0, typ: NTI33554466, name: "complete", sons: null}, +{kind: 1, offset: "height", len: 0, typ: NTI33554456, name: "height", sons: null}, +{kind: 1, offset: "hspace", len: 0, typ: NTI33554456, name: "hspace", sons: null}, +{kind: 1, offset: "lowsrc", len: 0, typ: NTI33554440, name: "lowsrc", sons: null}, +{kind: 1, offset: "src", len: 0, typ: NTI33554440, name: "src", sons: null}, +{kind: 1, offset: "vspace", len: 0, typ: NTI33554456, name: "vspace", sons: null}, +{kind: 1, offset: "width", len: 0, typ: NTI33554456, name: "width", sons: null}]}; +NTI637534348.node = NNI637534348; +NTI637534348.base = NTI637534332; +NTI637534237.base = NTI637534348; +NTI637534328.base = NTI637534237; +NTI637534329.base = NTI637534226; +var NNI637534343 = {kind: 2, len: 6, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "height", len: 0, typ: NTI33554456, name: "height", sons: null}, +{kind: 1, offset: "hspace", len: 0, typ: NTI33554456, name: "hspace", sons: null}, +{kind: 1, offset: "src", len: 0, typ: NTI33554440, name: "src", sons: null}, +{kind: 1, offset: "width", len: 0, typ: NTI33554456, name: "width", sons: null}, +{kind: 1, offset: "type", len: 0, typ: NTI33554440, name: "type", sons: null}, +{kind: 1, offset: "vspace", len: 0, typ: NTI33554456, name: "vspace", sons: null}]}; +NTI637534343.node = NNI637534343; +NTI637534343.base = NTI637534332; +NTI637534233.base = NTI637534343; +NTI637534330.base = NTI637534233; +var NNI637534342 = {kind: 2, len: 4, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "target", len: 0, typ: NTI33554440, name: "target", sons: null}, +{kind: 1, offset: "text", len: 0, typ: NTI33554440, name: "text", sons: null}, +{kind: 1, offset: "x", len: 0, typ: NTI33554456, name: "x", sons: null}, +{kind: 1, offset: "y", len: 0, typ: NTI33554456, name: "y", sons: null}]}; +NTI637534342.node = NNI637534342; +NTI637534342.base = NTI637534332; +NTI637534232.base = NTI637534342; +NTI637534331.base = NTI637534232; +var NNI637534392 = {kind: 1, offset: "then", len: 0, typ: NTI637534393, name: "then", sons: null}; +NTI637534392.node = NNI637534392; +NTI637534273.base = NTI637534392; +var NNI637534395 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "ready", len: 0, typ: NTI637534273, name: "ready", sons: null}, +{kind: 1, offset: "onloadingdone", len: 0, typ: NTI637534396, name: "onloadingdone", sons: null}]}; +NTI637534395.node = NNI637534395; +NTI637534274.base = NTI637534395; +var NNI637534325 = {kind: 2, len: 23, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "activeElement", len: 0, typ: NTI637534226, name: "activeElement", sons: null}, +{kind: 1, offset: "documentElement", len: 0, typ: NTI637534226, name: "documentElement", sons: null}, +{kind: 1, offset: "alinkColor", len: 0, typ: NTI33554440, name: "alinkColor", sons: null}, +{kind: 1, offset: "bgColor", len: 0, typ: NTI33554440, name: "bgColor", sons: null}, +{kind: 1, offset: "body", len: 0, typ: NTI637534226, name: "body", sons: null}, +{kind: 1, offset: "charset", len: 0, typ: NTI33554440, name: "charset", sons: null}, +{kind: 1, offset: "cookie", len: 0, typ: NTI33554440, name: "cookie", sons: null}, +{kind: 1, offset: "defaultCharset", len: 0, typ: NTI33554440, name: "defaultCharset", sons: null}, +{kind: 1, offset: "fgColor", len: 0, typ: NTI33554440, name: "fgColor", sons: null}, +{kind: 1, offset: "head", len: 0, typ: NTI637534226, name: "head", sons: null}, +{kind: 1, offset: "lastModified", len: 0, typ: NTI33554440, name: "lastModified", sons: null}, +{kind: 1, offset: "linkColor", len: 0, typ: NTI33554440, name: "linkColor", sons: null}, +{kind: 1, offset: "referrer", len: 0, typ: NTI33554440, name: "referrer", sons: null}, +{kind: 1, offset: "title", len: 0, typ: NTI33554440, name: "title", sons: null}, +{kind: 1, offset: "URL", len: 0, typ: NTI33554440, name: "URL", sons: null}, +{kind: 1, offset: "vlinkColor", len: 0, typ: NTI33554440, name: "vlinkColor", sons: null}, +{kind: 1, offset: "anchors", len: 0, typ: NTI637534326, name: "anchors", sons: null}, +{kind: 1, offset: "forms", len: 0, typ: NTI637534327, name: "forms", sons: null}, +{kind: 1, offset: "images", len: 0, typ: NTI637534328, name: "images", sons: null}, +{kind: 1, offset: "applets", len: 0, typ: NTI637534329, name: "applets", sons: null}, +{kind: 1, offset: "embeds", len: 0, typ: NTI637534330, name: "embeds", sons: null}, +{kind: 1, offset: "links", len: 0, typ: NTI637534331, name: "links", sons: null}, +{kind: 1, offset: "fonts", len: 0, typ: NTI637534274, name: "fonts", sons: null}]}; +NTI637534325.node = NNI637534325; +NTI637534325.base = NTI637534321; +NTI637534225.base = NTI637534325; +var NNI637534349 = {kind: 2, len: 368, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "alignContent", len: 0, typ: NTI33554440, name: "alignContent", sons: null}, +{kind: 1, offset: "alignItems", len: 0, typ: NTI33554440, name: "alignItems", sons: null}, +{kind: 1, offset: "alignSelf", len: 0, typ: NTI33554440, name: "alignSelf", sons: null}, +{kind: 1, offset: "all", len: 0, typ: NTI33554440, name: "all", sons: null}, +{kind: 1, offset: "animation", len: 0, typ: NTI33554440, name: "animation", sons: null}, +{kind: 1, offset: "animationDelay", len: 0, typ: NTI33554440, name: "animationDelay", sons: null}, +{kind: 1, offset: "animationDirection", len: 0, typ: NTI33554440, name: "animationDirection", sons: null}, +{kind: 1, offset: "animationDuration", len: 0, typ: NTI33554440, name: "animationDuration", sons: null}, +{kind: 1, offset: "animationFillMode", len: 0, typ: NTI33554440, name: "animationFillMode", sons: null}, +{kind: 1, offset: "animationIterationCount", len: 0, typ: NTI33554440, name: "animationIterationCount", sons: null}, +{kind: 1, offset: "animationName", len: 0, typ: NTI33554440, name: "animationName", sons: null}, +{kind: 1, offset: "animationPlayState", len: 0, typ: NTI33554440, name: "animationPlayState", sons: null}, +{kind: 1, offset: "animationTimingFunction", len: 0, typ: NTI33554440, name: "animationTimingFunction", sons: null}, +{kind: 1, offset: "backdropFilter", len: 0, typ: NTI33554440, name: "backdropFilter", sons: null}, +{kind: 1, offset: "backfaceVisibility", len: 0, typ: NTI33554440, name: "backfaceVisibility", sons: null}, +{kind: 1, offset: "background", len: 0, typ: NTI33554440, name: "background", sons: null}, +{kind: 1, offset: "backgroundAttachment", len: 0, typ: NTI33554440, name: "backgroundAttachment", sons: null}, +{kind: 1, offset: "backgroundBlendMode", len: 0, typ: NTI33554440, name: "backgroundBlendMode", sons: null}, +{kind: 1, offset: "backgroundClip", len: 0, typ: NTI33554440, name: "backgroundClip", sons: null}, +{kind: 1, offset: "backgroundColor", len: 0, typ: NTI33554440, name: "backgroundColor", sons: null}, +{kind: 1, offset: "backgroundImage", len: 0, typ: NTI33554440, name: "backgroundImage", sons: null}, +{kind: 1, offset: "backgroundOrigin", len: 0, typ: NTI33554440, name: "backgroundOrigin", sons: null}, +{kind: 1, offset: "backgroundPosition", len: 0, typ: NTI33554440, name: "backgroundPosition", sons: null}, +{kind: 1, offset: "backgroundRepeat", len: 0, typ: NTI33554440, name: "backgroundRepeat", sons: null}, +{kind: 1, offset: "backgroundSize", len: 0, typ: NTI33554440, name: "backgroundSize", sons: null}, +{kind: 1, offset: "blockSize", len: 0, typ: NTI33554440, name: "blockSize", sons: null}, +{kind: 1, offset: "border", len: 0, typ: NTI33554440, name: "border", sons: null}, +{kind: 1, offset: "borderBlock", len: 0, typ: NTI33554440, name: "borderBlock", sons: null}, +{kind: 1, offset: "borderBlockColor", len: 0, typ: NTI33554440, name: "borderBlockColor", sons: null}, +{kind: 1, offset: "borderBlockEnd", len: 0, typ: NTI33554440, name: "borderBlockEnd", sons: null}, +{kind: 1, offset: "borderBlockEndColor", len: 0, typ: NTI33554440, name: "borderBlockEndColor", sons: null}, +{kind: 1, offset: "borderBlockEndStyle", len: 0, typ: NTI33554440, name: "borderBlockEndStyle", sons: null}, +{kind: 1, offset: "borderBlockEndWidth", len: 0, typ: NTI33554440, name: "borderBlockEndWidth", sons: null}, +{kind: 1, offset: "borderBlockStart", len: 0, typ: NTI33554440, name: "borderBlockStart", sons: null}, +{kind: 1, offset: "borderBlockStartColor", len: 0, typ: NTI33554440, name: "borderBlockStartColor", sons: null}, +{kind: 1, offset: "borderBlockStartStyle", len: 0, typ: NTI33554440, name: "borderBlockStartStyle", sons: null}, +{kind: 1, offset: "borderBlockStartWidth", len: 0, typ: NTI33554440, name: "borderBlockStartWidth", sons: null}, +{kind: 1, offset: "borderBlockStyle", len: 0, typ: NTI33554440, name: "borderBlockStyle", sons: null}, +{kind: 1, offset: "borderBlockWidth", len: 0, typ: NTI33554440, name: "borderBlockWidth", sons: null}, +{kind: 1, offset: "borderBottom", len: 0, typ: NTI33554440, name: "borderBottom", sons: null}, +{kind: 1, offset: "borderBottomColor", len: 0, typ: NTI33554440, name: "borderBottomColor", sons: null}, +{kind: 1, offset: "borderBottomLeftRadius", len: 0, typ: NTI33554440, name: "borderBottomLeftRadius", sons: null}, +{kind: 1, offset: "borderBottomRightRadius", len: 0, typ: NTI33554440, name: "borderBottomRightRadius", sons: null}, +{kind: 1, offset: "borderBottomStyle", len: 0, typ: NTI33554440, name: "borderBottomStyle", sons: null}, +{kind: 1, offset: "borderBottomWidth", len: 0, typ: NTI33554440, name: "borderBottomWidth", sons: null}, +{kind: 1, offset: "borderCollapse", len: 0, typ: NTI33554440, name: "borderCollapse", sons: null}, +{kind: 1, offset: "borderColor", len: 0, typ: NTI33554440, name: "borderColor", sons: null}, +{kind: 1, offset: "borderEndEndRadius", len: 0, typ: NTI33554440, name: "borderEndEndRadius", sons: null}, +{kind: 1, offset: "borderEndStartRadius", len: 0, typ: NTI33554440, name: "borderEndStartRadius", sons: null}, +{kind: 1, offset: "borderImage", len: 0, typ: NTI33554440, name: "borderImage", sons: null}, +{kind: 1, offset: "borderImageOutset", len: 0, typ: NTI33554440, name: "borderImageOutset", sons: null}, +{kind: 1, offset: "borderImageRepeat", len: 0, typ: NTI33554440, name: "borderImageRepeat", sons: null}, +{kind: 1, offset: "borderImageSlice", len: 0, typ: NTI33554440, name: "borderImageSlice", sons: null}, +{kind: 1, offset: "borderImageSource", len: 0, typ: NTI33554440, name: "borderImageSource", sons: null}, +{kind: 1, offset: "borderImageWidth", len: 0, typ: NTI33554440, name: "borderImageWidth", sons: null}, +{kind: 1, offset: "borderInline", len: 0, typ: NTI33554440, name: "borderInline", sons: null}, +{kind: 1, offset: "borderInlineColor", len: 0, typ: NTI33554440, name: "borderInlineColor", sons: null}, +{kind: 1, offset: "borderInlineEnd", len: 0, typ: NTI33554440, name: "borderInlineEnd", sons: null}, +{kind: 1, offset: "borderInlineEndColor", len: 0, typ: NTI33554440, name: "borderInlineEndColor", sons: null}, +{kind: 1, offset: "borderInlineEndStyle", len: 0, typ: NTI33554440, name: "borderInlineEndStyle", sons: null}, +{kind: 1, offset: "borderInlineEndWidth", len: 0, typ: NTI33554440, name: "borderInlineEndWidth", sons: null}, +{kind: 1, offset: "borderInlineStart", len: 0, typ: NTI33554440, name: "borderInlineStart", sons: null}, +{kind: 1, offset: "borderInlineStartColor", len: 0, typ: NTI33554440, name: "borderInlineStartColor", sons: null}, +{kind: 1, offset: "borderInlineStartStyle", len: 0, typ: NTI33554440, name: "borderInlineStartStyle", sons: null}, +{kind: 1, offset: "borderInlineStartWidth", len: 0, typ: NTI33554440, name: "borderInlineStartWidth", sons: null}, +{kind: 1, offset: "borderInlineStyle", len: 0, typ: NTI33554440, name: "borderInlineStyle", sons: null}, +{kind: 1, offset: "borderInlineWidth", len: 0, typ: NTI33554440, name: "borderInlineWidth", sons: null}, +{kind: 1, offset: "borderLeft", len: 0, typ: NTI33554440, name: "borderLeft", sons: null}, +{kind: 1, offset: "borderLeftColor", len: 0, typ: NTI33554440, name: "borderLeftColor", sons: null}, +{kind: 1, offset: "borderLeftStyle", len: 0, typ: NTI33554440, name: "borderLeftStyle", sons: null}, +{kind: 1, offset: "borderLeftWidth", len: 0, typ: NTI33554440, name: "borderLeftWidth", sons: null}, +{kind: 1, offset: "borderRadius", len: 0, typ: NTI33554440, name: "borderRadius", sons: null}, +{kind: 1, offset: "borderRight", len: 0, typ: NTI33554440, name: "borderRight", sons: null}, +{kind: 1, offset: "borderRightColor", len: 0, typ: NTI33554440, name: "borderRightColor", sons: null}, +{kind: 1, offset: "borderRightStyle", len: 0, typ: NTI33554440, name: "borderRightStyle", sons: null}, +{kind: 1, offset: "borderRightWidth", len: 0, typ: NTI33554440, name: "borderRightWidth", sons: null}, +{kind: 1, offset: "borderSpacing", len: 0, typ: NTI33554440, name: "borderSpacing", sons: null}, +{kind: 1, offset: "borderStartEndRadius", len: 0, typ: NTI33554440, name: "borderStartEndRadius", sons: null}, +{kind: 1, offset: "borderStartStartRadius", len: 0, typ: NTI33554440, name: "borderStartStartRadius", sons: null}, +{kind: 1, offset: "borderStyle", len: 0, typ: NTI33554440, name: "borderStyle", sons: null}, +{kind: 1, offset: "borderTop", len: 0, typ: NTI33554440, name: "borderTop", sons: null}, +{kind: 1, offset: "borderTopColor", len: 0, typ: NTI33554440, name: "borderTopColor", sons: null}, +{kind: 1, offset: "borderTopLeftRadius", len: 0, typ: NTI33554440, name: "borderTopLeftRadius", sons: null}, +{kind: 1, offset: "borderTopRightRadius", len: 0, typ: NTI33554440, name: "borderTopRightRadius", sons: null}, +{kind: 1, offset: "borderTopStyle", len: 0, typ: NTI33554440, name: "borderTopStyle", sons: null}, +{kind: 1, offset: "borderTopWidth", len: 0, typ: NTI33554440, name: "borderTopWidth", sons: null}, +{kind: 1, offset: "borderWidth", len: 0, typ: NTI33554440, name: "borderWidth", sons: null}, +{kind: 1, offset: "bottom", len: 0, typ: NTI33554440, name: "bottom", sons: null}, +{kind: 1, offset: "boxDecorationBreak", len: 0, typ: NTI33554440, name: "boxDecorationBreak", sons: null}, +{kind: 1, offset: "boxShadow", len: 0, typ: NTI33554440, name: "boxShadow", sons: null}, +{kind: 1, offset: "boxSizing", len: 0, typ: NTI33554440, name: "boxSizing", sons: null}, +{kind: 1, offset: "breakAfter", len: 0, typ: NTI33554440, name: "breakAfter", sons: null}, +{kind: 1, offset: "breakBefore", len: 0, typ: NTI33554440, name: "breakBefore", sons: null}, +{kind: 1, offset: "breakInside", len: 0, typ: NTI33554440, name: "breakInside", sons: null}, +{kind: 1, offset: "captionSide", len: 0, typ: NTI33554440, name: "captionSide", sons: null}, +{kind: 1, offset: "caretColor", len: 0, typ: NTI33554440, name: "caretColor", sons: null}, +{kind: 1, offset: "clear", len: 0, typ: NTI33554440, name: "clear", sons: null}, +{kind: 1, offset: "clip", len: 0, typ: NTI33554440, name: "clip", sons: null}, +{kind: 1, offset: "clipPath", len: 0, typ: NTI33554440, name: "clipPath", sons: null}, +{kind: 1, offset: "color", len: 0, typ: NTI33554440, name: "color", sons: null}, +{kind: 1, offset: "colorAdjust", len: 0, typ: NTI33554440, name: "colorAdjust", sons: null}, +{kind: 1, offset: "columnCount", len: 0, typ: NTI33554440, name: "columnCount", sons: null}, +{kind: 1, offset: "columnFill", len: 0, typ: NTI33554440, name: "columnFill", sons: null}, +{kind: 1, offset: "columnGap", len: 0, typ: NTI33554440, name: "columnGap", sons: null}, +{kind: 1, offset: "columnRule", len: 0, typ: NTI33554440, name: "columnRule", sons: null}, +{kind: 1, offset: "columnRuleColor", len: 0, typ: NTI33554440, name: "columnRuleColor", sons: null}, +{kind: 1, offset: "columnRuleStyle", len: 0, typ: NTI33554440, name: "columnRuleStyle", sons: null}, +{kind: 1, offset: "columnRuleWidth", len: 0, typ: NTI33554440, name: "columnRuleWidth", sons: null}, +{kind: 1, offset: "columnSpan", len: 0, typ: NTI33554440, name: "columnSpan", sons: null}, +{kind: 1, offset: "columnWidth", len: 0, typ: NTI33554440, name: "columnWidth", sons: null}, +{kind: 1, offset: "columns", len: 0, typ: NTI33554440, name: "columns", sons: null}, +{kind: 1, offset: "contain", len: 0, typ: NTI33554440, name: "contain", sons: null}, +{kind: 1, offset: "content", len: 0, typ: NTI33554440, name: "content", sons: null}, +{kind: 1, offset: "counterIncrement", len: 0, typ: NTI33554440, name: "counterIncrement", sons: null}, +{kind: 1, offset: "counterReset", len: 0, typ: NTI33554440, name: "counterReset", sons: null}, +{kind: 1, offset: "counterSet", len: 0, typ: NTI33554440, name: "counterSet", sons: null}, +{kind: 1, offset: "cursor", len: 0, typ: NTI33554440, name: "cursor", sons: null}, +{kind: 1, offset: "direction", len: 0, typ: NTI33554440, name: "direction", sons: null}, +{kind: 1, offset: "display", len: 0, typ: NTI33554440, name: "display", sons: null}, +{kind: 1, offset: "emptyCells", len: 0, typ: NTI33554440, name: "emptyCells", sons: null}, +{kind: 1, offset: "filter", len: 0, typ: NTI33554440, name: "filter", sons: null}, +{kind: 1, offset: "flex", len: 0, typ: NTI33554440, name: "flex", sons: null}, +{kind: 1, offset: "flexBasis", len: 0, typ: NTI33554440, name: "flexBasis", sons: null}, +{kind: 1, offset: "flexDirection", len: 0, typ: NTI33554440, name: "flexDirection", sons: null}, +{kind: 1, offset: "flexFlow", len: 0, typ: NTI33554440, name: "flexFlow", sons: null}, +{kind: 1, offset: "flexGrow", len: 0, typ: NTI33554440, name: "flexGrow", sons: null}, +{kind: 1, offset: "flexShrink", len: 0, typ: NTI33554440, name: "flexShrink", sons: null}, +{kind: 1, offset: "flexWrap", len: 0, typ: NTI33554440, name: "flexWrap", sons: null}, +{kind: 1, offset: "cssFloat", len: 0, typ: NTI33554440, name: "cssFloat", sons: null}, +{kind: 1, offset: "font", len: 0, typ: NTI33554440, name: "font", sons: null}, +{kind: 1, offset: "fontFamily", len: 0, typ: NTI33554440, name: "fontFamily", sons: null}, +{kind: 1, offset: "fontFeatureSettings", len: 0, typ: NTI33554440, name: "fontFeatureSettings", sons: null}, +{kind: 1, offset: "fontKerning", len: 0, typ: NTI33554440, name: "fontKerning", sons: null}, +{kind: 1, offset: "fontLanguageOverride", len: 0, typ: NTI33554440, name: "fontLanguageOverride", sons: null}, +{kind: 1, offset: "fontOpticalSizing", len: 0, typ: NTI33554440, name: "fontOpticalSizing", sons: null}, +{kind: 1, offset: "fontSize", len: 0, typ: NTI33554440, name: "fontSize", sons: null}, +{kind: 1, offset: "fontSizeAdjust", len: 0, typ: NTI33554440, name: "fontSizeAdjust", sons: null}, +{kind: 1, offset: "fontStretch", len: 0, typ: NTI33554440, name: "fontStretch", sons: null}, +{kind: 1, offset: "fontStyle", len: 0, typ: NTI33554440, name: "fontStyle", sons: null}, +{kind: 1, offset: "fontSynthesis", len: 0, typ: NTI33554440, name: "fontSynthesis", sons: null}, +{kind: 1, offset: "fontVariant", len: 0, typ: NTI33554440, name: "fontVariant", sons: null}, +{kind: 1, offset: "fontVariantAlternates", len: 0, typ: NTI33554440, name: "fontVariantAlternates", sons: null}, +{kind: 1, offset: "fontVariantCaps", len: 0, typ: NTI33554440, name: "fontVariantCaps", sons: null}, +{kind: 1, offset: "fontVariantEastAsian", len: 0, typ: NTI33554440, name: "fontVariantEastAsian", sons: null}, +{kind: 1, offset: "fontVariantLigatures", len: 0, typ: NTI33554440, name: "fontVariantLigatures", sons: null}, +{kind: 1, offset: "fontVariantNumeric", len: 0, typ: NTI33554440, name: "fontVariantNumeric", sons: null}, +{kind: 1, offset: "fontVariantPosition", len: 0, typ: NTI33554440, name: "fontVariantPosition", sons: null}, +{kind: 1, offset: "fontVariationSettings", len: 0, typ: NTI33554440, name: "fontVariationSettings", sons: null}, +{kind: 1, offset: "fontWeight", len: 0, typ: NTI33554440, name: "fontWeight", sons: null}, +{kind: 1, offset: "gap", len: 0, typ: NTI33554440, name: "gap", sons: null}, +{kind: 1, offset: "grid", len: 0, typ: NTI33554440, name: "grid", sons: null}, +{kind: 1, offset: "gridArea", len: 0, typ: NTI33554440, name: "gridArea", sons: null}, +{kind: 1, offset: "gridAutoColumns", len: 0, typ: NTI33554440, name: "gridAutoColumns", sons: null}, +{kind: 1, offset: "gridAutoFlow", len: 0, typ: NTI33554440, name: "gridAutoFlow", sons: null}, +{kind: 1, offset: "gridAutoRows", len: 0, typ: NTI33554440, name: "gridAutoRows", sons: null}, +{kind: 1, offset: "gridColumn", len: 0, typ: NTI33554440, name: "gridColumn", sons: null}, +{kind: 1, offset: "gridColumnEnd", len: 0, typ: NTI33554440, name: "gridColumnEnd", sons: null}, +{kind: 1, offset: "gridColumnStart", len: 0, typ: NTI33554440, name: "gridColumnStart", sons: null}, +{kind: 1, offset: "gridRow", len: 0, typ: NTI33554440, name: "gridRow", sons: null}, +{kind: 1, offset: "gridRowEnd", len: 0, typ: NTI33554440, name: "gridRowEnd", sons: null}, +{kind: 1, offset: "gridRowStart", len: 0, typ: NTI33554440, name: "gridRowStart", sons: null}, +{kind: 1, offset: "gridTemplate", len: 0, typ: NTI33554440, name: "gridTemplate", sons: null}, +{kind: 1, offset: "gridTemplateAreas", len: 0, typ: NTI33554440, name: "gridTemplateAreas", sons: null}, +{kind: 1, offset: "gridTemplateColumns", len: 0, typ: NTI33554440, name: "gridTemplateColumns", sons: null}, +{kind: 1, offset: "gridTemplateRows", len: 0, typ: NTI33554440, name: "gridTemplateRows", sons: null}, +{kind: 1, offset: "hangingPunctuation", len: 0, typ: NTI33554440, name: "hangingPunctuation", sons: null}, +{kind: 1, offset: "height", len: 0, typ: NTI33554440, name: "height", sons: null}, +{kind: 1, offset: "hyphens", len: 0, typ: NTI33554440, name: "hyphens", sons: null}, +{kind: 1, offset: "imageOrientation", len: 0, typ: NTI33554440, name: "imageOrientation", sons: null}, +{kind: 1, offset: "imageRendering", len: 0, typ: NTI33554440, name: "imageRendering", sons: null}, +{kind: 1, offset: "inlineSize", len: 0, typ: NTI33554440, name: "inlineSize", sons: null}, +{kind: 1, offset: "inset", len: 0, typ: NTI33554440, name: "inset", sons: null}, +{kind: 1, offset: "insetBlock", len: 0, typ: NTI33554440, name: "insetBlock", sons: null}, +{kind: 1, offset: "insetBlockEnd", len: 0, typ: NTI33554440, name: "insetBlockEnd", sons: null}, +{kind: 1, offset: "insetBlockStart", len: 0, typ: NTI33554440, name: "insetBlockStart", sons: null}, +{kind: 1, offset: "insetInline", len: 0, typ: NTI33554440, name: "insetInline", sons: null}, +{kind: 1, offset: "insetInlineEnd", len: 0, typ: NTI33554440, name: "insetInlineEnd", sons: null}, +{kind: 1, offset: "insetInlineStart", len: 0, typ: NTI33554440, name: "insetInlineStart", sons: null}, +{kind: 1, offset: "isolation", len: 0, typ: NTI33554440, name: "isolation", sons: null}, +{kind: 1, offset: "justifyContent", len: 0, typ: NTI33554440, name: "justifyContent", sons: null}, +{kind: 1, offset: "justifyItems", len: 0, typ: NTI33554440, name: "justifyItems", sons: null}, +{kind: 1, offset: "justifySelf", len: 0, typ: NTI33554440, name: "justifySelf", sons: null}, +{kind: 1, offset: "left", len: 0, typ: NTI33554440, name: "left", sons: null}, +{kind: 1, offset: "letterSpacing", len: 0, typ: NTI33554440, name: "letterSpacing", sons: null}, +{kind: 1, offset: "lineBreak", len: 0, typ: NTI33554440, name: "lineBreak", sons: null}, +{kind: 1, offset: "lineHeight", len: 0, typ: NTI33554440, name: "lineHeight", sons: null}, +{kind: 1, offset: "listStyle", len: 0, typ: NTI33554440, name: "listStyle", sons: null}, +{kind: 1, offset: "listStyleImage", len: 0, typ: NTI33554440, name: "listStyleImage", sons: null}, +{kind: 1, offset: "listStylePosition", len: 0, typ: NTI33554440, name: "listStylePosition", sons: null}, +{kind: 1, offset: "listStyleType", len: 0, typ: NTI33554440, name: "listStyleType", sons: null}, +{kind: 1, offset: "margin", len: 0, typ: NTI33554440, name: "margin", sons: null}, +{kind: 1, offset: "marginBlock", len: 0, typ: NTI33554440, name: "marginBlock", sons: null}, +{kind: 1, offset: "marginBlockEnd", len: 0, typ: NTI33554440, name: "marginBlockEnd", sons: null}, +{kind: 1, offset: "marginBlockStart", len: 0, typ: NTI33554440, name: "marginBlockStart", sons: null}, +{kind: 1, offset: "marginBottom", len: 0, typ: NTI33554440, name: "marginBottom", sons: null}, +{kind: 1, offset: "marginInline", len: 0, typ: NTI33554440, name: "marginInline", sons: null}, +{kind: 1, offset: "marginInlineEnd", len: 0, typ: NTI33554440, name: "marginInlineEnd", sons: null}, +{kind: 1, offset: "marginInlineStart", len: 0, typ: NTI33554440, name: "marginInlineStart", sons: null}, +{kind: 1, offset: "marginLeft", len: 0, typ: NTI33554440, name: "marginLeft", sons: null}, +{kind: 1, offset: "marginRight", len: 0, typ: NTI33554440, name: "marginRight", sons: null}, +{kind: 1, offset: "marginTop", len: 0, typ: NTI33554440, name: "marginTop", sons: null}, +{kind: 1, offset: "mask", len: 0, typ: NTI33554440, name: "mask", sons: null}, +{kind: 1, offset: "maskBorder", len: 0, typ: NTI33554440, name: "maskBorder", sons: null}, +{kind: 1, offset: "maskBorderMode", len: 0, typ: NTI33554440, name: "maskBorderMode", sons: null}, +{kind: 1, offset: "maskBorderOutset", len: 0, typ: NTI33554440, name: "maskBorderOutset", sons: null}, +{kind: 1, offset: "maskBorderRepeat", len: 0, typ: NTI33554440, name: "maskBorderRepeat", sons: null}, +{kind: 1, offset: "maskBorderSlice", len: 0, typ: NTI33554440, name: "maskBorderSlice", sons: null}, +{kind: 1, offset: "maskBorderSource", len: 0, typ: NTI33554440, name: "maskBorderSource", sons: null}, +{kind: 1, offset: "maskBorderWidth", len: 0, typ: NTI33554440, name: "maskBorderWidth", sons: null}, +{kind: 1, offset: "maskClip", len: 0, typ: NTI33554440, name: "maskClip", sons: null}, +{kind: 1, offset: "maskComposite", len: 0, typ: NTI33554440, name: "maskComposite", sons: null}, +{kind: 1, offset: "maskImage", len: 0, typ: NTI33554440, name: "maskImage", sons: null}, +{kind: 1, offset: "maskMode", len: 0, typ: NTI33554440, name: "maskMode", sons: null}, +{kind: 1, offset: "maskOrigin", len: 0, typ: NTI33554440, name: "maskOrigin", sons: null}, +{kind: 1, offset: "maskPosition", len: 0, typ: NTI33554440, name: "maskPosition", sons: null}, +{kind: 1, offset: "maskRepeat", len: 0, typ: NTI33554440, name: "maskRepeat", sons: null}, +{kind: 1, offset: "maskSize", len: 0, typ: NTI33554440, name: "maskSize", sons: null}, +{kind: 1, offset: "maskType", len: 0, typ: NTI33554440, name: "maskType", sons: null}, +{kind: 1, offset: "maxBlockSize", len: 0, typ: NTI33554440, name: "maxBlockSize", sons: null}, +{kind: 1, offset: "maxHeight", len: 0, typ: NTI33554440, name: "maxHeight", sons: null}, +{kind: 1, offset: "maxInlineSize", len: 0, typ: NTI33554440, name: "maxInlineSize", sons: null}, +{kind: 1, offset: "maxWidth", len: 0, typ: NTI33554440, name: "maxWidth", sons: null}, +{kind: 1, offset: "minBlockSize", len: 0, typ: NTI33554440, name: "minBlockSize", sons: null}, +{kind: 1, offset: "minHeight", len: 0, typ: NTI33554440, name: "minHeight", sons: null}, +{kind: 1, offset: "minInlineSize", len: 0, typ: NTI33554440, name: "minInlineSize", sons: null}, +{kind: 1, offset: "minWidth", len: 0, typ: NTI33554440, name: "minWidth", sons: null}, +{kind: 1, offset: "mixBlendMode", len: 0, typ: NTI33554440, name: "mixBlendMode", sons: null}, +{kind: 1, offset: "objectFit", len: 0, typ: NTI33554440, name: "objectFit", sons: null}, +{kind: 1, offset: "objectPosition", len: 0, typ: NTI33554440, name: "objectPosition", sons: null}, +{kind: 1, offset: "offset", len: 0, typ: NTI33554440, name: "offset", sons: null}, +{kind: 1, offset: "offsetAnchor", len: 0, typ: NTI33554440, name: "offsetAnchor", sons: null}, +{kind: 1, offset: "offsetDistance", len: 0, typ: NTI33554440, name: "offsetDistance", sons: null}, +{kind: 1, offset: "offsetPath", len: 0, typ: NTI33554440, name: "offsetPath", sons: null}, +{kind: 1, offset: "offsetRotate", len: 0, typ: NTI33554440, name: "offsetRotate", sons: null}, +{kind: 1, offset: "opacity", len: 0, typ: NTI33554440, name: "opacity", sons: null}, +{kind: 1, offset: "order", len: 0, typ: NTI33554440, name: "order", sons: null}, +{kind: 1, offset: "orphans", len: 0, typ: NTI33554440, name: "orphans", sons: null}, +{kind: 1, offset: "outline", len: 0, typ: NTI33554440, name: "outline", sons: null}, +{kind: 1, offset: "outlineColor", len: 0, typ: NTI33554440, name: "outlineColor", sons: null}, +{kind: 1, offset: "outlineOffset", len: 0, typ: NTI33554440, name: "outlineOffset", sons: null}, +{kind: 1, offset: "outlineStyle", len: 0, typ: NTI33554440, name: "outlineStyle", sons: null}, +{kind: 1, offset: "outlineWidth", len: 0, typ: NTI33554440, name: "outlineWidth", sons: null}, +{kind: 1, offset: "overflow", len: 0, typ: NTI33554440, name: "overflow", sons: null}, +{kind: 1, offset: "overflowAnchor", len: 0, typ: NTI33554440, name: "overflowAnchor", sons: null}, +{kind: 1, offset: "overflowBlock", len: 0, typ: NTI33554440, name: "overflowBlock", sons: null}, +{kind: 1, offset: "overflowInline", len: 0, typ: NTI33554440, name: "overflowInline", sons: null}, +{kind: 1, offset: "overflowWrap", len: 0, typ: NTI33554440, name: "overflowWrap", sons: null}, +{kind: 1, offset: "overflowX", len: 0, typ: NTI33554440, name: "overflowX", sons: null}, +{kind: 1, offset: "overflowY", len: 0, typ: NTI33554440, name: "overflowY", sons: null}, +{kind: 1, offset: "overscrollBehavior", len: 0, typ: NTI33554440, name: "overscrollBehavior", sons: null}, +{kind: 1, offset: "overscrollBehaviorBlock", len: 0, typ: NTI33554440, name: "overscrollBehaviorBlock", sons: null}, +{kind: 1, offset: "overscrollBehaviorInline", len: 0, typ: NTI33554440, name: "overscrollBehaviorInline", sons: null}, +{kind: 1, offset: "overscrollBehaviorX", len: 0, typ: NTI33554440, name: "overscrollBehaviorX", sons: null}, +{kind: 1, offset: "overscrollBehaviorY", len: 0, typ: NTI33554440, name: "overscrollBehaviorY", sons: null}, +{kind: 1, offset: "padding", len: 0, typ: NTI33554440, name: "padding", sons: null}, +{kind: 1, offset: "paddingBlock", len: 0, typ: NTI33554440, name: "paddingBlock", sons: null}, +{kind: 1, offset: "paddingBlockEnd", len: 0, typ: NTI33554440, name: "paddingBlockEnd", sons: null}, +{kind: 1, offset: "paddingBlockStart", len: 0, typ: NTI33554440, name: "paddingBlockStart", sons: null}, +{kind: 1, offset: "paddingBottom", len: 0, typ: NTI33554440, name: "paddingBottom", sons: null}, +{kind: 1, offset: "paddingInline", len: 0, typ: NTI33554440, name: "paddingInline", sons: null}, +{kind: 1, offset: "paddingInlineEnd", len: 0, typ: NTI33554440, name: "paddingInlineEnd", sons: null}, +{kind: 1, offset: "paddingInlineStart", len: 0, typ: NTI33554440, name: "paddingInlineStart", sons: null}, +{kind: 1, offset: "paddingLeft", len: 0, typ: NTI33554440, name: "paddingLeft", sons: null}, +{kind: 1, offset: "paddingRight", len: 0, typ: NTI33554440, name: "paddingRight", sons: null}, +{kind: 1, offset: "paddingTop", len: 0, typ: NTI33554440, name: "paddingTop", sons: null}, +{kind: 1, offset: "pageBreakAfter", len: 0, typ: NTI33554440, name: "pageBreakAfter", sons: null}, +{kind: 1, offset: "pageBreakBefore", len: 0, typ: NTI33554440, name: "pageBreakBefore", sons: null}, +{kind: 1, offset: "pageBreakInside", len: 0, typ: NTI33554440, name: "pageBreakInside", sons: null}, +{kind: 1, offset: "paintOrder", len: 0, typ: NTI33554440, name: "paintOrder", sons: null}, +{kind: 1, offset: "perspective", len: 0, typ: NTI33554440, name: "perspective", sons: null}, +{kind: 1, offset: "perspectiveOrigin", len: 0, typ: NTI33554440, name: "perspectiveOrigin", sons: null}, +{kind: 1, offset: "placeContent", len: 0, typ: NTI33554440, name: "placeContent", sons: null}, +{kind: 1, offset: "placeItems", len: 0, typ: NTI33554440, name: "placeItems", sons: null}, +{kind: 1, offset: "placeSelf", len: 0, typ: NTI33554440, name: "placeSelf", sons: null}, +{kind: 1, offset: "pointerEvents", len: 0, typ: NTI33554440, name: "pointerEvents", sons: null}, +{kind: 1, offset: "position", len: 0, typ: NTI33554440, name: "position", sons: null}, +{kind: 1, offset: "quotes", len: 0, typ: NTI33554440, name: "quotes", sons: null}, +{kind: 1, offset: "resize", len: 0, typ: NTI33554440, name: "resize", sons: null}, +{kind: 1, offset: "right", len: 0, typ: NTI33554440, name: "right", sons: null}, +{kind: 1, offset: "rotate", len: 0, typ: NTI33554440, name: "rotate", sons: null}, +{kind: 1, offset: "rowGap", len: 0, typ: NTI33554440, name: "rowGap", sons: null}, +{kind: 1, offset: "scale", len: 0, typ: NTI33554440, name: "scale", sons: null}, +{kind: 1, offset: "scrollBehavior", len: 0, typ: NTI33554440, name: "scrollBehavior", sons: null}, +{kind: 1, offset: "scrollMargin", len: 0, typ: NTI33554440, name: "scrollMargin", sons: null}, +{kind: 1, offset: "scrollMarginBlock", len: 0, typ: NTI33554440, name: "scrollMarginBlock", sons: null}, +{kind: 1, offset: "scrollMarginBlockEnd", len: 0, typ: NTI33554440, name: "scrollMarginBlockEnd", sons: null}, +{kind: 1, offset: "scrollMarginBlockStart", len: 0, typ: NTI33554440, name: "scrollMarginBlockStart", sons: null}, +{kind: 1, offset: "scrollMarginBottom", len: 0, typ: NTI33554440, name: "scrollMarginBottom", sons: null}, +{kind: 1, offset: "scrollMarginInline", len: 0, typ: NTI33554440, name: "scrollMarginInline", sons: null}, +{kind: 1, offset: "scrollMarginInlineEnd", len: 0, typ: NTI33554440, name: "scrollMarginInlineEnd", sons: null}, +{kind: 1, offset: "scrollMarginInlineStart", len: 0, typ: NTI33554440, name: "scrollMarginInlineStart", sons: null}, +{kind: 1, offset: "scrollMarginLeft", len: 0, typ: NTI33554440, name: "scrollMarginLeft", sons: null}, +{kind: 1, offset: "scrollMarginRight", len: 0, typ: NTI33554440, name: "scrollMarginRight", sons: null}, +{kind: 1, offset: "scrollMarginTop", len: 0, typ: NTI33554440, name: "scrollMarginTop", sons: null}, +{kind: 1, offset: "scrollPadding", len: 0, typ: NTI33554440, name: "scrollPadding", sons: null}, +{kind: 1, offset: "scrollPaddingBlock", len: 0, typ: NTI33554440, name: "scrollPaddingBlock", sons: null}, +{kind: 1, offset: "scrollPaddingBlockEnd", len: 0, typ: NTI33554440, name: "scrollPaddingBlockEnd", sons: null}, +{kind: 1, offset: "scrollPaddingBlockStart", len: 0, typ: NTI33554440, name: "scrollPaddingBlockStart", sons: null}, +{kind: 1, offset: "scrollPaddingBottom", len: 0, typ: NTI33554440, name: "scrollPaddingBottom", sons: null}, +{kind: 1, offset: "scrollPaddingInline", len: 0, typ: NTI33554440, name: "scrollPaddingInline", sons: null}, +{kind: 1, offset: "scrollPaddingInlineEnd", len: 0, typ: NTI33554440, name: "scrollPaddingInlineEnd", sons: null}, +{kind: 1, offset: "scrollPaddingInlineStart", len: 0, typ: NTI33554440, name: "scrollPaddingInlineStart", sons: null}, +{kind: 1, offset: "scrollPaddingLeft", len: 0, typ: NTI33554440, name: "scrollPaddingLeft", sons: null}, +{kind: 1, offset: "scrollPaddingRight", len: 0, typ: NTI33554440, name: "scrollPaddingRight", sons: null}, +{kind: 1, offset: "scrollPaddingTop", len: 0, typ: NTI33554440, name: "scrollPaddingTop", sons: null}, +{kind: 1, offset: "scrollSnapAlign", len: 0, typ: NTI33554440, name: "scrollSnapAlign", sons: null}, +{kind: 1, offset: "scrollSnapStop", len: 0, typ: NTI33554440, name: "scrollSnapStop", sons: null}, +{kind: 1, offset: "scrollSnapType", len: 0, typ: NTI33554440, name: "scrollSnapType", sons: null}, +{kind: 1, offset: "scrollbar3dLightColor", len: 0, typ: NTI33554440, name: "scrollbar3dLightColor", sons: null}, +{kind: 1, offset: "scrollbarArrowColor", len: 0, typ: NTI33554440, name: "scrollbarArrowColor", sons: null}, +{kind: 1, offset: "scrollbarBaseColor", len: 0, typ: NTI33554440, name: "scrollbarBaseColor", sons: null}, +{kind: 1, offset: "scrollbarColor", len: 0, typ: NTI33554440, name: "scrollbarColor", sons: null}, +{kind: 1, offset: "scrollbarDarkshadowColor", len: 0, typ: NTI33554440, name: "scrollbarDarkshadowColor", sons: null}, +{kind: 1, offset: "scrollbarFaceColor", len: 0, typ: NTI33554440, name: "scrollbarFaceColor", sons: null}, +{kind: 1, offset: "scrollbarHighlightColor", len: 0, typ: NTI33554440, name: "scrollbarHighlightColor", sons: null}, +{kind: 1, offset: "scrollbarShadowColor", len: 0, typ: NTI33554440, name: "scrollbarShadowColor", sons: null}, +{kind: 1, offset: "scrollbarTrackColor", len: 0, typ: NTI33554440, name: "scrollbarTrackColor", sons: null}, +{kind: 1, offset: "scrollbarWidth", len: 0, typ: NTI33554440, name: "scrollbarWidth", sons: null}, +{kind: 1, offset: "shapeImageThreshold", len: 0, typ: NTI33554440, name: "shapeImageThreshold", sons: null}, +{kind: 1, offset: "shapeMargin", len: 0, typ: NTI33554440, name: "shapeMargin", sons: null}, +{kind: 1, offset: "shapeOutside", len: 0, typ: NTI33554440, name: "shapeOutside", sons: null}, +{kind: 1, offset: "tabSize", len: 0, typ: NTI33554440, name: "tabSize", sons: null}, +{kind: 1, offset: "tableLayout", len: 0, typ: NTI33554440, name: "tableLayout", sons: null}, +{kind: 1, offset: "textAlign", len: 0, typ: NTI33554440, name: "textAlign", sons: null}, +{kind: 1, offset: "textAlignLast", len: 0, typ: NTI33554440, name: "textAlignLast", sons: null}, +{kind: 1, offset: "textCombineUpright", len: 0, typ: NTI33554440, name: "textCombineUpright", sons: null}, +{kind: 1, offset: "textDecoration", len: 0, typ: NTI33554440, name: "textDecoration", sons: null}, +{kind: 1, offset: "textDecorationColor", len: 0, typ: NTI33554440, name: "textDecorationColor", sons: null}, +{kind: 1, offset: "textDecorationLine", len: 0, typ: NTI33554440, name: "textDecorationLine", sons: null}, +{kind: 1, offset: "textDecorationSkipInk", len: 0, typ: NTI33554440, name: "textDecorationSkipInk", sons: null}, +{kind: 1, offset: "textDecorationStyle", len: 0, typ: NTI33554440, name: "textDecorationStyle", sons: null}, +{kind: 1, offset: "textDecorationThickness", len: 0, typ: NTI33554440, name: "textDecorationThickness", sons: null}, +{kind: 1, offset: "textEmphasis", len: 0, typ: NTI33554440, name: "textEmphasis", sons: null}, +{kind: 1, offset: "textEmphasisColor", len: 0, typ: NTI33554440, name: "textEmphasisColor", sons: null}, +{kind: 1, offset: "textEmphasisPosition", len: 0, typ: NTI33554440, name: "textEmphasisPosition", sons: null}, +{kind: 1, offset: "textEmphasisStyle", len: 0, typ: NTI33554440, name: "textEmphasisStyle", sons: null}, +{kind: 1, offset: "textIndent", len: 0, typ: NTI33554440, name: "textIndent", sons: null}, +{kind: 1, offset: "textJustify", len: 0, typ: NTI33554440, name: "textJustify", sons: null}, +{kind: 1, offset: "textOrientation", len: 0, typ: NTI33554440, name: "textOrientation", sons: null}, +{kind: 1, offset: "textOverflow", len: 0, typ: NTI33554440, name: "textOverflow", sons: null}, +{kind: 1, offset: "textRendering", len: 0, typ: NTI33554440, name: "textRendering", sons: null}, +{kind: 1, offset: "textShadow", len: 0, typ: NTI33554440, name: "textShadow", sons: null}, +{kind: 1, offset: "textTransform", len: 0, typ: NTI33554440, name: "textTransform", sons: null}, +{kind: 1, offset: "textUnderlineOffset", len: 0, typ: NTI33554440, name: "textUnderlineOffset", sons: null}, +{kind: 1, offset: "textUnderlinePosition", len: 0, typ: NTI33554440, name: "textUnderlinePosition", sons: null}, +{kind: 1, offset: "top", len: 0, typ: NTI33554440, name: "top", sons: null}, +{kind: 1, offset: "touchAction", len: 0, typ: NTI33554440, name: "touchAction", sons: null}, +{kind: 1, offset: "transform", len: 0, typ: NTI33554440, name: "transform", sons: null}, +{kind: 1, offset: "transformBox", len: 0, typ: NTI33554440, name: "transformBox", sons: null}, +{kind: 1, offset: "transformOrigin", len: 0, typ: NTI33554440, name: "transformOrigin", sons: null}, +{kind: 1, offset: "transformStyle", len: 0, typ: NTI33554440, name: "transformStyle", sons: null}, +{kind: 1, offset: "transition", len: 0, typ: NTI33554440, name: "transition", sons: null}, +{kind: 1, offset: "transitionDelay", len: 0, typ: NTI33554440, name: "transitionDelay", sons: null}, +{kind: 1, offset: "transitionDuration", len: 0, typ: NTI33554440, name: "transitionDuration", sons: null}, +{kind: 1, offset: "transitionProperty", len: 0, typ: NTI33554440, name: "transitionProperty", sons: null}, +{kind: 1, offset: "transitionTimingFunction", len: 0, typ: NTI33554440, name: "transitionTimingFunction", sons: null}, +{kind: 1, offset: "translate", len: 0, typ: NTI33554440, name: "translate", sons: null}, +{kind: 1, offset: "unicodeBidi", len: 0, typ: NTI33554440, name: "unicodeBidi", sons: null}, +{kind: 1, offset: "verticalAlign", len: 0, typ: NTI33554440, name: "verticalAlign", sons: null}, +{kind: 1, offset: "visibility", len: 0, typ: NTI33554440, name: "visibility", sons: null}, +{kind: 1, offset: "whiteSpace", len: 0, typ: NTI33554440, name: "whiteSpace", sons: null}, +{kind: 1, offset: "widows", len: 0, typ: NTI33554440, name: "widows", sons: null}, +{kind: 1, offset: "width", len: 0, typ: NTI33554440, name: "width", sons: null}, +{kind: 1, offset: "willChange", len: 0, typ: NTI33554440, name: "willChange", sons: null}, +{kind: 1, offset: "wordBreak", len: 0, typ: NTI33554440, name: "wordBreak", sons: null}, +{kind: 1, offset: "wordSpacing", len: 0, typ: NTI33554440, name: "wordSpacing", sons: null}, +{kind: 1, offset: "writingMode", len: 0, typ: NTI33554440, name: "writingMode", sons: null}, +{kind: 1, offset: "zIndex", len: 0, typ: NTI33554440, name: "zIndex", sons: null}]}; +NTI637534349.node = NNI637534349; +NTI637534349.base = NTI33555083; +NTI637534238.base = NTI637534349; +var NNI637534321 = {kind: 2, len: 22, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "attributes", len: 0, typ: NTI637534322, name: "attributes", sons: null}, +{kind: 1, offset: "childNodes", len: 0, typ: NTI637534323, name: "childNodes", sons: null}, +{kind: 1, offset: "children", len: 0, typ: NTI637534324, name: "children", sons: null}, +{kind: 1, offset: "data", len: 0, typ: NTI33554440, name: "data", sons: null}, +{kind: 1, offset: "firstChild", len: 0, typ: NTI637534224, name: "firstChild", sons: null}, +{kind: 1, offset: "lastChild", len: 0, typ: NTI637534224, name: "lastChild", sons: null}, +{kind: 1, offset: "nextSibling", len: 0, typ: NTI637534224, name: "nextSibling", sons: null}, +{kind: 1, offset: "nodeName", len: 0, typ: NTI33554440, name: "nodeName", sons: null}, +{kind: 1, offset: "nodeType", len: 0, typ: NTI637534223, name: "nodeType", sons: null}, +{kind: 1, offset: "nodeValue", len: 0, typ: NTI33554440, name: "nodeValue", sons: null}, +{kind: 1, offset: "parentNode", len: 0, typ: NTI637534224, name: "parentNode", sons: null}, +{kind: 1, offset: "content", len: 0, typ: NTI637534224, name: "content", sons: null}, +{kind: 1, offset: "previousSibling", len: 0, typ: NTI637534224, name: "previousSibling", sons: null}, +{kind: 1, offset: "ownerDocument", len: 0, typ: NTI637534225, name: "ownerDocument", sons: null}, +{kind: 1, offset: "innerHTML", len: 0, typ: NTI33554440, name: "innerHTML", sons: null}, +{kind: 1, offset: "outerHTML", len: 0, typ: NTI33554440, name: "outerHTML", sons: null}, +{kind: 1, offset: "innerText", len: 0, typ: NTI33554440, name: "innerText", sons: null}, +{kind: 1, offset: "textContent", len: 0, typ: NTI33554440, name: "textContent", sons: null}, +{kind: 1, offset: "style", len: 0, typ: NTI637534238, name: "style", sons: null}, +{kind: 1, offset: "baseURI", len: 0, typ: NTI33554440, name: "baseURI", sons: null}, +{kind: 1, offset: "parentElement", len: 0, typ: NTI637534226, name: "parentElement", sons: null}, +{kind: 1, offset: "isConnected", len: 0, typ: NTI33554466, name: "isConnected", sons: null}]}; +NTI637534321.node = NNI637534321; +var NNI637534276 = {kind: 2, len: 24, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "onabort", len: 0, typ: NTI637534277, name: "onabort", sons: null}, +{kind: 1, offset: "onblur", len: 0, typ: NTI637534278, name: "onblur", sons: null}, +{kind: 1, offset: "onchange", len: 0, typ: NTI637534279, name: "onchange", sons: null}, +{kind: 1, offset: "onclick", len: 0, typ: NTI637534280, name: "onclick", sons: null}, +{kind: 1, offset: "ondblclick", len: 0, typ: NTI637534281, name: "ondblclick", sons: null}, +{kind: 1, offset: "onerror", len: 0, typ: NTI637534282, name: "onerror", sons: null}, +{kind: 1, offset: "onfocus", len: 0, typ: NTI637534283, name: "onfocus", sons: null}, +{kind: 1, offset: "onkeydown", len: 0, typ: NTI637534284, name: "onkeydown", sons: null}, +{kind: 1, offset: "onkeypress", len: 0, typ: NTI637534285, name: "onkeypress", sons: null}, +{kind: 1, offset: "onkeyup", len: 0, typ: NTI637534286, name: "onkeyup", sons: null}, +{kind: 1, offset: "onload", len: 0, typ: NTI637534287, name: "onload", sons: null}, +{kind: 1, offset: "onmousedown", len: 0, typ: NTI637534288, name: "onmousedown", sons: null}, +{kind: 1, offset: "onmousemove", len: 0, typ: NTI637534289, name: "onmousemove", sons: null}, +{kind: 1, offset: "onmouseout", len: 0, typ: NTI637534290, name: "onmouseout", sons: null}, +{kind: 1, offset: "onmouseover", len: 0, typ: NTI637534291, name: "onmouseover", sons: null}, +{kind: 1, offset: "onmouseup", len: 0, typ: NTI637534292, name: "onmouseup", sons: null}, +{kind: 1, offset: "onreset", len: 0, typ: NTI637534293, name: "onreset", sons: null}, +{kind: 1, offset: "onselect", len: 0, typ: NTI637534294, name: "onselect", sons: null}, +{kind: 1, offset: "onstorage", len: 0, typ: NTI637534295, name: "onstorage", sons: null}, +{kind: 1, offset: "onsubmit", len: 0, typ: NTI637534296, name: "onsubmit", sons: null}, +{kind: 1, offset: "onunload", len: 0, typ: NTI637534297, name: "onunload", sons: null}, +{kind: 1, offset: "onloadstart", len: 0, typ: NTI637534298, name: "onloadstart", sons: null}, +{kind: 1, offset: "onprogress", len: 0, typ: NTI637534299, name: "onprogress", sons: null}, +{kind: 1, offset: "onloadend", len: 0, typ: NTI637534300, name: "onloadend", sons: null}]}; +NTI637534276.node = NNI637534276; +NTI637534276.base = NTI33555083; +NTI637534321.base = NTI637534276; +NTI637534224.base = NTI637534321; +NTI637534652.base = NTI637534224; +NTI503317017.base = NTI33554440; +var NNI654311438 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554456, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI654311438.node = NNI654311438; + +function makeNimstrLit(c_33556801) { + var result = []; + for (var i = 0; i < c_33556801.length; ++i) { + result[i] = c_33556801.charCodeAt(i); + } + return result; + + + +} + +function toJSStr(s_33556807) { + var Temporary5; + + var result_33556808 = null; + + var res_33556842 = newSeq_33556825((s_33556807).length); + var i_33556843 = 0; + var j_33556844 = 0; + Label1: do { + Label2: while (true) { + if (!(i_33556843 < (s_33556807).length)) break Label2; + var c_33556845 = s_33556807[i_33556843]; + if ((c_33556845 < 128)) { + res_33556842[j_33556844] = String.fromCharCode(c_33556845); + i_33556843 += 1; + } + else { + var helper_33556857 = newSeq_33556825(0); + Label3: do { + Label4: while (true) { + if (!true) break Label4; + var code_33556858 = c_33556845.toString(16); + if ((((code_33556858) == null ? 0 : (code_33556858).length) == 1)) { + helper_33556857.push("%0");; + } + else { + helper_33556857.push("%");; + } + + helper_33556857.push(code_33556858);; + i_33556843 += 1; + if (((s_33556807).length <= i_33556843)) Temporary5 = true; else { Temporary5 = (s_33556807[i_33556843] < 128); } if (Temporary5) { + break Label3; + } + + c_33556845 = s_33556807[i_33556843]; + } + } while (false); +++excHandler; + try { + res_33556842[j_33556844] = decodeURIComponent(helper_33556857.join("")); +--excHandler; +} catch (EXCEPTION) { + var prevJSError = lastJSError; + lastJSError = EXCEPTION; + --excHandler; + res_33556842[j_33556844] = helper_33556857.join(""); + lastJSError = prevJSError; + } finally { + } + } + + j_33556844 += 1; + } + } while (false); + if (res_33556842.length < j_33556844) { for (var i = res_33556842.length ; i < j_33556844 ; ++i) res_33556842.push(null); } + else { res_33556842.length = j_33556844; }; + result_33556808 = res_33556842.join(""); + + return result_33556808; + +} + +function raiseException(e_33556667, ename_33556668) { + e_33556667.name = ename_33556668; + if ((excHandler == 0)) { + unhandledException(e_33556667); + } + + throw e_33556667; + + +} + +function addInt(a_33556940, b_33556941) { + var result = a_33556940 + b_33556941; + checkOverflowInt(result); + return result; + + + +} + +function mnewString(len_33556893) { + return new Array(len_33556893); + + + +} + +function chckRange(i_33557189, a_33557190, b_33557191) { + var Temporary1; + + var result_33557192 = 0; + + BeforeRet: do { + if (!(a_33557190 <= i_33557189)) Temporary1 = false; else { Temporary1 = (i_33557189 <= b_33557191); } if (Temporary1) { + result_33557192 = i_33557189; + break BeforeRet; + } + else { + raiseRangeError(); + } + + } while (false); + + return result_33557192; + +} + +function setConstr() { + var result = {}; + for (var i = 0; i < arguments.length; ++i) { + var x = arguments[i]; + if (typeof(x) == "object") { + for (var j = x[0]; j <= x[1]; ++j) { + result[j] = true; + } + } else { + result[x] = true; + } + } + return result; + + + +} +var ConstSet1 = setConstr(17, 16, 4, 18, 27, 19, 23, 22, 21); + +function nimCopy(dest_33557140, src_33557141, ti_33557142) { + var result_33557151 = null; + + switch (ti_33557142.kind) { + case 21: + case 22: + case 23: + case 5: + if (!(isFatPointer_33557131(ti_33557142))) { + result_33557151 = src_33557141; + } + else { + result_33557151 = [src_33557141[0], src_33557141[1]]; + } + + break; + case 19: + if (dest_33557140 === null || dest_33557140 === undefined) { + dest_33557140 = {}; + } + else { + for (var key in dest_33557140) { delete dest_33557140[key]; } + } + for (var key in src_33557141) { dest_33557140[key] = src_33557141[key]; } + result_33557151 = dest_33557140; + + break; + case 18: + case 17: + if (!((ti_33557142.base == null))) { + result_33557151 = nimCopy(dest_33557140, src_33557141, ti_33557142.base); + } + else { + if ((ti_33557142.kind == 17)) { + result_33557151 = (dest_33557140 === null || dest_33557140 === undefined) ? {m_type: ti_33557142} : dest_33557140; + } + else { + result_33557151 = (dest_33557140 === null || dest_33557140 === undefined) ? {} : dest_33557140; + } + } + nimCopyAux(result_33557151, src_33557141, ti_33557142.node); + break; + case 24: + case 4: + case 27: + case 16: + if (src_33557141 === null) { + result_33557151 = null; + } + else { + if (dest_33557140 === null || dest_33557140 === undefined || dest_33557140.length != src_33557141.length) { + dest_33557140 = new Array(src_33557141.length); + } + result_33557151 = dest_33557140; + for (var i = 0; i < src_33557141.length; ++i) { + result_33557151[i] = nimCopy(result_33557151[i], src_33557141[i], ti_33557142.base); + } + } + + break; + case 28: + if (src_33557141 !== null) { + result_33557151 = src_33557141.slice(0); + } + + break; + default: + result_33557151 = src_33557141; + break; + } + + return result_33557151; + +} + +function chckIndx(i_33557184, a_33557185, b_33557186) { + var Temporary1; + + var result_33557187 = 0; + + BeforeRet: do { + if (!(a_33557185 <= i_33557184)) Temporary1 = false; else { Temporary1 = (i_33557184 <= b_33557186); } if (Temporary1) { + result_33557187 = i_33557184; + break BeforeRet; + } + else { + raiseIndexError(i_33557184, a_33557185, b_33557186); + } + + } while (false); + + return result_33557187; + +} + +function subInt(a_33556944, b_33556945) { + var result = a_33556944 - b_33556945; + checkOverflowInt(result); + return result; + + + +} +var ConstSet2 = setConstr([65, 90]); +var ConstSet3 = setConstr(95, 32, 46); +var ConstSet4 = setConstr(95, 32, 46); + +function mulInt(a_33556948, b_33556949) { + var result = a_33556948 * b_33556949; + checkOverflowInt(result); + return result; + + + +} +var ConstSet5 = setConstr([97, 122]); +var ConstSet6 = setConstr([65, 90], [97, 122]); +var ConstSet7 = setConstr([97, 122]); +var ConstSet8 = setConstr([65, 90]); +var ConstSet9 = setConstr([65, 90], [97, 122]); + +function nimMax(a_33556998, b_33556999) { + var Temporary1; + + var result_33557000 = 0; + + BeforeRet: do { + if ((b_33556999 <= a_33556998)) { + Temporary1 = a_33556998; + } + else { + Temporary1 = b_33556999; + } + + result_33557000 = Temporary1; + break BeforeRet; + } while (false); + + return result_33557000; + +} + +function nimMin(a_33556994, b_33556995) { + var Temporary1; + + var result_33556996 = 0; + + BeforeRet: do { + if ((a_33556994 <= b_33556995)) { + Temporary1 = a_33556994; + } + else { + Temporary1 = b_33556995; + } + + result_33556996 = Temporary1; + break BeforeRet; + } while (false); + + return result_33556996; + +} + +function addChar(x_33557255, c_33557256) { + x_33557255.push(c_33557256); + + +} +if (!Math.trunc) { + Math.trunc = function(v) { + v = +v; + if (!isFinite(v)) return v; + return (v - v % 1) || (v < 0 ? -0 : v === 0 ? v : 0); + }; +} + +var alternative_503317074 = [null]; + +function add_33556419(x_33556420, x_33556420_Idx, y_33556421) { + if (x_33556420[x_33556420_Idx] === null) { x_33556420[x_33556420_Idx] = []; } + var off = x_33556420[x_33556420_Idx].length; + x_33556420[x_33556420_Idx].length += y_33556421.length; + for (var i = 0; i < y_33556421.length; ++i) { + x_33556420[x_33556420_Idx][off+i] = y_33556421.charCodeAt(i); + } + + + +} + +function newSeq_33556825(len_33556827) { + var result_33556828 = []; + + result_33556828 = new Array(len_33556827); for (var i = 0 ; i < len_33556827 ; ++i) { result_33556828[i] = null; } + return result_33556828; + +} + +function unhandledException(e_33556663) { + var buf_33556664 = [[]]; + if (!(((e_33556663.message).length == 0))) { + buf_33556664[0].push.apply(buf_33556664[0], makeNimstrLit("Error: unhandled exception: "));; + buf_33556664[0].push.apply(buf_33556664[0], e_33556663.message);; + } + else { + buf_33556664[0].push.apply(buf_33556664[0], makeNimstrLit("Error: unhandled exception"));; + } + + buf_33556664[0].push.apply(buf_33556664[0], makeNimstrLit(" ["));; + add_33556419(buf_33556664, 0, e_33556663.name); + buf_33556664[0].push.apply(buf_33556664[0], makeNimstrLit("]\x0A"));; + var cbuf_33556665 = toJSStr(buf_33556664[0]); + if (typeof(Error) !== "undefined") { + throw new Error(cbuf_33556665); + } + else { + throw cbuf_33556665; + } + + + +} + +function raiseOverflow() { + raiseException({message: makeNimstrLit("over- or underflow"), parent: null, m_type: NTI33555122, name: null, trace: [], up: null}, "OverflowDefect"); + + +} + +function checkOverflowInt(a_33556938) { + if (a_33556938 > 2147483647 || a_33556938 < -2147483648) raiseOverflow(); + + + +} + +function isWhitespace_503316788(text_503316789) { + return !/[^\s]/.test(text_503316789); + + + +} + +function isWhitespace_503316791(x_503316792) { + var Temporary1; + var Temporary2; + + var result_503316793 = false; + + if (!(x_503316792.nodeName == "#text")) Temporary2 = false; else { Temporary2 = isWhitespace_503316788(x_503316792.textContent); } if (Temporary2) Temporary1 = true; else { Temporary1 = (x_503316792.nodeName == "#comment"); } result_503316793 = Temporary1; + + return result_503316793; + +} + +function raiseRangeError() { + raiseException({message: makeNimstrLit("value out of range"), parent: null, m_type: NTI33555130, name: null, trace: [], up: null}, "RangeDefect"); + + +} + +function addChars_251658415(result_251658417, result_251658417_Idx, x_251658418, start_251658419, n_251658420) { + var old_251658421 = (result_251658417[result_251658417_Idx]).length; + (result_251658417[result_251658417_Idx].length = chckRange(addInt(old_251658421, n_251658420), 0, 2147483647)); + Label1: do { + var iHEX60gensym4_251658435 = 0; + var i_503317133 = 0; + Label2: do { + Label3: while (true) { + if (!(i_503317133 < n_251658420)) break Label3; + iHEX60gensym4_251658435 = i_503317133; + result_251658417[result_251658417_Idx][chckIndx(addInt(old_251658421, iHEX60gensym4_251658435), 0, (result_251658417[result_251658417_Idx]).length - 1)] = x_251658418.charCodeAt(chckIndx(addInt(start_251658419, iHEX60gensym4_251658435), 0, (x_251658418).length - 1)); + i_503317133 = addInt(i_503317133, 1); + } + } while (false); + } while (false); + + +} + +function addChars_251658411(result_251658413, result_251658413_Idx, x_251658414) { + addChars_251658415(result_251658413, result_251658413_Idx, x_251658414, 0, ((x_251658414) == null ? 0 : (x_251658414).length)); + + +} + +function addInt_251658436(result_251658437, result_251658437_Idx, x_251658438) { + addChars_251658411(result_251658437, result_251658437_Idx, ((x_251658438) + "")); + + +} + +function addInt_251658457(result_251658458, result_251658458_Idx, x_251658459) { + addInt_251658436(result_251658458, result_251658458_Idx, x_251658459); + + +} + +function HEX24_352321539(x_352321540) { + var result_352321541 = [[]]; + + addInt_251658457(result_352321541, 0, x_352321540); + + return result_352321541[0]; + +} + +function isFatPointer_33557131(ti_33557132) { + var result_33557133 = false; + + BeforeRet: do { + result_33557133 = !((ConstSet1[ti_33557132.base.kind] != undefined)); + break BeforeRet; + } while (false); + + return result_33557133; + +} + +function nimCopyAux(dest_33557144, src_33557145, n_33557146) { + switch (n_33557146.kind) { + case 0: + break; + case 1: + dest_33557144[n_33557146.offset] = nimCopy(dest_33557144[n_33557146.offset], src_33557145[n_33557146.offset], n_33557146.typ); + + break; + case 2: + for (var i = 0; i < n_33557146.sons.length; i++) { + nimCopyAux(dest_33557144, src_33557145, n_33557146.sons[i]); + } + + break; + case 3: + dest_33557144[n_33557146.offset] = nimCopy(dest_33557144[n_33557146.offset], src_33557145[n_33557146.offset], n_33557146.typ); + for (var i = 0; i < n_33557146.sons.length; ++i) { + nimCopyAux(dest_33557144, src_33557145, n_33557146.sons[i][1]); + } + + break; + } + + +} + +function raiseIndexError(i_33556754, a_33556755, b_33556756) { + var Temporary1; + + if ((b_33556756 < a_33556755)) { + Temporary1 = makeNimstrLit("index out of bounds, the container is empty"); + } + else { + Temporary1 = (makeNimstrLit("index ") || []).concat(HEX24_352321539(i_33556754) || [],makeNimstrLit(" not in ") || [],HEX24_352321539(a_33556755) || [],makeNimstrLit(" .. ") || [],HEX24_352321539(b_33556756) || []); + } + + raiseException({message: nimCopy(null, Temporary1, NTI33554439), parent: null, m_type: NTI33555128, name: null, trace: [], up: null}, "IndexDefect"); + + +} + +function toToc_503316794(x_503316795, father_503316796) { + var Temporary5; + var Temporary6; + var Temporary7; + var Temporary8; + var Temporary15; + + if ((x_503316795.nodeName == "UL")) { + var f_503316804 = {heading: null, kids: [], sortId: (father_503316796.kids).length, doSort: false}; + var i_503316805 = 0; + Label1: do { + Label2: while (true) { + if (!(i_503316805 < x_503316795.childNodes.length)) break Label2; + var nxt_503316806 = addInt(i_503316805, 1); + Label3: do { + Label4: while (true) { + if (!(nxt_503316806 < x_503316795.childNodes.length)) Temporary5 = false; else { Temporary5 = isWhitespace_503316791(x_503316795.childNodes[nxt_503316806]); } if (!Temporary5) break Label4; + nxt_503316806 = addInt(nxt_503316806, 1); + } + } while (false); + if (!(nxt_503316806 < x_503316795.childNodes.length)) Temporary8 = false; else { Temporary8 = (x_503316795.childNodes[i_503316805].nodeName == "LI"); } if (!Temporary8) Temporary7 = false; else { Temporary7 = (x_503316795.childNodes[i_503316805].childNodes.length == 1); } if (!Temporary7) Temporary6 = false; else { Temporary6 = (x_503316795.childNodes[nxt_503316806].nodeName == "UL"); } if (Temporary6) { + var e_503316818 = {heading: x_503316795.childNodes[i_503316805].childNodes[0], kids: [], sortId: (f_503316804.kids).length, doSort: false}; + var it_503316819 = x_503316795.childNodes[nxt_503316806]; + Label9: do { + var j_503316824 = 0; + var colontmp__503317112 = 0; + colontmp__503317112 = it_503316819.childNodes.length; + var i_503317113 = 0; + Label10: do { + Label11: while (true) { + if (!(i_503317113 < colontmp__503317112)) break Label11; + j_503316824 = i_503317113; + toToc_503316794(it_503316819.childNodes[j_503316824], e_503316818); + i_503317113 = addInt(i_503317113, 1); + } + } while (false); + } while (false); + f_503316804.kids.push(e_503316818);; + i_503316805 = addInt(nxt_503316806, 1); + } + else { + toToc_503316794(x_503316795.childNodes[i_503316805], f_503316804); + i_503316805 = addInt(i_503316805, 1); + } + + } + } while (false); + father_503316796.kids.push(f_503316804);; + } + else { + if (isWhitespace_503316791(x_503316795)) { + } + else { + if ((x_503316795.nodeName == "LI")) { + var idx_503316841 = []; + Label12: do { + var i_503316846 = 0; + var colontmp__503317116 = 0; + colontmp__503317116 = x_503316795.childNodes.length; + var i_503317117 = 0; + Label13: do { + Label14: while (true) { + if (!(i_503317117 < colontmp__503317116)) break Label14; + i_503316846 = i_503317117; + if (!(isWhitespace_503316791(x_503316795.childNodes[i_503316846]))) { + idx_503316841.push(i_503316846);; + } + + i_503317117 = addInt(i_503317117, 1); + } + } while (false); + } while (false); + if (!((idx_503316841).length == 2)) Temporary15 = false; else { Temporary15 = (x_503316795.childNodes[idx_503316841[chckIndx(1, 0, (idx_503316841).length - 1)]].nodeName == "UL"); } if (Temporary15) { + var e_503316862 = {heading: x_503316795.childNodes[idx_503316841[chckIndx(0, 0, (idx_503316841).length - 1)]], kids: [], sortId: (father_503316796.kids).length, doSort: false}; + var it_503316863 = x_503316795.childNodes[idx_503316841[chckIndx(1, 0, (idx_503316841).length - 1)]]; + Label16: do { + var j_503316868 = 0; + var colontmp__503317120 = 0; + colontmp__503317120 = it_503316863.childNodes.length; + var i_503317121 = 0; + Label17: do { + Label18: while (true) { + if (!(i_503317121 < colontmp__503317120)) break Label18; + j_503316868 = i_503317121; + toToc_503316794(it_503316863.childNodes[j_503316868], e_503316862); + i_503317121 = addInt(i_503317121, 1); + } + } while (false); + } while (false); + father_503316796.kids.push(e_503316862);; + } + else { + Label19: do { + var i_503316877 = 0; + var colontmp__503317124 = 0; + colontmp__503317124 = x_503316795.childNodes.length; + var i_503317125 = 0; + Label20: do { + Label21: while (true) { + if (!(i_503317125 < colontmp__503317124)) break Label21; + i_503316877 = i_503317125; + toToc_503316794(x_503316795.childNodes[i_503316877], father_503316796); + i_503317125 = addInt(i_503317125, 1); + } + } while (false); + } while (false); + } + + } + else { + father_503316796.kids.push({heading: x_503316795, kids: [], sortId: (father_503316796.kids).length, doSort: false});; + } + }} + + +} + +function extractItems_503316614(x_503316615, heading_503316616, items_503316617, items_503316617_Idx) { + var Temporary1; + + BeforeRet: do { + if ((x_503316615 == null)) { + break BeforeRet; + } + + if (!!((x_503316615.heading == null))) Temporary1 = false; else { Temporary1 = (x_503316615.heading.textContent == heading_503316616); } if (Temporary1) { + Label2: do { + var i_503316634 = 0; + var colontmp__503317136 = 0; + colontmp__503317136 = (x_503316615.kids).length; + var i_503317137 = 0; + Label3: do { + Label4: while (true) { + if (!(i_503317137 < colontmp__503317136)) break Label4; + i_503316634 = i_503317137; + items_503316617[items_503316617_Idx].push(x_503316615.kids[chckIndx(i_503316634, 0, (x_503316615.kids).length - 1)].heading);; + i_503317137 = addInt(i_503317137, 1); + } + } while (false); + } while (false); + } + else { + Label5: do { + var i_503316646 = 0; + var colontmp__503317140 = 0; + colontmp__503317140 = (x_503316615.kids).length; + var i_503317141 = 0; + Label6: do { + Label7: while (true) { + if (!(i_503317141 < colontmp__503317140)) break Label7; + i_503316646 = i_503317141; + var it_503316647 = x_503316615.kids[chckIndx(i_503316646, 0, (x_503316615.kids).length - 1)]; + extractItems_503316614(it_503316647, heading_503316616, items_503316617, items_503316617_Idx); + i_503317141 = addInt(i_503317141, 1); + } + } while (false); + } while (false); + } + + } while (false); + + +} + +function tree_503316487(tag_503316488, kids_503316489) { + var result_503316490 = null; + + result_503316490 = document.createElement(toJSStr(tag_503316488)); + Label1: do { + var k_503316503 = null; + var i_503317154 = 0; + Label2: do { + Label3: while (true) { + if (!(i_503317154 < (kids_503316489).length)) break Label3; + k_503316503 = kids_503316489[chckIndx(i_503317154, 0, (kids_503316489).length - 1)]; + result_503316490.appendChild(k_503316503); + i_503317154 = addInt(i_503317154, 1); + } + } while (false); + } while (false); + + return result_503316490; + +} + +function text_503316541(s_503316542) { + var result_503316543 = null; + + result_503316543 = document.createTextNode(s_503316542); + + return result_503316543; + +} + +function sysFatal_218103842(message_218103845) { + raiseException({message: nimCopy(null, message_218103845, NTI33554439), m_type: NTI33555124, parent: null, name: null, trace: [], up: null}, "AssertionDefect"); + + +} + +function raiseAssert_218103840(msg_218103841) { + sysFatal_218103842(msg_218103841); + + +} + +function failedAssertImpl_218103864(msg_218103865) { + raiseAssert_218103840(msg_218103865); + + +} + +function uncovered_503316943(x_503316944) { + var Temporary1; + var Temporary2; + + var result_503316945 = null; + + BeforeRet: do { + if (!((x_503316944.kids).length == 0)) Temporary1 = false; else { Temporary1 = !((x_503316944.heading == null)); } if (Temporary1) { + if (!(x_503316944.heading.hasOwnProperty('__karaxMarker__'))) { + Temporary2 = x_503316944; + } + else { + Temporary2 = null; + } + + result_503316945 = Temporary2; + break BeforeRet; + } + + result_503316945 = {heading: x_503316944.heading, kids: [], sortId: x_503316944.sortId, doSort: x_503316944.doSort}; + Label3: do { + var i_503316964 = 0; + var colontmp__503317161 = 0; + colontmp__503317161 = (x_503316944.kids).length; + var i_503317162 = 0; + Label4: do { + Label5: while (true) { + if (!(i_503317162 < colontmp__503317161)) break Label5; + i_503316964 = i_503317162; + var y_503316965 = uncovered_503316943(x_503316944.kids[chckIndx(i_503316964, 0, (x_503316944.kids).length - 1)]); + if (!((y_503316965 == null))) { + result_503316945.kids.push(y_503316965);; + } + + i_503317162 = addInt(i_503317162, 1); + } + } while (false); + } while (false); + if (((result_503316945.kids).length == 0)) { + result_503316945 = null; + } + + } while (false); + + return result_503316945; + +} + +function mergeTocs_503316977(orig_503316978, news_503316979) { + var result_503316980 = null; + + result_503316980 = uncovered_503316943(orig_503316978); + if ((result_503316980 == null)) { + result_503316980 = news_503316979; + } + else { + Label1: do { + var i_503316992 = 0; + var colontmp__503317157 = 0; + colontmp__503317157 = (news_503316979.kids).length; + var i_503317158 = 0; + Label2: do { + Label3: while (true) { + if (!(i_503317158 < colontmp__503317157)) break Label3; + i_503316992 = i_503317158; + result_503316980.kids.push(news_503316979.kids[chckIndx(i_503316992, 0, (news_503316979.kids).length - 1)]);; + i_503317158 = addInt(i_503317158, 1); + } + } while (false); + } while (false); + } + + + return result_503316980; + +} + +function buildToc_503316997(orig_503316998, types_503316999, procs_503317000) { + var Temporary7; + + var result_503317001 = null; + + var newStuff_503317006 = {heading: null, kids: [], doSort: true, sortId: 0}; + Label1: do { + var t_503317028 = null; + var i_503317149 = 0; + var L_503317150 = (types_503316999).length; + Label2: do { + Label3: while (true) { + if (!(i_503317149 < L_503317150)) break Label3; + t_503317028 = types_503316999[chckIndx(i_503317149, 0, (types_503316999).length - 1)]; + var c_503317033 = {heading: t_503317028.cloneNode(true), kids: [], doSort: true, sortId: 0}; + t_503317028.__karaxMarker__ = true; + Label4: do { + var p_503317037 = null; + var i_503317146 = 0; + var L_503317147 = (procs_503317000).length; + Label5: do { + Label6: while (true) { + if (!(i_503317146 < L_503317147)) break Label6; + p_503317037 = procs_503317000[chckIndx(i_503317146, 0, (procs_503317000).length - 1)]; + if (!(p_503317037.hasOwnProperty('__karaxMarker__'))) { + var xx_503317038 = p_503317037.parentNode.getElementsByClassName("attachedType"); + if (!((xx_503317038).length == 1)) Temporary7 = false; else { Temporary7 = (xx_503317038[chckIndx(0, 0, (xx_503317038).length - 1)].textContent == t_503317028.textContent); } if (Temporary7) { + var q_503317043 = tree_503316487(makeNimstrLit("A"), [text_503316541(p_503317037.title)]); + q_503317043.setAttribute("href", p_503317037.getAttribute("href")); + c_503317033.kids.push({heading: q_503317043, kids: [], sortId: 0, doSort: false});; + p_503317037.__karaxMarker__ = true; + } + + } + + i_503317146 = addInt(i_503317146, 1); + if (!(((procs_503317000).length == L_503317147))) { + failedAssertImpl_218103864(makeNimstrLit("iterators.nim(240, 11) `len(a) == L` the length of the seq changed while iterating over it")); + } + + } + } while (false); + } while (false); + newStuff_503317006.kids.push(c_503317033);; + i_503317149 = addInt(i_503317149, 1); + if (!(((types_503316999).length == L_503317150))) { + failedAssertImpl_218103864(makeNimstrLit("iterators.nim(240, 11) `len(a) == L` the length of the seq changed while iterating over it")); + } + + } + } while (false); + } while (false); + result_503317001 = mergeTocs_503316977(orig_503316998, newStuff_503317006); + + return result_503317001; + +} + +function add_503316531(parent_503316532, kid_503316533) { + var Temporary1; + var Temporary2; + + if (!(parent_503316532.nodeName == "TR")) Temporary1 = false; else { if ((kid_503316533.nodeName == "TD")) Temporary2 = true; else { Temporary2 = (kid_503316533.nodeName == "TH"); } Temporary1 = Temporary2; } if (Temporary1) { + var k_503316534 = document.createElement("TD"); + k_503316534.appendChild(kid_503316533); + parent_503316532.appendChild(k_503316534); + } + else { + parent_503316532.appendChild(kid_503316533); + } + + + +} + +function setClass_503316535(e_503316536, value_503316537) { + e_503316536.setAttribute("class", toJSStr(value_503316537)); + + +} + +function toHtml_503316657(x_503316658, isRoot_503316659) { + var Temporary1; + +function HEX3Aanonymous_503316677(a_503316678, b_503316679) { + var Temporary1; + + var result_503316680 = 0; + + BeforeRet: do { + if (!!((a_503316678.heading == null))) Temporary1 = false; else { Temporary1 = !((b_503316679.heading == null)); } if (Temporary1) { + var x_503316689 = a_503316678.heading.textContent; + var y_503316690 = b_503316679.heading.textContent; + if ((x_503316689 < y_503316690)) { + result_503316680 = -1; + break BeforeRet; + } + + if ((y_503316690 < x_503316689)) { + result_503316680 = 1; + break BeforeRet; + } + + result_503316680 = 0; + break BeforeRet; + } + else { + result_503316680 = subInt(a_503316678.sortId, b_503316679.sortId); + break BeforeRet; + } + + } while (false); + + return result_503316680; + + } + + var result_503316660 = null; + + BeforeRet: do { + if ((x_503316658 == null)) { + result_503316660 = null; + break BeforeRet; + } + + if (((x_503316658.kids).length == 0)) { + if ((x_503316658.heading == null)) { + result_503316660 = null; + break BeforeRet; + } + + result_503316660 = x_503316658.heading.cloneNode(true); + break BeforeRet; + } + + result_503316660 = tree_503316487(makeNimstrLit("DIV"), []); + if (!!((x_503316658.heading == null))) Temporary1 = false; else { Temporary1 = !(x_503316658.heading.hasOwnProperty('__karaxMarker__')); } if (Temporary1) { + add_503316531(result_503316660, x_503316658.heading.cloneNode(true)); + } + + var ul_503316676 = tree_503316487(makeNimstrLit("UL"), []); + if (isRoot_503316659) { + setClass_503316535(ul_503316676, makeNimstrLit("simple simple-toc")); + } + else { + setClass_503316535(ul_503316676, makeNimstrLit("simple")); + } + + if (x_503316658.doSort) { + x_503316658.kids.sort(HEX3Aanonymous_503316677); + } + + Label2: do { + var k_503316719 = null; + var i_503317166 = 0; + var L_503317167 = (x_503316658.kids).length; + Label3: do { + Label4: while (true) { + if (!(i_503317166 < L_503317167)) break Label4; + k_503316719 = x_503316658.kids[chckIndx(i_503317166, 0, (x_503316658.kids).length - 1)]; + var y_503316720 = toHtml_503316657(k_503316719, false); + if (!((y_503316720 == null))) { + add_503316531(ul_503316676, tree_503316487(makeNimstrLit("LI"), [y_503316720])); + } + + i_503317166 = addInt(i_503317166, 1); + if (!(((x_503316658.kids).length == L_503317167))) { + failedAssertImpl_218103864(makeNimstrLit("iterators.nim(240, 11) `len(a) == L` the length of the seq changed while iterating over it")); + } + + } + } while (false); + } while (false); + if (!((ul_503316676.childNodes.length == 0))) { + add_503316531(result_503316660, ul_503316676); + } + + if ((result_503316660.childNodes.length == 0)) { + result_503316660 = null; + } + + } while (false); + + return result_503316660; + +} + +function replaceById_503316546(id_503316547, newTree_503316548) { + var x_503316549 = document.getElementById(id_503316547); + x_503316549.parentNode.replaceChild(newTree_503316548, x_503316549); + newTree_503316548.id = id_503316547; + + +} + +function togglevis_503317075(d_503317076) { + if (d_503317076.style.display == 'none') + d_503317076.style.display = 'inline'; + else + d_503317076.style.display = 'none'; + + + +} + +function groupBy(value_503317078) { + var toc_503317079 = document.getElementById("toc-list"); + if ((alternative_503317074[0] == null)) { + var tt_503317087 = {heading: null, kids: [], sortId: 0, doSort: false}; + toToc_503316794(toc_503317079, tt_503317087); + tt_503317087 = tt_503317087.kids[chckIndx(0, 0, (tt_503317087.kids).length - 1)]; + var types_503317092 = [[]]; + var procs_503317097 = [[]]; + extractItems_503316614(tt_503317087, "Types", types_503317092, 0); + extractItems_503316614(tt_503317087, "Procs", procs_503317097, 0); + extractItems_503316614(tt_503317087, "Converters", procs_503317097, 0); + extractItems_503316614(tt_503317087, "Methods", procs_503317097, 0); + extractItems_503316614(tt_503317087, "Templates", procs_503317097, 0); + extractItems_503316614(tt_503317087, "Macros", procs_503317097, 0); + extractItems_503316614(tt_503317087, "Iterators", procs_503317097, 0); + var ntoc_503317098 = buildToc_503316997(tt_503317087, types_503317092[0], procs_503317097[0]); + var x_503317099 = toHtml_503316657(ntoc_503317098, true); + alternative_503317074[0] = tree_503316487(makeNimstrLit("DIV"), [x_503317099]); + } + + if ((value_503317078 == "type")) { + replaceById_503316546("tocRoot", alternative_503317074[0]); + } + else { + replaceById_503316546("tocRoot", tree_503316487(makeNimstrLit("DIV"), [])); + } + + togglevis_503317075(document.getElementById("toc-list")); + + +} +var db_503317169 = [[]]; +var contents_503317170 = [[]]; +var oldtoc_503317335 = [null]; +var timer_503317336 = [null]; + +function nsuToLowerAsciiChar(c_671088708) { + var result_671088709 = 0; + + if ((ConstSet2[c_671088708] != undefined)) { + result_671088709 = (c_671088708 ^ 32); + } + else { + result_671088709 = c_671088708; + } + + + return result_671088709; + +} + +function fuzzyMatch_654311440(pattern_654311441, str_654311442) { + var Temporary4; + var Temporary5; + var Temporary6; + var Temporary7; + var Temporary8; + + var result_654311445 = {Field0: 0, Field1: false}; + + var scoreState_654311446 = -100; + var headerMatched_654311447 = false; + var unmatchedLeadingCharCount_654311448 = 0; + var consecutiveMatchCount_654311449 = 0; + var strIndex_654311450 = 0; + var patIndex_654311451 = 0; + var score_654311452 = 0; + Label1: do { + Label2: while (true) { + if (!((strIndex_654311450 < ((str_654311442) == null ? 0 : (str_654311442).length)) && (patIndex_654311451 < ((pattern_654311441) == null ? 0 : (pattern_654311441).length)))) break Label2; + Label3: do { + var patternChar_654311455 = nsuToLowerAsciiChar(pattern_654311441.charCodeAt(chckIndx(patIndex_654311451, 0, (pattern_654311441).length - 1))); + var strChar_654311456 = nsuToLowerAsciiChar(str_654311442.charCodeAt(chckIndx(strIndex_654311450, 0, (str_654311442).length - 1))); + if ((ConstSet3[patternChar_654311455] != undefined)) { + patIndex_654311451 = addInt(patIndex_654311451, 1); + break Label3; + } + + if ((ConstSet4[strChar_654311456] != undefined)) { + strIndex_654311450 = addInt(strIndex_654311450, 1); + break Label3; + } + + if ((!(headerMatched_654311447) && (strChar_654311456 == 58))) { + headerMatched_654311447 = true; + scoreState_654311446 = -100; + score_654311452 = ((Math.floor((0.5 * score_654311452))) | 0); + patIndex_654311451 = 0; + strIndex_654311450 = addInt(strIndex_654311450, 1); + break Label3; + } + + if ((strChar_654311456 == patternChar_654311455)) { + switch (scoreState_654311446) { + case -100: + case 20: + scoreState_654311446 = 10; + break; + case 0: + scoreState_654311446 = 5; + score_654311452 = addInt(score_654311452, scoreState_654311446); + break; + case 10: + case 5: + consecutiveMatchCount_654311449 = addInt(consecutiveMatchCount_654311449, 1); + scoreState_654311446 = 5; + score_654311452 = addInt(score_654311452, mulInt(5, consecutiveMatchCount_654311449)); + if ((scoreState_654311446 == 10)) { + score_654311452 = addInt(score_654311452, 10); + } + + var onBoundary_654311508 = (patIndex_654311451 == ((pattern_654311441) == null ? -1 : (pattern_654311441).length - 1)); + if ((!(onBoundary_654311508) && (strIndex_654311450 < ((str_654311442) == null ? -1 : (str_654311442).length - 1)))) { + var nextPatternChar_654311509 = nsuToLowerAsciiChar(pattern_654311441.charCodeAt(chckIndx(addInt(patIndex_654311451, 1), 0, (pattern_654311441).length - 1))); + var nextStrChar_654311510 = nsuToLowerAsciiChar(str_654311442.charCodeAt(chckIndx(addInt(strIndex_654311450, 1), 0, (str_654311442).length - 1))); + if (!!((ConstSet5[nextStrChar_654311510] != undefined))) Temporary4 = false; else { Temporary4 = !((nextStrChar_654311510 == nextPatternChar_654311509)); } onBoundary_654311508 = Temporary4; + } + + if (onBoundary_654311508) { + scoreState_654311446 = 20; + score_654311452 = addInt(score_654311452, scoreState_654311446); + } + + break; + case -1: + case -3: + if (!((ConstSet6[str_654311442.charCodeAt(chckIndx(subInt(strIndex_654311450, 1), 0, (str_654311442).length - 1))] != undefined))) Temporary5 = true; else { if (!(ConstSet7[str_654311442.charCodeAt(chckIndx(subInt(strIndex_654311450, 1), 0, (str_654311442).length - 1))] != undefined)) Temporary6 = false; else { Temporary6 = (ConstSet8[str_654311442.charCodeAt(chckIndx(strIndex_654311450, 0, (str_654311442).length - 1))] != undefined); } Temporary5 = Temporary6; } var isLeadingChar_654311534 = Temporary5; + if (isLeadingChar_654311534) { + scoreState_654311446 = 10; + } + else { + scoreState_654311446 = 0; + score_654311452 = addInt(score_654311452, scoreState_654311446); + } + + break; + } + patIndex_654311451 = addInt(patIndex_654311451, 1); + } + else { + switch (scoreState_654311446) { + case -100: + scoreState_654311446 = -3; + score_654311452 = addInt(score_654311452, scoreState_654311446); + break; + case 5: + scoreState_654311446 = -1; + score_654311452 = addInt(score_654311452, scoreState_654311446); + consecutiveMatchCount_654311449 = 0; + break; + case -3: + if ((unmatchedLeadingCharCount_654311448 < 3)) { + scoreState_654311446 = -3; + score_654311452 = addInt(score_654311452, scoreState_654311446); + } + + unmatchedLeadingCharCount_654311448 = addInt(unmatchedLeadingCharCount_654311448, 1); + break; + default: + scoreState_654311446 = -1; + score_654311452 = addInt(score_654311452, scoreState_654311446); + break; + } + } + + strIndex_654311450 = addInt(strIndex_654311450, 1); + } while (false); + } + } while (false); + if (!(patIndex_654311451 == ((pattern_654311441) == null ? 0 : (pattern_654311441).length))) Temporary7 = false; else { if ((strIndex_654311450 == ((str_654311442) == null ? 0 : (str_654311442).length))) Temporary8 = true; else { Temporary8 = !((ConstSet9[str_654311442.charCodeAt(chckIndx(strIndex_654311450, 0, (str_654311442).length - 1))] != undefined)); } Temporary7 = Temporary8; } if (Temporary7) { + score_654311452 = addInt(score_654311452, 10); + } + + var colontmp__503317396 = nimMax(0, score_654311452); + var colontmp__503317397 = (0 < score_654311452); + result_654311445 = nimCopy(result_654311445, {Field0: colontmp__503317396, Field1: colontmp__503317397}, NTI654311438); + + return result_654311445; + +} + +function escapeCString_503317173(x_503317174, x_503317174_Idx) { + var s_503317175 = []; + Label1: do { + var c_503317176 = 0; + var iHEX60gensym6_503317400 = 0; + var nHEX60gensym6_503317401 = ((x_503317174[x_503317174_Idx]) == null ? 0 : (x_503317174[x_503317174_Idx]).length); + Label2: do { + Label3: while (true) { + if (!(iHEX60gensym6_503317400 < nHEX60gensym6_503317401)) break Label3; + c_503317176 = x_503317174[x_503317174_Idx].charCodeAt(chckIndx(iHEX60gensym6_503317400, 0, (x_503317174[x_503317174_Idx]).length - 1)); + switch (c_503317176) { + case 60: + s_503317175.push.apply(s_503317175, makeNimstrLit("<"));; + break; + case 62: + s_503317175.push.apply(s_503317175, makeNimstrLit(">"));; + break; + default: + addChar(s_503317175, c_503317176);; + break; + } + iHEX60gensym6_503317400 = addInt(iHEX60gensym6_503317400, 1); + } + } while (false); + } while (false); + x_503317174[x_503317174_Idx] = toJSStr(s_503317175); + + +} + +function text_503316538(s_503316539) { + var result_503316540 = null; + + result_503316540 = document.createTextNode(toJSStr(s_503316539)); + + return result_503316540; + +} + +function dosearch_503317177(value_503317178) { + +function HEX3Aanonymous_503317234(a_503317239, b_503317240) { + var result_503317245 = 0; + + result_503317245 = subInt(b_503317240["Field1"], a_503317239["Field1"]); + + return result_503317245; + + } + + var result_503317179 = null; + + if (((db_503317169[0]).length == 0)) { + var stuff_503317183 = null; + var request = new XMLHttpRequest(); + request.open("GET", "theindex.html", false); + request.send(null); + + var doc = document.implementation.createHTMLDocument("theindex"); + doc.documentElement.innerHTML = request.responseText; + + //parser=new DOMParser(); + //doc=parser.parseFromString("", "text/html"); + + stuff_503317183 = doc.documentElement; + + db_503317169[0] = nimCopy(null, stuff_503317183.getElementsByClassName("reference"), NTI637534652); + contents_503317170[0] = nimCopy(null, [], NTI503317017); + Label1: do { + var ahref_503317208 = null; + var i_503317381 = 0; + var L_503317382 = (db_503317169[0]).length; + Label2: do { + Label3: while (true) { + if (!(i_503317381 < L_503317382)) break Label3; + ahref_503317208 = db_503317169[0][chckIndx(i_503317381, 0, (db_503317169[0]).length - 1)]; + contents_503317170[0].push(ahref_503317208.getAttribute("data-doc-search-tag"));; + i_503317381 = addInt(i_503317381, 1); + if (!(((db_503317169[0]).length == L_503317382))) { + failedAssertImpl_218103864(makeNimstrLit("iterators.nim(240, 11) `len(a) == L` the length of the seq changed while iterating over it")); + } + + } + } while (false); + } while (false); + } + + var ul_503317213 = tree_503316487(makeNimstrLit("UL"), []); + result_503317179 = tree_503316487(makeNimstrLit("DIV"), []); + setClass_503316535(result_503317179, makeNimstrLit("search_results")); + var matches_503317218 = []; + Label4: do { + var i_503317226 = 0; + var colontmp__503317386 = 0; + colontmp__503317386 = (db_503317169[0]).length; + var i_503317387 = 0; + Label5: do { + Label6: while (true) { + if (!(i_503317387 < colontmp__503317386)) break Label6; + i_503317226 = i_503317387; + Label7: do { + var c_503317227 = contents_503317170[0][chckIndx(i_503317226, 0, (contents_503317170[0]).length - 1)]; + if (((c_503317227 == "Examples") || (c_503317227 == "PEG construction"))) { + break Label7; + } + + var colontmp__503317393 = fuzzyMatch_654311440(value_503317178, c_503317227); + var score_503317228 = colontmp__503317393["Field0"]; + var matched_503317229 = colontmp__503317393["Field1"]; + if (matched_503317229) { + matches_503317218.push({Field0: db_503317169[0][chckIndx(i_503317226, 0, (db_503317169[0]).length - 1)], Field1: score_503317228});; + } + + } while (false); + i_503317387 = addInt(i_503317387, 1); + } + } while (false); + } while (false); + matches_503317218.sort(HEX3Aanonymous_503317234); + Label8: do { + var i_503317262 = 0; + var colontmp__503317390 = 0; + colontmp__503317390 = nimMin((matches_503317218).length, 29); + var i_503317391 = 0; + Label9: do { + Label10: while (true) { + if (!(i_503317391 < colontmp__503317390)) break Label10; + i_503317262 = i_503317391; + matches_503317218[chckIndx(i_503317262, 0, (matches_503317218).length - 1)]["Field0"].innerHTML = matches_503317218[chckIndx(i_503317262, 0, (matches_503317218).length - 1)]["Field0"].getAttribute("data-doc-search-tag"); + escapeCString_503317173(matches_503317218[chckIndx(i_503317262, 0, (matches_503317218).length - 1)]["Field0"], "innerHTML"); + add_503316531(ul_503317213, tree_503316487(makeNimstrLit("LI"), [matches_503317218[chckIndx(i_503317262, 0, (matches_503317218).length - 1)]["Field0"]])); + i_503317391 = addInt(i_503317391, 1); + } + } while (false); + } while (false); + if ((ul_503317213.childNodes.length == 0)) { + add_503316531(result_503317179, tree_503316487(makeNimstrLit("B"), [text_503316538(makeNimstrLit("no search results"))])); + } + else { + add_503316531(result_503317179, tree_503316487(makeNimstrLit("B"), [text_503316538(makeNimstrLit("search results"))])); + add_503316531(result_503317179, ul_503317213); + } + + + return result_503317179; + +} + +function search() { + +function wrapper_503317347() { + var elem_503317348 = document.getElementById("searchInput"); + var value_503317349 = elem_503317348.value; + if (!((((value_503317349) == null ? 0 : (value_503317349).length) == 0))) { + if ((oldtoc_503317335[0] == null)) { + oldtoc_503317335[0] = document.getElementById("tocRoot"); + } + + var results_503317353 = dosearch_503317177(value_503317349); + replaceById_503316546("tocRoot", results_503317353); + } + else { + if (!((oldtoc_503317335[0] == null))) { + replaceById_503316546("tocRoot", oldtoc_503317335[0]); + } + } + + + } + + if (!((timer_503317336[0] == null))) { + clearTimeout(timer_503317336[0]); + } + + timer_503317336[0] = setTimeout(wrapper_503317347, 400); + + +} diff --git a/index.html b/index.html new file mode 100644 index 0000000..f958dcf --- /dev/null +++ b/index.html @@ -0,0 +1,1558 @@ + + + + + + + + + + + + + + + + + + +Index + + + + + + + + +
+
+

Index

+ Modules: adix/althash, adix/amoft, adix/bist, adix/bitop, adix/bltab, adix/btree, adix/cpuCT, adix/cumsum, adix/ditab, adix/lghisto, adix/lptabz, adix/memutil, adix/metab, adix/mvstat, adix/nsort, adix/sequint, adix/tdigest, adix/uniqce, adix/xlang.

API symbols

+
`$`:
+
`&=`:
+
`>>=`:
+
`<<=`:
+
`<=`:
+
`<`:
+
`*`:
+
`+=`:
+
`+`:
+
`-+-`:
+
`-`:
+
`==`:
+
`[]=`:
+
`[]`:
+
`^=`:
+
`{}=`:
+
`{}`:
+
`|=`:
+
add:
+
addr0:
+
allItems:
+
allValues:
+
AMOft:
+
BasicStats:
+
basicStats:
+
binAB:
+
bins:
+
Bist:
+
bist:
+
bits:
+
blDenom:
+
blGrowPow2:
+
blInitialSize:
+
blMinFree:
+
blNumer:
+
blRehash:
+
blRobinHood:
+
blSentinel:
+
BLTab:
+
blValueBits:
+
btLinearNode:
+
btPool:
+
card:
+
ccPreDefs:
+
cdf:
+
ceilPow2:
+
cfor:
+
clear:
+
compress:
+
contains:
+
containsOrIncl:
+
count:
+
CtMnSketch:
+
cumsum:
+
dbg:
+
debugDump:
+
defBTree:
+
del:
+
depths:
+
depthStats:
+
diDenom:
+
difference:
+
DigesT:
+
diGrowPow2:
+
diInitialSize:
+
diMinFree:
+
diNumer:
+
diRehash:
+
diRobinHood:
+
DISet:
+
disjoint:
+
DITab:
+
editKey:
+
editOrInit:
+
excl:
+
floorPow2:
+
fromCnts:
+
fromIx:
+
getCap:
+
getItOrFail:
+
getOrDefault:
+
getSalt:
+
Group:
+
groups:
+
hash:
+
hashDegski:
+
hashIdentity:
+
hashMoreMur:
+
hashNASAM:
+
hashRevFib:
+
hashRoMu1:
+
hashRoMu2:
+
hashSplit64:
+
hashSplitMix:
+
hashWangYi1:
+
hashWY0:
+
hasKey:
+
hasKeyOrPut:
+
hcodes:
+
high:
+
inc:
+
incl:
+
indexBy:
+
init:
+
initAMOft:
+
initBist:
+
initBLTab:
+
initCtMnSketch:
+
initDigesT:
+
initDISet:
+
initDITab:
+
initLgHisto:
+
initLPSet:
+
initLPSetz:
+
initLPTab:
+
initLPTabz:
+
initMovingStat:
+
initSeqUint:
+
initSet:
+
initTab:
+
initUniqCe:
+
intersection:
+
invCDF:
+
isPow2:
+
items:
+
jaccard:
+
keys:
+
kurtosis:
+
kurtosisS:
+
len:
+
lg:
+
lgCeil:
+
lgFloor:
+
LgHisto:
+
lgPow2:
+
load:
+
loadBLTab:
+
loadLPTabz:
+
low:
+
lpDenom:
+
lpGrowPow2:
+
lpInitialSize:
+
lpMaxWarn:
+
lpMinFree:
+
lpNumer:
+
lpRehash:
+
lpRobinHood:
+
LPSet:
+
LPSetz:
+
LPTab:
+
LPTabz:
+
lpWarn:
+
map:
+
max:
+
mean:
+
merge:
+
mergeNew:
+
mgetOrPut:
+
min:
+
missingOrExcl:
+
mitems:
+
mmap:
+
mostCommon:
+
MovingStat:
+
mpairs:
+
mvalues:
+
nBin:
+
nInv:
+
normalized:
+
nsort:
+
nsortBy:
+
nsortByRaw:
+
nsortByTag:
+
nthKey:
+
nthPair:
+
numItems:
+
nUnique:
+
nUniqueErr:
+
Option:
+
orderFit:
+
OrderStats:
+
overflows:
+
pairs:
+
pmf:
+
pop:
+
pullDown:
+
push:
+
pushUp:
+
quantile:
+
raiseNotFound:
+
range:
+
reverseBits:
+
reverseBitsByte:
+
rightSize:
+
rightSz:
+
rotateLeftBits:
+
rotateRightBits:
+
save:
+
Scale:
+
scLog:
+
secureSalt:
+
SeqUint:
+
Set:
+
setCap:
+
setLen:
+
setOrIncl:
+
setPolicy:
+
skewness:
+
skewnessS:
+
space:
+
standardDeviation:
+
standardDeviationS:
+
stderror:
+
sum:
+
symmetricDifference:
+
Tab:
+
take:
+
toCnts:
+
toDITab:
+
toIx:
+
toLPTabz:
+
topByVal:
+
toSet:
+
toTab:
+
underflows:
+
union:
+
UniqCe:
+
values:
+
variance:
+
varianceS:
+
verb:
+
vmaddrSalt:
+
weight:
+
withIt:
+
withValue:
+
x86bmi2:
+
X86Feature:
+
x86features:
+
x86sse2:
+
x86ssse3:
+
xfFlt:
+
xfFltRev:
+
xfNone:
+
XForm:
+
xfRev:
+
xfSgn:
+
xfSgnRev:
+
zeroSalt:
+
+
+ +
+
+
+ + + diff --git a/nimdoc.out.css b/nimdoc.out.css new file mode 100644 index 0000000..4abea9c --- /dev/null +++ b/nimdoc.out.css @@ -0,0 +1,1016 @@ +/* +Stylesheet for use with Docutils/rst2html. + +See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to +customize this style sheet. + +Modified from Chad Skeeters' rst2html-style +https://bitbucket.org/cskeeters/rst2html-style/ + +Modified by Boyd Greenfield and narimiran +*/ + +:root { + --primary-background: #fff; + --secondary-background: ghostwhite; + --third-background: #e8e8e8; + --info-background: #50c050; + --warning-background: #c0a000; + --error-background: #e04040; + --border: #dde; + --text: #222; + --anchor: #07b; + --anchor-focus: #607c9f; + --input-focus: #1fa0eb; + --strong: #3c3c3c; + --hint: #9A9A9A; + --nim-sprite-base64: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAN4AAAA9CAYAAADCt9ebAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFFmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDggNzkuMTY0MDM2LCAyMDE5LzA4LzEzLTAxOjA2OjU3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjEuMCAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDE5LTEyLTAzVDAxOjAzOjQ4KzAxOjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAxOS0xMi0wM1QwMjoyODo0MSswMTowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAxOS0xMi0wM1QwMjoyODo0MSswMTowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozMzM0ZjAxYS0yMDExLWE1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"); + + --keyword: #5e8f60; + --identifier: #222; + --comment: #484a86; + --operator: #155da4; + --punctuation: black; + --other: black; + --escapeSequence: #c4891b; + --number: #252dbe; + --literal: #a4255b; + --program: #6060c0; + --option: #508000; + --raw-data: #a4255b; +} + +[data-theme="dark"] { + --primary-background: #171921; + --secondary-background: #1e202a; + --third-background: #2b2e3b; + --info-background: #008000; + --warning-background: #807000; + --error-background: #c03000; + --border: #0e1014; + --text: #fff; + --anchor: #8be9fd; + --anchor-focus: #8be9fd; + --input-focus: #8be9fd; + --strong: #bd93f9; + --hint: #7A7C85; + --nim-sprite-base64: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAABMCAYAAABOBlMuAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFFmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDggNzkuMTY0MDM2LCAyMDE5LzA4LzEzLTAxOjA2OjU3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjEuMCAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDE5LTEyLTAzVDAxOjE4OjIyKzAxOjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAxOS0xMi0wM1QwMToyMDoxMCswMTowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAxOS0xMi0wM1QwMToyMDoxMCswMTowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDplZGViMzU3MC1iNmZjLWQy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"); + + --keyword: #ff79c6; + --identifier: #f8f8f2; + --comment: #6272a4; + --operator: #ff79c6; + --punctuation: #f8f8f2; + --other: #f8f8f2; + --escapeSequence: #bd93f9; + --number: #bd93f9; + --literal: #f1fa8c; + --program: #9090c0; + --option: #90b010; + --raw-data: #8be9fd; +} + +.theme-switch-wrapper { + display: flex; + align-items: center; +} + +.theme-switch-wrapper em { + margin-left: 10px; + font-size: 1rem; +} + +.theme-switch { + display: inline-block; + height: 22px; + position: relative; + width: 50px; +} + +.theme-switch input { + display: none; +} + +.slider { + background-color: #ccc; + bottom: 0; + cursor: pointer; + left: 0; + position: absolute; + right: 0; + top: 0; + transition: .4s; +} + +.slider:before { + background-color: #fff; + bottom: 4px; + content: ""; + height: 13px; + left: 4px; + position: absolute; + transition: .4s; + width: 13px; +} + +input:checked + .slider { + background-color: #66bb6a; +} + +input:checked + .slider:before { + transform: translateX(26px); +} + +.slider.round { + border-radius: 17px; +} + +.slider.round:before { + border-radius: 50%; +} + +html { + font-size: 100%; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; } + +body { + font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif; + font-weight: 400; + font-size: 1.125em; + line-height: 1.5; + color: var(--text); + background-color: var(--primary-background); } + +/* Skeleton grid */ +.container { + position: relative; + width: 100%; + max-width: 1050px; + margin: 0 auto; + padding: 0; + box-sizing: border-box; } + +.column, +.columns { + width: 100%; + float: left; + box-sizing: border-box; + margin-left: 1%; +} + +.column:first-child, +.columns:first-child { + margin-left: 0; } + +.three.columns { + width: 22%; +} + +.nine.columns { + width: 77.0%; } + +.twelve.columns { + width: 100%; + margin-left: 0; } + +@media screen and (max-width: 860px) { + .three.columns { + display: none; + } + .nine.columns { + width: 98.0%; + } + body { + font-size: 1em; + line-height: 1.35; + } +} + +cite { + font-style: italic !important; } + + +/* Nim search input */ +div#searchInputDiv { + margin-bottom: 1em; +} +input#searchInput { + width: 80%; +} + +/* + * Some custom formatting for input forms. + * This also fixes input form colors on Firefox with a dark system theme on Linux. + */ +input { + -moz-appearance: none; + background-color: var(--secondary-background); + color: var(--text); + border: 1px solid var(--border); + font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif; + font-size: 0.9em; + padding: 6px; +} + +input:focus { + border: 1px solid var(--input-focus); + box-shadow: 0 0 3px var(--input-focus); +} + +select { + -moz-appearance: none; + background-color: var(--secondary-background); + color: var(--text); + border: 1px solid var(--border); + font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif; + font-size: 0.9em; + padding: 6px; +} + +select:focus { + border: 1px solid var(--input-focus); + box-shadow: 0 0 3px var(--input-focus); +} + +/* Docgen styles */ + +:target { + border: 2px solid #B5651D; + border-style: dotted; +} + +/* Links */ +a { + color: var(--anchor); + text-decoration: none; +} + +a span.Identifier { + text-decoration: underline; + text-decoration-color: #aab; +} + +a.reference-toplevel { + font-weight: bold; +} + +a.toc-backref { + text-decoration: none; + color: var(--text); } + +a.link-seesrc { + color: #607c9f; + font-size: 0.9em; + font-style: italic; } + +a:hover, +a:focus { + color: var(--anchor-focus); + text-decoration: underline; } + +a:hover span.Identifier { + color: var(--anchor); +} + + +sub, +sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; } + +sup { + top: -0.5em; } + +sub { + bottom: -0.25em; } + +img { + width: auto; + height: auto; + max-width: 100%; + vertical-align: middle; + border: 0; + -ms-interpolation-mode: bicubic; } + +@media print { + * { + color: black !important; + text-shadow: none !important; + background: transparent !important; + box-shadow: none !important; } + + a, + a:visited { + text-decoration: underline; } + + a[href]:after { + content: " (" attr(href) ")"; } + + abbr[title]:after { + content: " (" attr(title) ")"; } + + .ir a:after, + a[href^="javascript:"]:after, + a[href^="#"]:after { + content: ""; } + + pre, + blockquote { + border: 1px solid #999; + page-break-inside: avoid; } + + thead { + display: table-header-group; } + + tr, + img { + page-break-inside: avoid; } + + img { + max-width: 100% !important; } + + @page { + margin: 0.5cm; } + + h1 { + page-break-before: always; } + + h1.title { + page-break-before: avoid; } + + p, + h2, + h3 { + orphans: 3; + widows: 3; } + + h2, + h3 { + page-break-after: avoid; } +} + + +p { + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +small { + font-size: 85%; } + +strong { + font-weight: 600; + font-size: 0.95em; + color: var(--strong); +} + +em { + font-style: italic; } + +h1 { + font-size: 1.8em; + font-weight: 400; + padding-bottom: .25em; + border-bottom: 6px solid var(--third-background); + margin-top: 2.5em; + margin-bottom: 1em; + line-height: 1.2em; } + +h1.title { + padding-bottom: 1em; + border-bottom: 0px; + font-size: 2.5em; + text-align: center; + font-weight: 900; + margin-top: 0.75em; + margin-bottom: 0em; +} + +h2 { + font-size: 1.3em; + margin-top: 2em; } + +h2.subtitle { + margin-top: 0em; + text-align: center; } + +h3 { + font-size: 1.125em; + font-style: italic; + margin-top: 1.5em; } + +h4 { + font-size: 1.125em; + margin-top: 1em; } + +h5 { + font-size: 1.125em; + margin-top: 0.75em; } + +h6 { + font-size: 1.1em; } + + +ul, +ol { + padding: 0; + margin-top: 0.5em; + margin-left: 0.75em; } + +ul ul, +ul ol, +ol ol, +ol ul { + margin-bottom: 0; + margin-left: 1.25em; } + +ul.simple > li { + list-style-type: circle; +} + +ul.simple-boot li { + list-style-type: none; + margin-left: 0em; + margin-bottom: 0.5em; +} + +ol.simple > li, ul.simple > li { + margin-bottom: 0.2em; + margin-left: 0.4em } + +ul.simple.simple-toc > li { + margin-top: 1em; +} + +ul.simple-toc { + list-style: none; + font-size: 0.9em; + margin-left: -0.3em; + margin-top: 1em; } + +ul.simple-toc > li { + list-style-type: none; +} + +ul.simple-toc-section { + list-style-type: circle; + margin-left: 0.8em; + color: #6c9aae; } + +ul.nested-toc-section { + list-style-type: circle; + margin-left: -0.75em; + color: var(--text); +} + +ul.nested-toc-section > li { + margin-left: 1.25em; +} + + +ol.arabic { + list-style: decimal; } + +ol.loweralpha { + list-style: lower-alpha; } + +ol.upperalpha { + list-style: upper-alpha; } + +ol.lowerroman { + list-style: lower-roman; } + +ol.upperroman { + list-style: upper-roman; } + +ul.auto-toc { + list-style-type: none; } + + +dl { + margin-bottom: 1.5em; } + +dt { + margin-bottom: -0.5em; + margin-left: 0.0em; } + +dd { + margin-left: 2.0em; + margin-bottom: 3.0em; + margin-top: 0.5em; } + + +hr { + margin: 2em 0; + border: 0; + border-top: 1px solid #aaa; } + +hr.footnote { + width: 25%; + border-top: 0.15em solid #999; + margin-bottom: 0.15em; + margin-top: 0.15em; +} +div.footnote-group { + margin-left: 1em; } +div.footnote-label { + display: inline-block; + min-width: 1.7em; +} + +div.option-list { + border: 0.1em solid var(--border); +} +div.option-list-item { + padding-left: 12em; + padding-right: 0; + padding-bottom: 0.3em; + padding-top: 0.3em; +} +div.odd { + background-color: var(--secondary-background); +} +div.option-list-label { + margin-left: -11.5em; + margin-right: 0em; + min-width: 11.5em; + display: inline-block; + vertical-align: top; +} +div.option-list-description { + width: calc(100% - 1em); + padding-left: 1em; + padding-right: 0; + display: inline-block; +} + +blockquote { + font-size: 0.9em; + font-style: italic; + padding-left: 0.5em; + margin-left: 0; + border-left: 5px solid #bbc; +} + +.pre, span.tok { + font-family: "Source Code Pro", Monaco, Menlo, Consolas, "Courier New", monospace; + font-weight: 500; + font-size: 0.85em; + color: var(--text); + background-color: var(--third-background); + padding-left: 3px; + padding-right: 3px; + border-radius: 4px; +} + +span.tok { + border: 1px solid #808080; + padding-bottom: 0.1em; + margin-right: 0.2em; +} + +pre { + font-family: "Source Code Pro", Monaco, Menlo, Consolas, "Courier New", monospace; + color: var(--text); + font-weight: 500; + display: inline-block; + box-sizing: border-box; + min-width: 100%; + padding: 0.5em; + margin-top: 0.5em; + margin-bottom: 0.5em; + font-size: 0.85em; + white-space: pre !important; + overflow-y: hidden; + overflow-x: visible; + background-color: var(--secondary-background); + border: 1px solid var(--border); + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; } + +.pre-scrollable { + max-height: 340px; + overflow-y: scroll; } + + +/* Nim line-numbered tables */ +.line-nums-table { + width: 100%; + table-layout: fixed; } + +table.line-nums-table { + border-radius: 4px; + border: 1px solid #cccccc; + background-color: ghostwhite; + border-collapse: separate; + margin-top: 15px; + margin-bottom: 25px; } + +.line-nums-table tbody { + border: none; } + +.line-nums-table td pre { + border: none; + background-color: transparent; } + +.line-nums-table td.blob-line-nums { + width: 28px; } + +.line-nums-table td.blob-line-nums pre { + color: #b0b0b0; + -webkit-filter: opacity(75%); + filter: opacity(75%); + text-align: right; + border-color: transparent; + background-color: transparent; + padding-left: 0px; + margin-left: 0px; + padding-right: 0px; + margin-right: 0px; } + + +table { + max-width: 100%; + background-color: transparent; + margin-top: 0.5em; + margin-bottom: 1.5em; + border-collapse: collapse; + border-color: var(--third-background); + border-spacing: 0; + font-size: 0.9em; +} + +table th, table td { + padding: 0px 0.5em 0px; + border-color: var(--third-background); +} + +table th { + background-color: var(--third-background); + border-color: var(--third-background); + font-weight: bold; } + +table th.docinfo-name { + background-color: transparent; + text-align: right; +} + +table tr:hover { + background-color: var(--third-background); } + + +/* rst2html default used to remove borders from tables and images */ +.borderless, table.borderless td, table.borderless th { + border: 0; } + +table.borderless td, table.borderless th { + /* Override padding for "table.docutils td" with "! important". + The right padding separates the table cells. */ + padding: 0 0.5em 0 0 !important; } + +.admonition { + padding: 0.3em; + background-color: var(--secondary-background); + border-left: 0.4em solid #7f7f84; + margin-bottom: 0.5em; + -webkit-box-shadow: 0 5px 8px -6px rgba(0,0,0,.2); + -moz-box-shadow: 0 5px 8px -6px rgba(0,0,0,.2); + box-shadow: 0 5px 8px -6px rgba(0,0,0,.2); +} +.admonition-info { + border-color: var(--info-background); +} +.admonition-info-text { + color: var(--info-background); +} +.admonition-warning { + border-color: var(--warning-background); +} +.admonition-warning-text { + color: var(--warning-background); +} +.admonition-error { + border-color: var(--error-background); +} +.admonition-error-text { + color: var(--error-background); +} + +.first { + /* Override more specific margin styles with "! important". */ + margin-top: 0 !important; } + +.last, .with-subtitle { + margin-bottom: 0 !important; } + +.hidden { + display: none; } + +blockquote.epigraph { + margin: 2em 5em; } + +dl.docutils dd { + margin-bottom: 0.5em; } + +object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] { + overflow: hidden; } + + +div.figure { + margin-left: 2em; + margin-right: 2em; } + +div.footer, div.header { + clear: both; + text-align: center; + color: #666; + font-size: smaller; } + +div.footer { + padding-top: 5em; +} + +div.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; } + +div.line-block div.line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; } + +div.topic { + margin: 2em; } + +div.search_results { + background-color: var(--third-background); + margin: 3em; + padding: 1em; + border: 1px solid #4d4d4d; +} + +div#global-links ul { + margin-left: 0; + list-style-type: none; +} + +div#global-links > simple-boot { + margin-left: 3em; +} + +hr.docutils { + width: 75%; } + +img.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; } + +img.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; } + +img.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; } + +.align-left { + text-align: left; } + +.align-center { + clear: both; + text-align: center; } + +.align-right { + text-align: right; } + +/* reset inner alignment in figures */ +div.align-right { + text-align: inherit; } + +p.attribution { + text-align: right; + margin-left: 50%; } + +p.caption { + font-style: italic; } + +p.credits { + font-style: italic; + font-size: smaller; } + +p.label { + white-space: nowrap; } + +p.rubric { + font-weight: bold; + font-size: larger; + color: maroon; + text-align: center; } + +p.topic-title { + font-weight: bold; } + +pre.address { + margin-bottom: 0; + margin-top: 0; + font: inherit; } + +pre.literal-block, pre.doctest-block, pre.math, pre.code { + margin-left: 2em; + margin-right: 2em; } + +pre.code .ln { + color: grey; } + +/* line numbers */ +pre.code, code { + background-color: #eeeeee; } + +pre.code .comment, code .comment { + color: #5c6576; } + +pre.code .keyword, code .keyword { + color: #3B0D06; + font-weight: bold; } + +pre.code .literal.string, code .literal.string { + color: #0c5404; } + +pre.code .name.builtin, code .name.builtin { + color: #352b84; } + +pre.code .deleted, code .deleted { + background-color: #DEB0A1; } + +pre.code .inserted, code .inserted { + background-color: #A3D289; } + +span.classifier { + font-style: oblique; } + +span.classifier-delimiter { + font-weight: bold; } + +span.problematic { + color: #b30000; } + +span.section-subtitle { + /* font-size relative to parent (h1..h6 element) */ + font-size: 80%; } + +span.DecNumber { + color: var(--number); } + +span.BinNumber { + color: var(--number); } + +span.HexNumber { + color: var(--number); } + +span.OctNumber { + color: var(--number); } + +span.FloatNumber { + color: var(--number); } + +span.Identifier { + color: var(--identifier); } + +span.Keyword { + font-weight: 600; + color: var(--keyword); } + +span.StringLit { + color: var(--literal); } + +span.LongStringLit { + color: var(--literal); } + +span.CharLit { + color: var(--literal); } + +span.EscapeSequence { + color: var(--escapeSequence); } + +span.Operator { + color: var(--operator); } + +span.Punctuation { + color: var(--punctuation); } + +span.Comment, span.LongComment { + font-style: italic; + font-weight: 400; + color: var(--comment); } + +span.RegularExpression { + color: darkviolet; } + +span.TagStart { + color: darkviolet; } + +span.TagEnd { + color: darkviolet; } + +span.Key { + color: #252dbe; } + +span.Value { + color: #252dbe; } + +span.RawData { + color: var(--raw-data); } + +span.Assembler { + color: #252dbe; } + +span.Preprocessor { + color: #252dbe; } + +span.Directive { + color: #252dbe; } + +span.option { + font-weight: bold; + font-family: "Source Code Pro", Monaco, Menlo, Consolas, "Courier New", monospace; + color: var(--option); +} + +span.Prompt { + font-weight: bold; + color: red; } + +span.ProgramOutput { + font-weight: bold; + color: #808080; } + +span.program { + font-weight: bold; + color: var(--program); + text-decoration: underline; + text-decoration-color: var(--hint); + text-decoration-thickness: 0.05em; + text-underline-offset: 0.15em; +} + +span.Command, span.Rule, span.Hyperlink, span.Label, span.Reference, +span.Other { + color: var(--other); } + +/* Pop type, const, proc, and iterator defs in nim def blocks */ +dt pre > span.Identifier, dt pre > span.Operator { + color: var(--identifier); + font-weight: 700; } + +dt pre > span.Keyword ~ span.Identifier, dt pre > span.Identifier ~ span.Identifier, +dt pre > span.Operator ~ span.Identifier, dt pre > span.Other ~ span.Identifier { + color: var(--identifier); + font-weight: inherit; } + +/* Nim sprite for the footer (taken from main page favicon) */ +.nim-sprite { + display: inline-block; + width: 51px; + height: 14px; + background-position: 0 0; + background-size: 51px 14px; + -webkit-filter: opacity(50%); + filter: opacity(50%); + background-repeat: no-repeat; + background-image: var(--nim-sprite-base64); + margin-bottom: 5px; } + +span.pragmadots { + /* Position: relative frees us up to make the dots + look really nice without fucking up the layout and + causing bulging in the parent container */ + position: relative; + /* 1px down looks slightly nicer */ + top: 1px; + padding: 2px; + background-color: var(--third-background); + border-radius: 4px; + margin: 0 2px; + cursor: pointer; + font-size: 0.8em; +} + +span.pragmadots:hover { + background-color: var(--hint); +} +span.pragmawrap { + display: none; +} + +span.attachedType { + display: none; + visibility: hidden; +} diff --git a/theindex.html b/theindex.html new file mode 100644 index 0000000..f958dcf --- /dev/null +++ b/theindex.html @@ -0,0 +1,1558 @@ + + + + + + + + + + + + + + + + + + +Index + + + + + + + + +
+
+

Index

+ Modules: adix/althash, adix/amoft, adix/bist, adix/bitop, adix/bltab, adix/btree, adix/cpuCT, adix/cumsum, adix/ditab, adix/lghisto, adix/lptabz, adix/memutil, adix/metab, adix/mvstat, adix/nsort, adix/sequint, adix/tdigest, adix/uniqce, adix/xlang.

API symbols

+
`$`:
+
`&=`:
+
`>>=`:
+
`<<=`:
+
`<=`:
+
`<`:
+
`*`:
+
`+=`:
+
`+`:
+
`-+-`:
+
`-`:
+
`==`:
+
`[]=`:
+
`[]`:
+
`^=`:
+
`{}=`:
+
`{}`:
+
`|=`:
+
add:
+
addr0:
+
allItems:
+
allValues:
+
AMOft:
+
BasicStats:
+
basicStats:
+
binAB:
+
bins:
+
Bist:
+
bist:
+
bits:
+
blDenom:
+
blGrowPow2:
+
blInitialSize:
+
blMinFree:
+
blNumer:
+
blRehash:
+
blRobinHood:
+
blSentinel:
+
BLTab:
+
blValueBits:
+
btLinearNode:
+
btPool:
+
card:
+
ccPreDefs:
+
cdf:
+
ceilPow2:
+
cfor:
+
clear:
+
compress:
+
contains:
+
containsOrIncl:
+
count:
+
CtMnSketch:
+
cumsum:
+
dbg:
+
debugDump:
+
defBTree:
+
del:
+
depths:
+
depthStats:
+
diDenom:
+
difference:
+
DigesT:
+
diGrowPow2:
+
diInitialSize:
+
diMinFree:
+
diNumer:
+
diRehash:
+
diRobinHood:
+
DISet:
+
disjoint:
+
DITab:
+
editKey:
+
editOrInit:
+
excl:
+
floorPow2:
+
fromCnts:
+
fromIx:
+
getCap:
+
getItOrFail:
+
getOrDefault:
+
getSalt:
+
Group:
+
groups:
+
hash:
+
hashDegski:
+
hashIdentity:
+
hashMoreMur:
+
hashNASAM:
+
hashRevFib:
+
hashRoMu1:
+
hashRoMu2:
+
hashSplit64:
+
hashSplitMix:
+
hashWangYi1:
+
hashWY0:
+
hasKey:
+
hasKeyOrPut:
+
hcodes:
+
high:
+
inc:
+
incl:
+
indexBy:
+
init:
+
initAMOft:
+
initBist:
+
initBLTab:
+
initCtMnSketch:
+
initDigesT:
+
initDISet:
+
initDITab:
+
initLgHisto:
+
initLPSet:
+
initLPSetz:
+
initLPTab:
+
initLPTabz:
+
initMovingStat:
+
initSeqUint:
+
initSet:
+
initTab:
+
initUniqCe:
+
intersection:
+
invCDF:
+
isPow2:
+
items:
+
jaccard:
+
keys:
+
kurtosis:
+
kurtosisS:
+
len:
+
lg:
+
lgCeil:
+
lgFloor:
+
LgHisto:
+
lgPow2:
+
load:
+
loadBLTab:
+
loadLPTabz:
+
low:
+
lpDenom:
+
lpGrowPow2:
+
lpInitialSize:
+
lpMaxWarn:
+
lpMinFree:
+
lpNumer:
+
lpRehash:
+
lpRobinHood:
+
LPSet:
+
LPSetz:
+
LPTab:
+
LPTabz:
+
lpWarn:
+
map:
+
max:
+
mean:
+
merge:
+
mergeNew:
+
mgetOrPut:
+
min:
+
missingOrExcl:
+
mitems:
+
mmap:
+
mostCommon:
+
MovingStat:
+
mpairs:
+
mvalues:
+
nBin:
+
nInv:
+
normalized:
+
nsort:
+
nsortBy:
+
nsortByRaw:
+
nsortByTag:
+
nthKey:
+
nthPair:
+
numItems:
+
nUnique:
+
nUniqueErr:
+
Option:
+
orderFit:
+
OrderStats:
+
overflows:
+
pairs:
+
pmf:
+
pop:
+
pullDown:
+
push:
+
pushUp:
+
quantile:
+
raiseNotFound:
+
range:
+
reverseBits:
+
reverseBitsByte:
+
rightSize:
+
rightSz:
+
rotateLeftBits:
+
rotateRightBits:
+
save:
+
Scale:
+
scLog:
+
secureSalt:
+
SeqUint:
+
Set:
+
setCap:
+
setLen:
+
setOrIncl:
+
setPolicy:
+
skewness:
+
skewnessS:
+
space:
+
standardDeviation:
+
standardDeviationS:
+
stderror:
+
sum:
+
symmetricDifference:
+
Tab:
+
take:
+
toCnts:
+
toDITab:
+
toIx:
+
toLPTabz:
+
topByVal:
+
toSet:
+
toTab:
+
underflows:
+
union:
+
UniqCe:
+
values:
+
variance:
+
varianceS:
+
verb:
+
vmaddrSalt:
+
weight:
+
withIt:
+
withValue:
+
x86bmi2:
+
X86Feature:
+
x86features:
+
x86sse2:
+
x86ssse3:
+
xfFlt:
+
xfFltRev:
+
xfNone:
+
XForm:
+
xfRev:
+
xfSgn:
+
xfSgnRev:
+
zeroSalt:
+
+
+ +
+
+
+ + +