diff --git a/docs/_build/doctrees/catalog.doctree b/docs/_build/doctrees/catalog.doctree index 6bd26aa8..9e3a624c 100644 Binary files a/docs/_build/doctrees/catalog.doctree and b/docs/_build/doctrees/catalog.doctree differ diff --git a/docs/_build/doctrees/changes.doctree b/docs/_build/doctrees/changes.doctree index 5a20a187..9de34242 100644 Binary files a/docs/_build/doctrees/changes.doctree and b/docs/_build/doctrees/changes.doctree differ diff --git a/docs/_build/doctrees/correlation2.doctree b/docs/_build/doctrees/correlation2.doctree index f5ab9114..ee69422f 100644 Binary files a/docs/_build/doctrees/correlation2.doctree and b/docs/_build/doctrees/correlation2.doctree differ diff --git a/docs/_build/doctrees/correlation3.doctree b/docs/_build/doctrees/correlation3.doctree index 9d09185b..eae3c6df 100644 Binary files a/docs/_build/doctrees/correlation3.doctree and b/docs/_build/doctrees/correlation3.doctree differ diff --git a/docs/_build/doctrees/environment.pickle b/docs/_build/doctrees/environment.pickle index 0833781d..dd7ebc95 100644 Binary files a/docs/_build/doctrees/environment.pickle and b/docs/_build/doctrees/environment.pickle differ diff --git a/docs/_build/doctrees/field.doctree b/docs/_build/doctrees/field.doctree index c68d982e..d5c95d6b 100644 Binary files a/docs/_build/doctrees/field.doctree and b/docs/_build/doctrees/field.doctree differ diff --git a/docs/_build/doctrees/gg.doctree b/docs/_build/doctrees/gg.doctree index aaaacb59..833456a6 100644 Binary files a/docs/_build/doctrees/gg.doctree and b/docs/_build/doctrees/gg.doctree differ diff --git a/docs/_build/doctrees/ggg.doctree b/docs/_build/doctrees/ggg.doctree index 5e1a927e..99376b45 100644 Binary files a/docs/_build/doctrees/ggg.doctree and b/docs/_build/doctrees/ggg.doctree differ diff --git a/docs/_build/doctrees/kg.doctree b/docs/_build/doctrees/kg.doctree index fe7b6b87..c8d488e0 100644 Binary files a/docs/_build/doctrees/kg.doctree and b/docs/_build/doctrees/kg.doctree differ diff --git a/docs/_build/doctrees/kk.doctree b/docs/_build/doctrees/kk.doctree index ae517169..8b8df262 100644 Binary files a/docs/_build/doctrees/kk.doctree and b/docs/_build/doctrees/kk.doctree differ diff --git a/docs/_build/doctrees/kkk.doctree b/docs/_build/doctrees/kkk.doctree index 1604fbe2..9dc5ea85 100644 Binary files a/docs/_build/doctrees/kkk.doctree and b/docs/_build/doctrees/kkk.doctree differ diff --git a/docs/_build/doctrees/ng.doctree b/docs/_build/doctrees/ng.doctree index 607cf199..ee543311 100644 Binary files a/docs/_build/doctrees/ng.doctree and b/docs/_build/doctrees/ng.doctree differ diff --git a/docs/_build/doctrees/nk.doctree b/docs/_build/doctrees/nk.doctree index 955986e1..853cdc8f 100644 Binary files a/docs/_build/doctrees/nk.doctree and b/docs/_build/doctrees/nk.doctree differ diff --git a/docs/_build/doctrees/nn.doctree b/docs/_build/doctrees/nn.doctree index a7e111fc..93f50bfd 100644 Binary files a/docs/_build/doctrees/nn.doctree and b/docs/_build/doctrees/nn.doctree differ diff --git a/docs/_build/doctrees/nnn.doctree b/docs/_build/doctrees/nnn.doctree index cf706a75..88c76310 100644 Binary files a/docs/_build/doctrees/nnn.doctree and b/docs/_build/doctrees/nnn.doctree differ diff --git a/docs/_build/doctrees/scripts.doctree b/docs/_build/doctrees/scripts.doctree index f188cb82..c09c403f 100644 Binary files a/docs/_build/doctrees/scripts.doctree and b/docs/_build/doctrees/scripts.doctree differ diff --git a/docs/_build/html/.buildinfo b/docs/_build/html/.buildinfo index 9ff0078d..2c914605 100644 --- a/docs/_build/html/.buildinfo +++ b/docs/_build/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 608a98c24c9106aeb9bf24a56abdb7d0 +config: c965f9a7bf61bca5222122fdf899c1af tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/_build/html/_modules/index.html b/docs/_build/html/_modules/index.html index b4fdef5f..292635dc 100644 --- a/docs/_build/html/_modules/index.html +++ b/docs/_build/html/_modules/index.html @@ -7,7 +7,7 @@ -
# For now, ignore the metric. Just be conservative about how much space we need.
x1,y1,z1,s1 = c1._get_center_size()
x2,y2,z2,s2 = c2._get_center_size()
- d = ((x1-x2)**2 + (y1-y2)**2 + (z1-z2)**2)**0.5
- return (d > s1 + s2 + 2*self._max_sep) # The 2* is where we are being conservative.
+ return _lib.TriviallyZero(self.corr, self._d1, self._d2, self._bintype,
+ self._metric, self._coords,
+ x1, y1, z1, s1, x2, y2, z2, s2)
def _process_all_auto(self, cat1, metric, num_threads, comm, low_mem):
@@ -824,6 +825,7 @@ Source code for treecorr.binnedcorr2
else:
my_indices = None
+ self._set_metric(metric, cat1[0].coords)
temp = self.copy()
temp.results = {} # Don't mess up the original results
for ii,c1 in enumerate(cat1):
@@ -930,6 +932,7 @@ Source code for treecorr.binnedcorr2
else:
my_indices = None
+ self._set_metric(metric, cat1[0].coords, cat2[0].coords)
temp = self.copy()
temp.results = {} # Don't mess up the original results
for ii,c1 in enumerate(cat1):
diff --git a/docs/_build/html/_modules/treecorr/binnedcorr3.html b/docs/_build/html/_modules/treecorr/binnedcorr3.html
index 1179cb64..f8111d7d 100644
--- a/docs/_build/html/_modules/treecorr/binnedcorr3.html
+++ b/docs/_build/html/_modules/treecorr/binnedcorr3.html
@@ -7,7 +7,7 @@
- treecorr.binnedcorr3 — TreeCorr 4.2.3 documentation
+ treecorr.binnedcorr3 — TreeCorr 4.2.5 documentation
@@ -32,7 +32,6 @@
-
@@ -104,6 +103,7 @@
Changes from version 4.2.1 to 4.2.2
Changes from version 4.2.2 to 4.2.3
Changes from version 4.2.3 to 4.2.4
+Changes from version 4.2.4 to 4.2.5
Previous History
diff --git a/docs/_build/html/_modules/treecorr/catalog.html b/docs/_build/html/_modules/treecorr/catalog.html
index a4b9362b..5434cae8 100644
--- a/docs/_build/html/_modules/treecorr/catalog.html
+++ b/docs/_build/html/_modules/treecorr/catalog.html
@@ -7,7 +7,7 @@
- treecorr.catalog — TreeCorr 4.2.3 documentation
+ treecorr.catalog — TreeCorr 4.2.5 documentation
@@ -32,7 +32,6 @@
-
@@ -104,6 +103,7 @@
Changes from version 4.2.1 to 4.2.2
Changes from version 4.2.2 to 4.2.3
Changes from version 4.2.3 to 4.2.4
+Changes from version 4.2.4 to 4.2.5
Previous History
diff --git a/docs/_build/html/_modules/treecorr/config.html b/docs/_build/html/_modules/treecorr/config.html
index bb4c33a5..e42a612d 100644
--- a/docs/_build/html/_modules/treecorr/config.html
+++ b/docs/_build/html/_modules/treecorr/config.html
@@ -7,7 +7,7 @@
- treecorr.config — TreeCorr 4.2.3 documentation
+ treecorr.config — TreeCorr 4.2.5 documentation
@@ -32,7 +32,6 @@
-
@@ -104,6 +103,7 @@
Changes from version 4.2.1 to 4.2.2
Changes from version 4.2.2 to 4.2.3
Changes from version 4.2.3 to 4.2.4
+Changes from version 4.2.4 to 4.2.5
Previous History
diff --git a/docs/_build/html/_modules/treecorr/corr2.html b/docs/_build/html/_modules/treecorr/corr2.html
index c4c784a4..17de45f4 100644
--- a/docs/_build/html/_modules/treecorr/corr2.html
+++ b/docs/_build/html/_modules/treecorr/corr2.html
@@ -7,7 +7,7 @@
- treecorr.corr2 — TreeCorr 4.2.3 documentation
+ treecorr.corr2 — TreeCorr 4.2.5 documentation
@@ -32,7 +32,6 @@
-
@@ -104,6 +103,7 @@
Changes from version 4.2.1 to 4.2.2
Changes from version 4.2.2 to 4.2.3
Changes from version 4.2.3 to 4.2.4
+Changes from version 4.2.4 to 4.2.5
Previous History
diff --git a/docs/_build/html/_modules/treecorr/corr3.html b/docs/_build/html/_modules/treecorr/corr3.html
index 81b5ed1b..195620d6 100644
--- a/docs/_build/html/_modules/treecorr/corr3.html
+++ b/docs/_build/html/_modules/treecorr/corr3.html
@@ -7,7 +7,7 @@
- treecorr.corr3 — TreeCorr 4.2.3 documentation
+ treecorr.corr3 — TreeCorr 4.2.5 documentation
@@ -32,7 +32,6 @@
-
@@ -104,6 +103,7 @@
Changes from version 4.2.1 to 4.2.2
Changes from version 4.2.2 to 4.2.3
Changes from version 4.2.3 to 4.2.4
+Changes from version 4.2.4 to 4.2.5
Previous History
diff --git a/docs/_build/html/_modules/treecorr/field.html b/docs/_build/html/_modules/treecorr/field.html
index ab5f90cb..8d9c1260 100644
--- a/docs/_build/html/_modules/treecorr/field.html
+++ b/docs/_build/html/_modules/treecorr/field.html
@@ -7,7 +7,7 @@
- treecorr.field — TreeCorr 4.2.3 documentation
+ treecorr.field — TreeCorr 4.2.5 documentation
@@ -32,7 +32,6 @@
-
@@ -104,6 +103,7 @@
Changes from version 4.2.1 to 4.2.2
Changes from version 4.2.2 to 4.2.3
Changes from version 4.2.3 to 4.2.4
+Changes from version 4.2.4 to 4.2.5
Previous History
diff --git a/docs/_build/html/_modules/treecorr/ggcorrelation.html b/docs/_build/html/_modules/treecorr/ggcorrelation.html
index b1356b27..32cd5f99 100644
--- a/docs/_build/html/_modules/treecorr/ggcorrelation.html
+++ b/docs/_build/html/_modules/treecorr/ggcorrelation.html
@@ -7,7 +7,7 @@
- treecorr.ggcorrelation — TreeCorr 4.2.3 documentation
+ treecorr.ggcorrelation — TreeCorr 4.2.5 documentation
@@ -32,7 +32,6 @@
-
@@ -104,6 +103,7 @@
Changes from version 4.2.1 to 4.2.2
Changes from version 4.2.2 to 4.2.3
Changes from version 4.2.3 to 4.2.4
+Changes from version 4.2.4 to 4.2.5
Previous History
@@ -549,7 +549,7 @@ Source code for treecorr.ggcorrelation
self.max_sep == other.max_sep):
raise ValueError("GGCorrelation to be added is not compatible with this one.")
- self._set_metric(other.metric, other.coords)
+ self._set_metric(other.metric, other.coords, other.coords)
self.xip.ravel()[:] += other.xip.ravel()[:]
self.xim.ravel()[:] += other.xim.ravel()[:]
self.xip_im.ravel()[:] += other.xip_im.ravel()[:]
diff --git a/docs/_build/html/_modules/treecorr/gggcorrelation.html b/docs/_build/html/_modules/treecorr/gggcorrelation.html
index a1a36895..46e85927 100644
--- a/docs/_build/html/_modules/treecorr/gggcorrelation.html
+++ b/docs/_build/html/_modules/treecorr/gggcorrelation.html
@@ -7,7 +7,7 @@
- treecorr.gggcorrelation — TreeCorr 4.2.3 documentation
+ treecorr.gggcorrelation — TreeCorr 4.2.5 documentation
@@ -32,7 +32,6 @@
-
@@ -104,6 +103,7 @@
Changes from version 4.2.1 to 4.2.2
Changes from version 4.2.2 to 4.2.3
Changes from version 4.2.3 to 4.2.4
+Changes from version 4.2.4 to 4.2.5
Previous History
@@ -618,7 +618,7 @@ Source code for treecorr.gggcorrelation
self._finalize()
mask1 = self.weight != 0
mask2 = self.weight == 0
- self._var_num = varg1 * varg2 * varg3
+ self._var_num = 4 * varg1 * varg2 * varg3
self.cov = self.estimate_cov(self.var_method)
# Note: diagonal should be very close to pure real. So ok to just copy real part.
diag = self.cov.diagonal()
@@ -678,7 +678,7 @@ Source code for treecorr.gggcorrelation
raise ValueError("GGGCorrelation to be added is not compatible with this one.")
if not other.nonzero: return self
- self._set_metric(other.metric, other.coords)
+ self._set_metric(other.metric, other.coords, other.coords, other.coords)
self.gam0r[:] += other.gam0r[:]
self.gam0i[:] += other.gam0i[:]
self.gam1r[:] += other.gam1r[:]
@@ -1220,30 +1220,35 @@ Source code for treecorr.gggcorrelation
mcmm = T1.dot(gam1)
mmcm = T2.dot(gam2)
mmmc = T3.dot(gam3)
- varmmm = (np.abs(T0)**2).dot(vargam0)
- varmcmm = (np.abs(T1)**2).dot(vargam1)
- varmmcm = (np.abs(T2)**2).dot(vargam2)
- varmmmc = (np.abs(T3)**2).dot(vargam3)
+
+ # These accumulate the coefficients that are being dotted to gam0,1,2,3 respectively.
+ # Below, we will take the abs^2 and dot it to gam0,1,2,3 in each case to compute the
+ # total variance.
+ # Note: This assumes that gam0, gam1, gam2, gam3 have no covariance.
+ # This is not technically true, but I think it's approximately ok.
+ var0 = T0.copy()
+ var1 = T1.copy()
+ var2 = T2.copy()
+ var3 = T3.copy()
if k2 == 1 and k3 == 1:
mmm *= 6
- varmmm *= 6
mcmm += mmcm
mcmm += mmmc
mcmm *= 2
mmcm = mmmc = mcmm
- varmcmm += varmmcm
- varmcmm += varmmmc
- varmcmm *= 2
- varmmcm = varmmmc = varmcmm
+ var0 *= 6
+ var1 *= 6
+ var2 *= 6
+ var3 *= 6
else:
# Repeat the above for the other permutations
- for (_k1, _k2, _k3, _mcmm, _mmcm, _mmmc, _varmcmm, _varmmcm, _varmmmc) in [
- (1,k3,k2,mcmm,mmmc,mmcm,varmcmm,varmmmc,varmmcm),
- (k2,1,k3,mmcm,mcmm,mmmc,varmmcm,varmcmm,varmmmc),
- (k2,k3,1,mmcm,mmmc,mcmm,varmmcm,varmmmc,varmcmm),
- (k3,1,k2,mmmc,mcmm,mmcm,varmmmc,varmcmm,varmmcm),
- (k3,k2,1,mmmc,mmcm,mcmm,varmmmc,varmmcm,varmcmm) ]:
+ for (_k1, _k2, _k3, _mcmm, _mmcm, _mmmc) in [
+ (1,k3,k2,mcmm,mmmc,mmcm),
+ (k2,1,k3,mmcm,mcmm,mmmc),
+ (k2,k3,1,mmcm,mmmc,mcmm),
+ (k3,1,k2,mmmc,mcmm,mmcm),
+ (k3,k2,1,mmmc,mmcm,mcmm) ]:
T0, T1, T2, T3 = self._calculateT(s,t,_k1,_k2,_k3)
T0 *= sds * d2t
T1 *= sds * d2t
@@ -1254,10 +1259,10 @@ Source code for treecorr.gggcorrelation
_mcmm += T1.dot(gam1)
_mmcm += T2.dot(gam2)
_mmmc += T3.dot(gam3)
- varmmm += (np.abs(T0)**2).dot(vargam0)
- _varmcmm += (np.abs(T1)**2).dot(vargam1)
- _varmmcm += (np.abs(T2)**2).dot(vargam2)
- _varmmmc += (np.abs(T3)**2).dot(vargam3)
+ var0 += T0
+ var1 += T1
+ var2 += T2
+ var3 += T3
map3 = 0.25 * np.real(mcmm + mmcm + mmmc + mmm)
mapmapmx = 0.25 * np.imag(mcmm + mmcm - mmmc + mmm)
@@ -1268,7 +1273,16 @@ Source code for treecorr.gggcorrelation
mapmxmx = 0.25 * np.real(-mcmm + mmcm + mmmc - mmm)
mx3 = 0.25 * np.imag(mcmm + mmcm + mmmc - mmm)
- var = (varmcmm + varmmcm + varmmmc + varmmm) / 16.
+ var0 /= 4
+ var1 /= 4
+ var2 /= 4
+ var3 /= 4
+
+ # Now finally add up the coefficient squared times each vargam element.
+ var = np.abs(var0**2).dot(vargam0)
+ var += np.abs(var1**2).dot(vargam1)
+ var += np.abs(var2**2).dot(vargam2)
+ var += np.abs(var3**2).dot(vargam3)
return map3, mapmapmx, mapmxmap, mxmapmap, mxmxmap, mxmapmx, mapmxmx, mx3, var
@@ -1338,7 +1352,7 @@ Source code for treecorr.gggcorrelation
Therefore, this class holds 6 instances of `GGGCorrelation`, which in turn hold the
information about triangles in each of the relevant configurations. We name these:
- Attribute:
+ Attributes:
g1g2g3: Triangles where G1 is opposite d1, G2 is opposite d2, G3 is opposite d3.
g1g3g2: Triangles where G1 is opposite d1, G3 is opposite d2, G2 is opposite d3.
g2g1g3: Triangles where G2 is opposite d1, G1 is opposite d2, G3 is opposite d3.
diff --git a/docs/_build/html/_modules/treecorr/kgcorrelation.html b/docs/_build/html/_modules/treecorr/kgcorrelation.html
index 610c6767..51002c91 100644
--- a/docs/_build/html/_modules/treecorr/kgcorrelation.html
+++ b/docs/_build/html/_modules/treecorr/kgcorrelation.html
@@ -7,7 +7,7 @@
- treecorr.kgcorrelation — TreeCorr 4.2.3 documentation
+ treecorr.kgcorrelation — TreeCorr 4.2.5 documentation
@@ -32,7 +32,6 @@
-
@@ -104,6 +103,7 @@
Changes from version 4.2.1 to 4.2.2
Changes from version 4.2.2 to 4.2.3
Changes from version 4.2.3 to 4.2.4
+Changes from version 4.2.4 to 4.2.5
Previous History
@@ -490,7 +490,7 @@ Source code for treecorr.kgcorrelation
self.max_sep == other.max_sep):
raise ValueError("KGCorrelation to be added is not compatible with this one.")
- self._set_metric(other.metric, other.coords)
+ self._set_metric(other.metric, other.coords, other.coords)
self.xi.ravel()[:] += other.xi.ravel()[:]
self.xi_im.ravel()[:] += other.xi_im.ravel()[:]
self.meanr.ravel()[:] += other.meanr.ravel()[:]
diff --git a/docs/_build/html/_modules/treecorr/kkcorrelation.html b/docs/_build/html/_modules/treecorr/kkcorrelation.html
index e4e4c7f2..378970bd 100644
--- a/docs/_build/html/_modules/treecorr/kkcorrelation.html
+++ b/docs/_build/html/_modules/treecorr/kkcorrelation.html
@@ -7,7 +7,7 @@
- treecorr.kkcorrelation — TreeCorr 4.2.3 documentation
+ treecorr.kkcorrelation — TreeCorr 4.2.5 documentation
@@ -32,7 +32,6 @@
-
@@ -104,6 +103,7 @@
Changes from version 4.2.1 to 4.2.2
Changes from version 4.2.2 to 4.2.3
Changes from version 4.2.3 to 4.2.4
+Changes from version 4.2.4 to 4.2.5
Previous History
@@ -518,7 +518,7 @@ Source code for treecorr.kkcorrelation
self.max_sep == other.max_sep):
raise ValueError("KKCorrelation to be added is not compatible with this one.")
- self._set_metric(other.metric, other.coords)
+ self._set_metric(other.metric, other.coords, other.coords)
self.xi.ravel()[:] += other.xi.ravel()[:]
self.meanr.ravel()[:] += other.meanr.ravel()[:]
self.meanlogr.ravel()[:] += other.meanlogr.ravel()[:]
diff --git a/docs/_build/html/_modules/treecorr/kkkcorrelation.html b/docs/_build/html/_modules/treecorr/kkkcorrelation.html
index 7407737a..f0fae572 100644
--- a/docs/_build/html/_modules/treecorr/kkkcorrelation.html
+++ b/docs/_build/html/_modules/treecorr/kkkcorrelation.html
@@ -7,7 +7,7 @@
- treecorr.kkkcorrelation — TreeCorr 4.2.3 documentation
+ treecorr.kkkcorrelation — TreeCorr 4.2.5 documentation
@@ -32,7 +32,6 @@
-
@@ -104,6 +103,7 @@
Changes from version 4.2.1 to 4.2.2
Changes from version 4.2.2 to 4.2.3
Changes from version 4.2.3 to 4.2.4
+Changes from version 4.2.4 to 4.2.5
Previous History
@@ -582,7 +582,7 @@ Source code for treecorr.kkkcorrelation
raise ValueError("KKKCorrelation to be added is not compatible with this one.")
if not other.nonzero: return self
- self._set_metric(other.metric, other.coords)
+ self._set_metric(other.metric, other.coords, other.coords, other.coords)
self.zeta[:] += other.zeta[:]
self.meand1[:] += other.meand1[:]
self.meanlogd1[:] += other.meanlogd1[:]
@@ -832,7 +832,7 @@ Source code for treecorr.kkkcorrelation
Therefore, this class holds 6 instances of `KKKCorrelation`, which in turn hold the
information about triangles in each of the relevant configurations. We name these:
- Attribute:
+ Attributes:
k1k2k3: Triangles where K1 is opposite d1, K2 is opposite d2, K3 is opposite d3.
k1k3k2: Triangles where K1 is opposite d1, K3 is opposite d2, K2 is opposite d3.
k2k1k3: Triangles where K2 is opposite d1, K1 is opposite d2, K3 is opposite d3.
diff --git a/docs/_build/html/_modules/treecorr/ngcorrelation.html b/docs/_build/html/_modules/treecorr/ngcorrelation.html
index 3cf362a5..a1b37886 100644
--- a/docs/_build/html/_modules/treecorr/ngcorrelation.html
+++ b/docs/_build/html/_modules/treecorr/ngcorrelation.html
@@ -7,7 +7,7 @@
- treecorr.ngcorrelation — TreeCorr 4.2.3 documentation
+ treecorr.ngcorrelation — TreeCorr 4.2.5 documentation
@@ -32,7 +32,6 @@
-
@@ -104,6 +103,7 @@
Changes from version 4.2.1 to 4.2.2
Changes from version 4.2.2 to 4.2.3
Changes from version 4.2.3 to 4.2.4
+Changes from version 4.2.4 to 4.2.5
Previous History
@@ -509,7 +509,7 @@ Source code for treecorr.ngcorrelation
self.max_sep == other.max_sep):
raise ValueError("NGCorrelation to be added is not compatible with this one.")
- self._set_metric(other.metric, other.coords)
+ self._set_metric(other.metric, other.coords, other.coords)
self.raw_xi.ravel()[:] += other.raw_xi.ravel()[:]
self.raw_xi_im.ravel()[:] += other.raw_xi_im.ravel()[:]
self.meanr.ravel()[:] += other.meanr.ravel()[:]
diff --git a/docs/_build/html/_modules/treecorr/nkcorrelation.html b/docs/_build/html/_modules/treecorr/nkcorrelation.html
index 504ffa31..a95232c5 100644
--- a/docs/_build/html/_modules/treecorr/nkcorrelation.html
+++ b/docs/_build/html/_modules/treecorr/nkcorrelation.html
@@ -7,7 +7,7 @@
- treecorr.nkcorrelation — TreeCorr 4.2.3 documentation
+ treecorr.nkcorrelation — TreeCorr 4.2.5 documentation
@@ -32,7 +32,6 @@
-
@@ -104,6 +103,7 @@
Changes from version 4.2.1 to 4.2.2
Changes from version 4.2.2 to 4.2.3
Changes from version 4.2.3 to 4.2.4
+Changes from version 4.2.4 to 4.2.5
Previous History
@@ -501,7 +501,7 @@ Source code for treecorr.nkcorrelation
self.max_sep == other.max_sep):
raise ValueError("NKCorrelation to be added is not compatible with this one.")
- self._set_metric(other.metric, other.coords)
+ self._set_metric(other.metric, other.coords, other.coords)
self.raw_xi.ravel()[:] += other.raw_xi.ravel()[:]
self.meanr.ravel()[:] += other.meanr.ravel()[:]
self.meanlogr.ravel()[:] += other.meanlogr.ravel()[:]
diff --git a/docs/_build/html/_modules/treecorr/nncorrelation.html b/docs/_build/html/_modules/treecorr/nncorrelation.html
index 5aca277b..8c153fd5 100644
--- a/docs/_build/html/_modules/treecorr/nncorrelation.html
+++ b/docs/_build/html/_modules/treecorr/nncorrelation.html
@@ -7,7 +7,7 @@
- treecorr.nncorrelation — TreeCorr 4.2.3 documentation
+ treecorr.nncorrelation — TreeCorr 4.2.5 documentation
@@ -32,7 +32,6 @@
-
@@ -104,6 +103,7 @@
Changes from version 4.2.1 to 4.2.2
Changes from version 4.2.2 to 4.2.3
Changes from version 4.2.3 to 4.2.4
+Changes from version 4.2.4 to 4.2.5
Previous History
@@ -537,7 +537,7 @@ Source code for treecorr.nncorrelation
self.max_sep == other.max_sep):
raise ValueError("NNCorrelation to be added is not compatible with this one.")
- self._set_metric(other.metric, other.coords)
+ self._set_metric(other.metric, other.coords, other.coords)
self.meanr.ravel()[:] += other.meanr.ravel()[:]
self.meanlogr.ravel()[:] += other.meanlogr.ravel()[:]
self.weight.ravel()[:] += other.weight.ravel()[:]
diff --git a/docs/_build/html/_modules/treecorr/nnncorrelation.html b/docs/_build/html/_modules/treecorr/nnncorrelation.html
index 39cd1641..54475324 100644
--- a/docs/_build/html/_modules/treecorr/nnncorrelation.html
+++ b/docs/_build/html/_modules/treecorr/nnncorrelation.html
@@ -7,7 +7,7 @@
- treecorr.nnncorrelation — TreeCorr 4.2.3 documentation
+ treecorr.nnncorrelation — TreeCorr 4.2.5 documentation
@@ -32,7 +32,6 @@
-
@@ -104,6 +103,7 @@
Changes from version 4.2.1 to 4.2.2
Changes from version 4.2.2 to 4.2.3
Changes from version 4.2.3 to 4.2.4
+Changes from version 4.2.4 to 4.2.5
Previous History
@@ -640,7 +640,7 @@ Source code for treecorr.nnncorrelation
self.max_v == other.max_v):
raise ValueError("NNNCorrelation to be added is not compatible with this one.")
- self._set_metric(other.metric, other.coords)
+ self._set_metric(other.metric, other.coords, other.coords, other.coords)
self.tot += other.tot
# If other is empty, then we're done now.
@@ -1141,7 +1141,7 @@ Source code for treecorr.nnncorrelation
Therefore, this class holds 6 instances of `NNNCorrelation`, which in turn hold the
information about triangles in each of the relevant configurations. We name these:
- Attribute:
+ Attributes:
n1n2n3: Triangles where N1 is opposite d1, N2 is opposite d2, N3 is opposite d3.
n1n3n2: Triangles where N1 is opposite d1, N3 is opposite d2, N2 is opposite d3.
n2n1n3: Triangles where N2 is opposite d1, N1 is opposite d2, N3 is opposite d3.
diff --git a/docs/_build/html/_modules/treecorr/reader.html b/docs/_build/html/_modules/treecorr/reader.html
index 6f07a497..a3cd6f74 100644
--- a/docs/_build/html/_modules/treecorr/reader.html
+++ b/docs/_build/html/_modules/treecorr/reader.html
@@ -7,7 +7,7 @@
- treecorr.reader — TreeCorr 4.2.3 documentation
+ treecorr.reader — TreeCorr 4.2.5 documentation
@@ -32,7 +32,6 @@
-
@@ -104,6 +103,7 @@
Changes from version 4.2.1 to 4.2.2
Changes from version 4.2.2 to 4.2.3
Changes from version 4.2.3 to 4.2.4
+Changes from version 4.2.4 to 4.2.5
Previous History
diff --git a/docs/_build/html/_static/basic.css b/docs/_build/html/_static/basic.css
index be19270e..b3bdc004 100644
--- a/docs/_build/html/_static/basic.css
+++ b/docs/_build/html/_static/basic.css
@@ -277,25 +277,25 @@ p.rubric {
font-weight: bold;
}
-img.align-left, .figure.align-left, object.align-left {
+img.align-left, figure.align-left, .figure.align-left, object.align-left {
clear: left;
float: left;
margin-right: 1em;
}
-img.align-right, .figure.align-right, object.align-right {
+img.align-right, figure.align-right, .figure.align-right, object.align-right {
clear: right;
float: right;
margin-left: 1em;
}
-img.align-center, .figure.align-center, object.align-center {
+img.align-center, figure.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
-img.align-default, .figure.align-default {
+img.align-default, figure.align-default, .figure.align-default {
display: block;
margin-left: auto;
margin-right: auto;
@@ -319,7 +319,8 @@ img.align-default, .figure.align-default {
/* -- sidebars -------------------------------------------------------------- */
-div.sidebar {
+div.sidebar,
+aside.sidebar {
margin: 0 0 0.5em 1em;
border: 1px solid #ddb;
padding: 7px;
@@ -377,12 +378,14 @@ div.body p.centered {
/* -- content of sidebars/topics/admonitions -------------------------------- */
div.sidebar > :last-child,
+aside.sidebar > :last-child,
div.topic > :last-child,
div.admonition > :last-child {
margin-bottom: 0;
}
div.sidebar::after,
+aside.sidebar::after,
div.topic::after,
div.admonition::after,
blockquote::after {
@@ -455,20 +458,22 @@ td > :last-child {
/* -- figures --------------------------------------------------------------- */
-div.figure {
+div.figure, figure {
margin: 0.5em;
padding: 0.5em;
}
-div.figure p.caption {
+div.figure p.caption, figcaption {
padding: 0.3em;
}
-div.figure p.caption span.caption-number {
+div.figure p.caption span.caption-number,
+figcaption span.caption-number {
font-style: italic;
}
-div.figure p.caption span.caption-text {
+div.figure p.caption span.caption-text,
+figcaption span.caption-text {
}
/* -- field list styles ----------------------------------------------------- */
diff --git a/docs/_build/html/_static/doctools.js b/docs/_build/html/_static/doctools.js
index 144884ea..61ac9d26 100644
--- a/docs/_build/html/_static/doctools.js
+++ b/docs/_build/html/_static/doctools.js
@@ -29,9 +29,14 @@ if (!window.console || !console.firebug) {
/**
* small helper function to urldecode strings
+ *
+ * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
*/
jQuery.urldecode = function(x) {
- return decodeURIComponent(x).replace(/\+/g, ' ');
+ if (!x) {
+ return x
+ }
+ return decodeURIComponent(x.replace(/\+/g, ' '));
};
/**
diff --git a/docs/_build/html/_static/documentation_options.js b/docs/_build/html/_static/documentation_options.js
index 52a86131..15a42b71 100644
--- a/docs/_build/html/_static/documentation_options.js
+++ b/docs/_build/html/_static/documentation_options.js
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
- VERSION: '4.2.3',
+ VERSION: '4.2.5',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
BUILDER: 'html',
diff --git a/docs/_build/html/_static/fonts/Lato/lato-bold.eot b/docs/_build/html/_static/fonts/Lato/lato-bold.eot
new file mode 100644
index 00000000..3361183a
Binary files /dev/null and b/docs/_build/html/_static/fonts/Lato/lato-bold.eot differ
diff --git a/docs/_build/html/_static/fonts/Lato/lato-bold.ttf b/docs/_build/html/_static/fonts/Lato/lato-bold.ttf
new file mode 100644
index 00000000..29f691d5
Binary files /dev/null and b/docs/_build/html/_static/fonts/Lato/lato-bold.ttf differ
diff --git a/docs/_build/html/_static/fonts/Lato/lato-bold.woff b/docs/_build/html/_static/fonts/Lato/lato-bold.woff
new file mode 100644
index 00000000..c6dff51f
Binary files /dev/null and b/docs/_build/html/_static/fonts/Lato/lato-bold.woff differ
diff --git a/docs/_build/html/_static/fonts/Lato/lato-bold.woff2 b/docs/_build/html/_static/fonts/Lato/lato-bold.woff2
new file mode 100644
index 00000000..bb195043
Binary files /dev/null and b/docs/_build/html/_static/fonts/Lato/lato-bold.woff2 differ
diff --git a/docs/_build/html/_static/fonts/Lato/lato-bolditalic.eot b/docs/_build/html/_static/fonts/Lato/lato-bolditalic.eot
new file mode 100644
index 00000000..3d415493
Binary files /dev/null and b/docs/_build/html/_static/fonts/Lato/lato-bolditalic.eot differ
diff --git a/docs/_build/html/_static/fonts/Lato/lato-bolditalic.ttf b/docs/_build/html/_static/fonts/Lato/lato-bolditalic.ttf
new file mode 100644
index 00000000..f402040b
Binary files /dev/null and b/docs/_build/html/_static/fonts/Lato/lato-bolditalic.ttf differ
diff --git a/docs/_build/html/_static/fonts/Lato/lato-bolditalic.woff b/docs/_build/html/_static/fonts/Lato/lato-bolditalic.woff
new file mode 100644
index 00000000..88ad05b9
Binary files /dev/null and b/docs/_build/html/_static/fonts/Lato/lato-bolditalic.woff differ
diff --git a/docs/_build/html/_static/fonts/Lato/lato-bolditalic.woff2 b/docs/_build/html/_static/fonts/Lato/lato-bolditalic.woff2
new file mode 100644
index 00000000..c4e3d804
Binary files /dev/null and b/docs/_build/html/_static/fonts/Lato/lato-bolditalic.woff2 differ
diff --git a/docs/_build/html/_static/fonts/Lato/lato-italic.eot b/docs/_build/html/_static/fonts/Lato/lato-italic.eot
new file mode 100644
index 00000000..3f826421
Binary files /dev/null and b/docs/_build/html/_static/fonts/Lato/lato-italic.eot differ
diff --git a/docs/_build/html/_static/fonts/Lato/lato-italic.ttf b/docs/_build/html/_static/fonts/Lato/lato-italic.ttf
new file mode 100644
index 00000000..b4bfc9b2
Binary files /dev/null and b/docs/_build/html/_static/fonts/Lato/lato-italic.ttf differ
diff --git a/docs/_build/html/_static/fonts/Lato/lato-italic.woff b/docs/_build/html/_static/fonts/Lato/lato-italic.woff
new file mode 100644
index 00000000..76114bc0
Binary files /dev/null and b/docs/_build/html/_static/fonts/Lato/lato-italic.woff differ
diff --git a/docs/_build/html/_static/fonts/Lato/lato-italic.woff2 b/docs/_build/html/_static/fonts/Lato/lato-italic.woff2
new file mode 100644
index 00000000..3404f37e
Binary files /dev/null and b/docs/_build/html/_static/fonts/Lato/lato-italic.woff2 differ
diff --git a/docs/_build/html/_static/fonts/Lato/lato-regular.eot b/docs/_build/html/_static/fonts/Lato/lato-regular.eot
new file mode 100644
index 00000000..11e3f2a5
Binary files /dev/null and b/docs/_build/html/_static/fonts/Lato/lato-regular.eot differ
diff --git a/docs/_build/html/_static/fonts/Lato/lato-regular.ttf b/docs/_build/html/_static/fonts/Lato/lato-regular.ttf
new file mode 100644
index 00000000..74decd9e
Binary files /dev/null and b/docs/_build/html/_static/fonts/Lato/lato-regular.ttf differ
diff --git a/docs/_build/html/_static/fonts/Lato/lato-regular.woff b/docs/_build/html/_static/fonts/Lato/lato-regular.woff
new file mode 100644
index 00000000..ae1307ff
Binary files /dev/null and b/docs/_build/html/_static/fonts/Lato/lato-regular.woff differ
diff --git a/docs/_build/html/_static/fonts/Lato/lato-regular.woff2 b/docs/_build/html/_static/fonts/Lato/lato-regular.woff2
new file mode 100644
index 00000000..3bf98433
Binary files /dev/null and b/docs/_build/html/_static/fonts/Lato/lato-regular.woff2 differ
diff --git a/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot b/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot
new file mode 100644
index 00000000..79dc8efe
Binary files /dev/null and b/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot differ
diff --git a/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf b/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf
new file mode 100644
index 00000000..df5d1df2
Binary files /dev/null and b/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf differ
diff --git a/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff b/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff
new file mode 100644
index 00000000..6cb60000
Binary files /dev/null and b/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff differ
diff --git a/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 b/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2
new file mode 100644
index 00000000..7059e231
Binary files /dev/null and b/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 differ
diff --git a/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot b/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot
new file mode 100644
index 00000000..2f7ca78a
Binary files /dev/null and b/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot differ
diff --git a/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf b/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf
new file mode 100644
index 00000000..eb52a790
Binary files /dev/null and b/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf differ
diff --git a/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff b/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff
new file mode 100644
index 00000000..f815f63f
Binary files /dev/null and b/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff differ
diff --git a/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 b/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2
new file mode 100644
index 00000000..f2c76e5b
Binary files /dev/null and b/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 differ
diff --git a/docs/_build/html/_static/language_data.js b/docs/_build/html/_static/language_data.js
index 0e7dc7e9..863704b3 100644
--- a/docs/_build/html/_static/language_data.js
+++ b/docs/_build/html/_static/language_data.js
@@ -13,7 +13,8 @@
var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
-/* Non-minified version JS is _stemmer.js if file is provided */
+/* Non-minified version is copied as a separate JS file, is available */
+
/**
* Porter Stemmer
*/
@@ -199,7 +200,6 @@ var Stemmer = function() {
-
var splitChars = (function() {
var result = {};
var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648,
diff --git a/docs/_build/html/_static/searchtools.js b/docs/_build/html/_static/searchtools.js
index 6fc9e7f3..1a90152e 100644
--- a/docs/_build/html/_static/searchtools.js
+++ b/docs/_build/html/_static/searchtools.js
@@ -248,7 +248,7 @@ var Search = {
// results left, load the summary and display it
if (results.length) {
var item = results.pop();
- var listItem = $('');
+ var listItem = $('');
var requestUrl = "";
var linkUrl = "";
if (DOCUMENTATION_OPTIONS.BUILDER === 'dirhtml') {
@@ -273,9 +273,9 @@ var Search = {
if (item[3]) {
listItem.append($(' (' + item[3] + ')'));
Search.output.append(listItem);
- listItem.slideDown(5, function() {
+ setTimeout(function() {
displayNextItem();
- });
+ }, 5);
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
$.ajax({url: requestUrl,
dataType: "text",
@@ -285,16 +285,16 @@ var Search = {
listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
}
Search.output.append(listItem);
- listItem.slideDown(5, function() {
+ setTimeout(function() {
displayNextItem();
- });
+ }, 5);
}});
} else {
// no source available, just display title
Search.output.append(listItem);
- listItem.slideDown(5, function() {
+ setTimeout(function() {
displayNextItem();
- });
+ }, 5);
}
}
// search finished, update title and status message
@@ -379,6 +379,13 @@ var Search = {
return results;
},
+ /**
+ * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
+ */
+ escapeRegExp : function(string) {
+ return string.replace(/[.*+\-?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
+ },
+
/**
* search for full-text terms in the index
*/
@@ -402,13 +409,14 @@ var Search = {
];
// add support for partial matches
if (word.length > 2) {
+ var word_regex = this.escapeRegExp(word);
for (var w in terms) {
- if (w.match(word) && !terms[word]) {
+ if (w.match(word_regex) && !terms[word]) {
_o.push({files: terms[w], score: Scorer.partialTerm})
}
}
for (var w in titleterms) {
- if (w.match(word) && !titleterms[word]) {
+ if (w.match(word_regex) && !titleterms[word]) {
_o.push({files: titleterms[w], score: Scorer.partialTitle})
}
}
diff --git a/docs/_build/html/_static/underscore-1.12.0.js b/docs/_build/html/_static/underscore-1.12.0.js
new file mode 100644
index 00000000..3af6352e
--- /dev/null
+++ b/docs/_build/html/_static/underscore-1.12.0.js
@@ -0,0 +1,2027 @@
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+ typeof define === 'function' && define.amd ? define('underscore', factory) :
+ (global = global || self, (function () {
+ var current = global._;
+ var exports = global._ = factory();
+ exports.noConflict = function () { global._ = current; return exports; };
+ }()));
+}(this, (function () {
+ // Underscore.js 1.12.0
+ // https://underscorejs.org
+ // (c) 2009-2020 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ // Underscore may be freely distributed under the MIT license.
+
+ // Current version.
+ var VERSION = '1.12.0';
+
+ // Establish the root object, `window` (`self`) in the browser, `global`
+ // on the server, or `this` in some virtual machines. We use `self`
+ // instead of `window` for `WebWorker` support.
+ var root = typeof self == 'object' && self.self === self && self ||
+ typeof global == 'object' && global.global === global && global ||
+ Function('return this')() ||
+ {};
+
+ // Save bytes in the minified (but not gzipped) version:
+ var ArrayProto = Array.prototype, ObjProto = Object.prototype;
+ var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;
+
+ // Create quick reference variables for speed access to core prototypes.
+ var push = ArrayProto.push,
+ slice = ArrayProto.slice,
+ toString = ObjProto.toString,
+ hasOwnProperty = ObjProto.hasOwnProperty;
+
+ // Modern feature detection.
+ var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined',
+ supportsDataView = typeof DataView !== 'undefined';
+
+ // All **ECMAScript 5+** native function implementations that we hope to use
+ // are declared here.
+ var nativeIsArray = Array.isArray,
+ nativeKeys = Object.keys,
+ nativeCreate = Object.create,
+ nativeIsView = supportsArrayBuffer && ArrayBuffer.isView;
+
+ // Create references to these builtin functions because we override them.
+ var _isNaN = isNaN,
+ _isFinite = isFinite;
+
+ // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.
+ var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');
+ var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
+ 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
+
+ // The largest integer that can be represented exactly.
+ var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;
+
+ // Some functions take a variable number of arguments, or a few expected
+ // arguments at the beginning and then a variable number of values to operate
+ // on. This helper accumulates all remaining arguments past the function’s
+ // argument length (or an explicit `startIndex`), into an array that becomes
+ // the last argument. Similar to ES6’s "rest parameter".
+ function restArguments(func, startIndex) {
+ startIndex = startIndex == null ? func.length - 1 : +startIndex;
+ return function() {
+ var length = Math.max(arguments.length - startIndex, 0),
+ rest = Array(length),
+ index = 0;
+ for (; index < length; index++) {
+ rest[index] = arguments[index + startIndex];
+ }
+ switch (startIndex) {
+ case 0: return func.call(this, rest);
+ case 1: return func.call(this, arguments[0], rest);
+ case 2: return func.call(this, arguments[0], arguments[1], rest);
+ }
+ var args = Array(startIndex + 1);
+ for (index = 0; index < startIndex; index++) {
+ args[index] = arguments[index];
+ }
+ args[startIndex] = rest;
+ return func.apply(this, args);
+ };
+ }
+
+ // Is a given variable an object?
+ function isObject(obj) {
+ var type = typeof obj;
+ return type === 'function' || type === 'object' && !!obj;
+ }
+
+ // Is a given value equal to null?
+ function isNull(obj) {
+ return obj === null;
+ }
+
+ // Is a given variable undefined?
+ function isUndefined(obj) {
+ return obj === void 0;
+ }
+
+ // Is a given value a boolean?
+ function isBoolean(obj) {
+ return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
+ }
+
+ // Is a given value a DOM element?
+ function isElement(obj) {
+ return !!(obj && obj.nodeType === 1);
+ }
+
+ // Internal function for creating a `toString`-based type tester.
+ function tagTester(name) {
+ var tag = '[object ' + name + ']';
+ return function(obj) {
+ return toString.call(obj) === tag;
+ };
+ }
+
+ var isString = tagTester('String');
+
+ var isNumber = tagTester('Number');
+
+ var isDate = tagTester('Date');
+
+ var isRegExp = tagTester('RegExp');
+
+ var isError = tagTester('Error');
+
+ var isSymbol = tagTester('Symbol');
+
+ var isArrayBuffer = tagTester('ArrayBuffer');
+
+ var isFunction = tagTester('Function');
+
+ // Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old
+ // v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).
+ var nodelist = root.document && root.document.childNodes;
+ if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {
+ isFunction = function(obj) {
+ return typeof obj == 'function' || false;
+ };
+ }
+
+ var isFunction$1 = isFunction;
+
+ var hasObjectTag = tagTester('Object');
+
+ // In IE 10 - Edge 13, `DataView` has string tag `'[object Object]'`.
+ // In IE 11, the most common among them, this problem also applies to
+ // `Map`, `WeakMap` and `Set`.
+ var hasStringTagBug = (
+ supportsDataView && hasObjectTag(new DataView(new ArrayBuffer(8)))
+ ),
+ isIE11 = (typeof Map !== 'undefined' && hasObjectTag(new Map));
+
+ var isDataView = tagTester('DataView');
+
+ // In IE 10 - Edge 13, we need a different heuristic
+ // to determine whether an object is a `DataView`.
+ function ie10IsDataView(obj) {
+ return obj != null && isFunction$1(obj.getInt8) && isArrayBuffer(obj.buffer);
+ }
+
+ var isDataView$1 = (hasStringTagBug ? ie10IsDataView : isDataView);
+
+ // Is a given value an array?
+ // Delegates to ECMA5's native `Array.isArray`.
+ var isArray = nativeIsArray || tagTester('Array');
+
+ // Internal function to check whether `key` is an own property name of `obj`.
+ function has(obj, key) {
+ return obj != null && hasOwnProperty.call(obj, key);
+ }
+
+ var isArguments = tagTester('Arguments');
+
+ // Define a fallback version of the method in browsers (ahem, IE < 9), where
+ // there isn't any inspectable "Arguments" type.
+ (function() {
+ if (!isArguments(arguments)) {
+ isArguments = function(obj) {
+ return has(obj, 'callee');
+ };
+ }
+ }());
+
+ var isArguments$1 = isArguments;
+
+ // Is a given object a finite number?
+ function isFinite$1(obj) {
+ return !isSymbol(obj) && _isFinite(obj) && !isNaN(parseFloat(obj));
+ }
+
+ // Is the given value `NaN`?
+ function isNaN$1(obj) {
+ return isNumber(obj) && _isNaN(obj);
+ }
+
+ // Predicate-generating function. Often useful outside of Underscore.
+ function constant(value) {
+ return function() {
+ return value;
+ };
+ }
+
+ // Common internal logic for `isArrayLike` and `isBufferLike`.
+ function createSizePropertyCheck(getSizeProperty) {
+ return function(collection) {
+ var sizeProperty = getSizeProperty(collection);
+ return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;
+ }
+ }
+
+ // Internal helper to generate a function to obtain property `key` from `obj`.
+ function shallowProperty(key) {
+ return function(obj) {
+ return obj == null ? void 0 : obj[key];
+ };
+ }
+
+ // Internal helper to obtain the `byteLength` property of an object.
+ var getByteLength = shallowProperty('byteLength');
+
+ // Internal helper to determine whether we should spend extensive checks against
+ // `ArrayBuffer` et al.
+ var isBufferLike = createSizePropertyCheck(getByteLength);
+
+ // Is a given value a typed array?
+ var typedArrayPattern = /\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;
+ function isTypedArray(obj) {
+ // `ArrayBuffer.isView` is the most future-proof, so use it when available.
+ // Otherwise, fall back on the above regular expression.
+ return nativeIsView ? (nativeIsView(obj) && !isDataView$1(obj)) :
+ isBufferLike(obj) && typedArrayPattern.test(toString.call(obj));
+ }
+
+ var isTypedArray$1 = supportsArrayBuffer ? isTypedArray : constant(false);
+
+ // Internal helper to obtain the `length` property of an object.
+ var getLength = shallowProperty('length');
+
+ // Internal helper to create a simple lookup structure.
+ // `collectNonEnumProps` used to depend on `_.contains`, but this led to
+ // circular imports. `emulatedSet` is a one-off solution that only works for
+ // arrays of strings.
+ function emulatedSet(keys) {
+ var hash = {};
+ for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true;
+ return {
+ contains: function(key) { return hash[key]; },
+ push: function(key) {
+ hash[key] = true;
+ return keys.push(key);
+ }
+ };
+ }
+
+ // Internal helper. Checks `keys` for the presence of keys in IE < 9 that won't
+ // be iterated by `for key in ...` and thus missed. Extends `keys` in place if
+ // needed.
+ function collectNonEnumProps(obj, keys) {
+ keys = emulatedSet(keys);
+ var nonEnumIdx = nonEnumerableProps.length;
+ var constructor = obj.constructor;
+ var proto = isFunction$1(constructor) && constructor.prototype || ObjProto;
+
+ // Constructor is a special case.
+ var prop = 'constructor';
+ if (has(obj, prop) && !keys.contains(prop)) keys.push(prop);
+
+ while (nonEnumIdx--) {
+ prop = nonEnumerableProps[nonEnumIdx];
+ if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) {
+ keys.push(prop);
+ }
+ }
+ }
+
+ // Retrieve the names of an object's own properties.
+ // Delegates to **ECMAScript 5**'s native `Object.keys`.
+ function keys(obj) {
+ if (!isObject(obj)) return [];
+ if (nativeKeys) return nativeKeys(obj);
+ var keys = [];
+ for (var key in obj) if (has(obj, key)) keys.push(key);
+ // Ahem, IE < 9.
+ if (hasEnumBug) collectNonEnumProps(obj, keys);
+ return keys;
+ }
+
+ // Is a given array, string, or object empty?
+ // An "empty" object has no enumerable own-properties.
+ function isEmpty(obj) {
+ if (obj == null) return true;
+ // Skip the more expensive `toString`-based type checks if `obj` has no
+ // `.length`.
+ var length = getLength(obj);
+ if (typeof length == 'number' && (
+ isArray(obj) || isString(obj) || isArguments$1(obj)
+ )) return length === 0;
+ return getLength(keys(obj)) === 0;
+ }
+
+ // Returns whether an object has a given set of `key:value` pairs.
+ function isMatch(object, attrs) {
+ var _keys = keys(attrs), length = _keys.length;
+ if (object == null) return !length;
+ var obj = Object(object);
+ for (var i = 0; i < length; i++) {
+ var key = _keys[i];
+ if (attrs[key] !== obj[key] || !(key in obj)) return false;
+ }
+ return true;
+ }
+
+ // If Underscore is called as a function, it returns a wrapped object that can
+ // be used OO-style. This wrapper holds altered versions of all functions added
+ // through `_.mixin`. Wrapped objects may be chained.
+ function _(obj) {
+ if (obj instanceof _) return obj;
+ if (!(this instanceof _)) return new _(obj);
+ this._wrapped = obj;
+ }
+
+ _.VERSION = VERSION;
+
+ // Extracts the result from a wrapped and chained object.
+ _.prototype.value = function() {
+ return this._wrapped;
+ };
+
+ // Provide unwrapping proxies for some methods used in engine operations
+ // such as arithmetic and JSON stringification.
+ _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;
+
+ _.prototype.toString = function() {
+ return String(this._wrapped);
+ };
+
+ // Internal function to wrap or shallow-copy an ArrayBuffer,
+ // typed array or DataView to a new view, reusing the buffer.
+ function toBufferView(bufferSource) {
+ return new Uint8Array(
+ bufferSource.buffer || bufferSource,
+ bufferSource.byteOffset || 0,
+ getByteLength(bufferSource)
+ );
+ }
+
+ // We use this string twice, so give it a name for minification.
+ var tagDataView = '[object DataView]';
+
+ // Internal recursive comparison function for `_.isEqual`.
+ function eq(a, b, aStack, bStack) {
+ // Identical objects are equal. `0 === -0`, but they aren't identical.
+ // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal).
+ if (a === b) return a !== 0 || 1 / a === 1 / b;
+ // `null` or `undefined` only equal to itself (strict comparison).
+ if (a == null || b == null) return false;
+ // `NaN`s are equivalent, but non-reflexive.
+ if (a !== a) return b !== b;
+ // Exhaust primitive checks
+ var type = typeof a;
+ if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
+ return deepEq(a, b, aStack, bStack);
+ }
+
+ // Internal recursive comparison function for `_.isEqual`.
+ function deepEq(a, b, aStack, bStack) {
+ // Unwrap any wrapped objects.
+ if (a instanceof _) a = a._wrapped;
+ if (b instanceof _) b = b._wrapped;
+ // Compare `[[Class]]` names.
+ var className = toString.call(a);
+ if (className !== toString.call(b)) return false;
+ // Work around a bug in IE 10 - Edge 13.
+ if (hasStringTagBug && className == '[object Object]' && isDataView$1(a)) {
+ if (!isDataView$1(b)) return false;
+ className = tagDataView;
+ }
+ switch (className) {
+ // These types are compared by value.
+ case '[object RegExp]':
+ // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')
+ case '[object String]':
+ // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
+ // equivalent to `new String("5")`.
+ return '' + a === '' + b;
+ case '[object Number]':
+ // `NaN`s are equivalent, but non-reflexive.
+ // Object(NaN) is equivalent to NaN.
+ if (+a !== +a) return +b !== +b;
+ // An `egal` comparison is performed for other numeric values.
+ return +a === 0 ? 1 / +a === 1 / b : +a === +b;
+ case '[object Date]':
+ case '[object Boolean]':
+ // Coerce dates and booleans to numeric primitive values. Dates are compared by their
+ // millisecond representations. Note that invalid dates with millisecond representations
+ // of `NaN` are not equivalent.
+ return +a === +b;
+ case '[object Symbol]':
+ return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);
+ case '[object ArrayBuffer]':
+ case tagDataView:
+ // Coerce to typed array so we can fall through.
+ return deepEq(toBufferView(a), toBufferView(b), aStack, bStack);
+ }
+
+ var areArrays = className === '[object Array]';
+ if (!areArrays && isTypedArray$1(a)) {
+ var byteLength = getByteLength(a);
+ if (byteLength !== getByteLength(b)) return false;
+ if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true;
+ areArrays = true;
+ }
+ if (!areArrays) {
+ if (typeof a != 'object' || typeof b != 'object') return false;
+
+ // Objects with different constructors are not equivalent, but `Object`s or `Array`s
+ // from different frames are.
+ var aCtor = a.constructor, bCtor = b.constructor;
+ if (aCtor !== bCtor && !(isFunction$1(aCtor) && aCtor instanceof aCtor &&
+ isFunction$1(bCtor) && bCtor instanceof bCtor)
+ && ('constructor' in a && 'constructor' in b)) {
+ return false;
+ }
+ }
+ // Assume equality for cyclic structures. The algorithm for detecting cyclic
+ // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
+
+ // Initializing stack of traversed objects.
+ // It's done here since we only need them for objects and arrays comparison.
+ aStack = aStack || [];
+ bStack = bStack || [];
+ var length = aStack.length;
+ while (length--) {
+ // Linear search. Performance is inversely proportional to the number of
+ // unique nested structures.
+ if (aStack[length] === a) return bStack[length] === b;
+ }
+
+ // Add the first object to the stack of traversed objects.
+ aStack.push(a);
+ bStack.push(b);
+
+ // Recursively compare objects and arrays.
+ if (areArrays) {
+ // Compare array lengths to determine if a deep comparison is necessary.
+ length = a.length;
+ if (length !== b.length) return false;
+ // Deep compare the contents, ignoring non-numeric properties.
+ while (length--) {
+ if (!eq(a[length], b[length], aStack, bStack)) return false;
+ }
+ } else {
+ // Deep compare objects.
+ var _keys = keys(a), key;
+ length = _keys.length;
+ // Ensure that both objects contain the same number of properties before comparing deep equality.
+ if (keys(b).length !== length) return false;
+ while (length--) {
+ // Deep compare each member
+ key = _keys[length];
+ if (!(has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
+ }
+ }
+ // Remove the first object from the stack of traversed objects.
+ aStack.pop();
+ bStack.pop();
+ return true;
+ }
+
+ // Perform a deep comparison to check if two objects are equal.
+ function isEqual(a, b) {
+ return eq(a, b);
+ }
+
+ // Retrieve all the enumerable property names of an object.
+ function allKeys(obj) {
+ if (!isObject(obj)) return [];
+ var keys = [];
+ for (var key in obj) keys.push(key);
+ // Ahem, IE < 9.
+ if (hasEnumBug) collectNonEnumProps(obj, keys);
+ return keys;
+ }
+
+ // Since the regular `Object.prototype.toString` type tests don't work for
+ // some types in IE 11, we use a fingerprinting heuristic instead, based
+ // on the methods. It's not great, but it's the best we got.
+ // The fingerprint method lists are defined below.
+ function ie11fingerprint(methods) {
+ var length = getLength(methods);
+ return function(obj) {
+ if (obj == null) return false;
+ // `Map`, `WeakMap` and `Set` have no enumerable keys.
+ var keys = allKeys(obj);
+ if (getLength(keys)) return false;
+ for (var i = 0; i < length; i++) {
+ if (!isFunction$1(obj[methods[i]])) return false;
+ }
+ // If we are testing against `WeakMap`, we need to ensure that
+ // `obj` doesn't have a `forEach` method in order to distinguish
+ // it from a regular `Map`.
+ return methods !== weakMapMethods || !isFunction$1(obj[forEachName]);
+ };
+ }
+
+ // In the interest of compact minification, we write
+ // each string in the fingerprints only once.
+ var forEachName = 'forEach',
+ hasName = 'has',
+ commonInit = ['clear', 'delete'],
+ mapTail = ['get', hasName, 'set'];
+
+ // `Map`, `WeakMap` and `Set` each have slightly different
+ // combinations of the above sublists.
+ var mapMethods = commonInit.concat(forEachName, mapTail),
+ weakMapMethods = commonInit.concat(mapTail),
+ setMethods = ['add'].concat(commonInit, forEachName, hasName);
+
+ var isMap = isIE11 ? ie11fingerprint(mapMethods) : tagTester('Map');
+
+ var isWeakMap = isIE11 ? ie11fingerprint(weakMapMethods) : tagTester('WeakMap');
+
+ var isSet = isIE11 ? ie11fingerprint(setMethods) : tagTester('Set');
+
+ var isWeakSet = tagTester('WeakSet');
+
+ // Retrieve the values of an object's properties.
+ function values(obj) {
+ var _keys = keys(obj);
+ var length = _keys.length;
+ var values = Array(length);
+ for (var i = 0; i < length; i++) {
+ values[i] = obj[_keys[i]];
+ }
+ return values;
+ }
+
+ // Convert an object into a list of `[key, value]` pairs.
+ // The opposite of `_.object` with one argument.
+ function pairs(obj) {
+ var _keys = keys(obj);
+ var length = _keys.length;
+ var pairs = Array(length);
+ for (var i = 0; i < length; i++) {
+ pairs[i] = [_keys[i], obj[_keys[i]]];
+ }
+ return pairs;
+ }
+
+ // Invert the keys and values of an object. The values must be serializable.
+ function invert(obj) {
+ var result = {};
+ var _keys = keys(obj);
+ for (var i = 0, length = _keys.length; i < length; i++) {
+ result[obj[_keys[i]]] = _keys[i];
+ }
+ return result;
+ }
+
+ // Return a sorted list of the function names available on the object.
+ function functions(obj) {
+ var names = [];
+ for (var key in obj) {
+ if (isFunction$1(obj[key])) names.push(key);
+ }
+ return names.sort();
+ }
+
+ // An internal function for creating assigner functions.
+ function createAssigner(keysFunc, defaults) {
+ return function(obj) {
+ var length = arguments.length;
+ if (defaults) obj = Object(obj);
+ if (length < 2 || obj == null) return obj;
+ for (var index = 1; index < length; index++) {
+ var source = arguments[index],
+ keys = keysFunc(source),
+ l = keys.length;
+ for (var i = 0; i < l; i++) {
+ var key = keys[i];
+ if (!defaults || obj[key] === void 0) obj[key] = source[key];
+ }
+ }
+ return obj;
+ };
+ }
+
+ // Extend a given object with all the properties in passed-in object(s).
+ var extend = createAssigner(allKeys);
+
+ // Assigns a given object with all the own properties in the passed-in
+ // object(s).
+ // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
+ var extendOwn = createAssigner(keys);
+
+ // Fill in a given object with default properties.
+ var defaults = createAssigner(allKeys, true);
+
+ // Create a naked function reference for surrogate-prototype-swapping.
+ function ctor() {
+ return function(){};
+ }
+
+ // An internal function for creating a new object that inherits from another.
+ function baseCreate(prototype) {
+ if (!isObject(prototype)) return {};
+ if (nativeCreate) return nativeCreate(prototype);
+ var Ctor = ctor();
+ Ctor.prototype = prototype;
+ var result = new Ctor;
+ Ctor.prototype = null;
+ return result;
+ }
+
+ // Creates an object that inherits from the given prototype object.
+ // If additional properties are provided then they will be added to the
+ // created object.
+ function create(prototype, props) {
+ var result = baseCreate(prototype);
+ if (props) extendOwn(result, props);
+ return result;
+ }
+
+ // Create a (shallow-cloned) duplicate of an object.
+ function clone(obj) {
+ if (!isObject(obj)) return obj;
+ return isArray(obj) ? obj.slice() : extend({}, obj);
+ }
+
+ // Invokes `interceptor` with the `obj` and then returns `obj`.
+ // The primary purpose of this method is to "tap into" a method chain, in
+ // order to perform operations on intermediate results within the chain.
+ function tap(obj, interceptor) {
+ interceptor(obj);
+ return obj;
+ }
+
+ // Normalize a (deep) property `path` to array.
+ // Like `_.iteratee`, this function can be customized.
+ function toPath(path) {
+ return isArray(path) ? path : [path];
+ }
+ _.toPath = toPath;
+
+ // Internal wrapper for `_.toPath` to enable minification.
+ // Similar to `cb` for `_.iteratee`.
+ function toPath$1(path) {
+ return _.toPath(path);
+ }
+
+ // Internal function to obtain a nested property in `obj` along `path`.
+ function deepGet(obj, path) {
+ var length = path.length;
+ for (var i = 0; i < length; i++) {
+ if (obj == null) return void 0;
+ obj = obj[path[i]];
+ }
+ return length ? obj : void 0;
+ }
+
+ // Get the value of the (deep) property on `path` from `object`.
+ // If any property in `path` does not exist or if the value is
+ // `undefined`, return `defaultValue` instead.
+ // The `path` is normalized through `_.toPath`.
+ function get(object, path, defaultValue) {
+ var value = deepGet(object, toPath$1(path));
+ return isUndefined(value) ? defaultValue : value;
+ }
+
+ // Shortcut function for checking if an object has a given property directly on
+ // itself (in other words, not on a prototype). Unlike the internal `has`
+ // function, this public version can also traverse nested properties.
+ function has$1(obj, path) {
+ path = toPath$1(path);
+ var length = path.length;
+ for (var i = 0; i < length; i++) {
+ var key = path[i];
+ if (!has(obj, key)) return false;
+ obj = obj[key];
+ }
+ return !!length;
+ }
+
+ // Keep the identity function around for default iteratees.
+ function identity(value) {
+ return value;
+ }
+
+ // Returns a predicate for checking whether an object has a given set of
+ // `key:value` pairs.
+ function matcher(attrs) {
+ attrs = extendOwn({}, attrs);
+ return function(obj) {
+ return isMatch(obj, attrs);
+ };
+ }
+
+ // Creates a function that, when passed an object, will traverse that object’s
+ // properties down the given `path`, specified as an array of keys or indices.
+ function property(path) {
+ path = toPath$1(path);
+ return function(obj) {
+ return deepGet(obj, path);
+ };
+ }
+
+ // Internal function that returns an efficient (for current engines) version
+ // of the passed-in callback, to be repeatedly applied in other Underscore
+ // functions.
+ function optimizeCb(func, context, argCount) {
+ if (context === void 0) return func;
+ switch (argCount == null ? 3 : argCount) {
+ case 1: return function(value) {
+ return func.call(context, value);
+ };
+ // The 2-argument case is omitted because we’re not using it.
+ case 3: return function(value, index, collection) {
+ return func.call(context, value, index, collection);
+ };
+ case 4: return function(accumulator, value, index, collection) {
+ return func.call(context, accumulator, value, index, collection);
+ };
+ }
+ return function() {
+ return func.apply(context, arguments);
+ };
+ }
+
+ // An internal function to generate callbacks that can be applied to each
+ // element in a collection, returning the desired result — either `_.identity`,
+ // an arbitrary callback, a property matcher, or a property accessor.
+ function baseIteratee(value, context, argCount) {
+ if (value == null) return identity;
+ if (isFunction$1(value)) return optimizeCb(value, context, argCount);
+ if (isObject(value) && !isArray(value)) return matcher(value);
+ return property(value);
+ }
+
+ // External wrapper for our callback generator. Users may customize
+ // `_.iteratee` if they want additional predicate/iteratee shorthand styles.
+ // This abstraction hides the internal-only `argCount` argument.
+ function iteratee(value, context) {
+ return baseIteratee(value, context, Infinity);
+ }
+ _.iteratee = iteratee;
+
+ // The function we call internally to generate a callback. It invokes
+ // `_.iteratee` if overridden, otherwise `baseIteratee`.
+ function cb(value, context, argCount) {
+ if (_.iteratee !== iteratee) return _.iteratee(value, context);
+ return baseIteratee(value, context, argCount);
+ }
+
+ // Returns the results of applying the `iteratee` to each element of `obj`.
+ // In contrast to `_.map` it returns an object.
+ function mapObject(obj, iteratee, context) {
+ iteratee = cb(iteratee, context);
+ var _keys = keys(obj),
+ length = _keys.length,
+ results = {};
+ for (var index = 0; index < length; index++) {
+ var currentKey = _keys[index];
+ results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
+ }
+ return results;
+ }
+
+ // Predicate-generating function. Often useful outside of Underscore.
+ function noop(){}
+
+ // Generates a function for a given object that returns a given property.
+ function propertyOf(obj) {
+ if (obj == null) return noop;
+ return function(path) {
+ return get(obj, path);
+ };
+ }
+
+ // Run a function **n** times.
+ function times(n, iteratee, context) {
+ var accum = Array(Math.max(0, n));
+ iteratee = optimizeCb(iteratee, context, 1);
+ for (var i = 0; i < n; i++) accum[i] = iteratee(i);
+ return accum;
+ }
+
+ // Return a random integer between `min` and `max` (inclusive).
+ function random(min, max) {
+ if (max == null) {
+ max = min;
+ min = 0;
+ }
+ return min + Math.floor(Math.random() * (max - min + 1));
+ }
+
+ // A (possibly faster) way to get the current timestamp as an integer.
+ var now = Date.now || function() {
+ return new Date().getTime();
+ };
+
+ // Internal helper to generate functions for escaping and unescaping strings
+ // to/from HTML interpolation.
+ function createEscaper(map) {
+ var escaper = function(match) {
+ return map[match];
+ };
+ // Regexes for identifying a key that needs to be escaped.
+ var source = '(?:' + keys(map).join('|') + ')';
+ var testRegexp = RegExp(source);
+ var replaceRegexp = RegExp(source, 'g');
+ return function(string) {
+ string = string == null ? '' : '' + string;
+ return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
+ };
+ }
+
+ // Internal list of HTML entities for escaping.
+ var escapeMap = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ "'": ''',
+ '`': '`'
+ };
+
+ // Function for escaping strings to HTML interpolation.
+ var _escape = createEscaper(escapeMap);
+
+ // Internal list of HTML entities for unescaping.
+ var unescapeMap = invert(escapeMap);
+
+ // Function for unescaping strings from HTML interpolation.
+ var _unescape = createEscaper(unescapeMap);
+
+ // By default, Underscore uses ERB-style template delimiters. Change the
+ // following template settings to use alternative delimiters.
+ var templateSettings = _.templateSettings = {
+ evaluate: /<%([\s\S]+?)%>/g,
+ interpolate: /<%=([\s\S]+?)%>/g,
+ escape: /<%-([\s\S]+?)%>/g
+ };
+
+ // When customizing `_.templateSettings`, if you don't want to define an
+ // interpolation, evaluation or escaping regex, we need one that is
+ // guaranteed not to match.
+ var noMatch = /(.)^/;
+
+ // Certain characters need to be escaped so that they can be put into a
+ // string literal.
+ var escapes = {
+ "'": "'",
+ '\\': '\\',
+ '\r': 'r',
+ '\n': 'n',
+ '\u2028': 'u2028',
+ '\u2029': 'u2029'
+ };
+
+ var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g;
+
+ function escapeChar(match) {
+ return '\\' + escapes[match];
+ }
+
+ // JavaScript micro-templating, similar to John Resig's implementation.
+ // Underscore templating handles arbitrary delimiters, preserves whitespace,
+ // and correctly escapes quotes within interpolated code.
+ // NB: `oldSettings` only exists for backwards compatibility.
+ function template(text, settings, oldSettings) {
+ if (!settings && oldSettings) settings = oldSettings;
+ settings = defaults({}, settings, _.templateSettings);
+
+ // Combine delimiters into one regular expression via alternation.
+ var matcher = RegExp([
+ (settings.escape || noMatch).source,
+ (settings.interpolate || noMatch).source,
+ (settings.evaluate || noMatch).source
+ ].join('|') + '|$', 'g');
+
+ // Compile the template source, escaping string literals appropriately.
+ var index = 0;
+ var source = "__p+='";
+ text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
+ source += text.slice(index, offset).replace(escapeRegExp, escapeChar);
+ index = offset + match.length;
+
+ if (escape) {
+ source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
+ } else if (interpolate) {
+ source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
+ } else if (evaluate) {
+ source += "';\n" + evaluate + "\n__p+='";
+ }
+
+ // Adobe VMs need the match returned to produce the correct offset.
+ return match;
+ });
+ source += "';\n";
+
+ // If a variable is not specified, place data values in local scope.
+ if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
+
+ source = "var __t,__p='',__j=Array.prototype.join," +
+ "print=function(){__p+=__j.call(arguments,'');};\n" +
+ source + 'return __p;\n';
+
+ var render;
+ try {
+ render = new Function(settings.variable || 'obj', '_', source);
+ } catch (e) {
+ e.source = source;
+ throw e;
+ }
+
+ var template = function(data) {
+ return render.call(this, data, _);
+ };
+
+ // Provide the compiled source as a convenience for precompilation.
+ var argument = settings.variable || 'obj';
+ template.source = 'function(' + argument + '){\n' + source + '}';
+
+ return template;
+ }
+
+ // Traverses the children of `obj` along `path`. If a child is a function, it
+ // is invoked with its parent as context. Returns the value of the final
+ // child, or `fallback` if any child is undefined.
+ function result(obj, path, fallback) {
+ path = toPath$1(path);
+ var length = path.length;
+ if (!length) {
+ return isFunction$1(fallback) ? fallback.call(obj) : fallback;
+ }
+ for (var i = 0; i < length; i++) {
+ var prop = obj == null ? void 0 : obj[path[i]];
+ if (prop === void 0) {
+ prop = fallback;
+ i = length; // Ensure we don't continue iterating.
+ }
+ obj = isFunction$1(prop) ? prop.call(obj) : prop;
+ }
+ return obj;
+ }
+
+ // Generate a unique integer id (unique within the entire client session).
+ // Useful for temporary DOM ids.
+ var idCounter = 0;
+ function uniqueId(prefix) {
+ var id = ++idCounter + '';
+ return prefix ? prefix + id : id;
+ }
+
+ // Start chaining a wrapped Underscore object.
+ function chain(obj) {
+ var instance = _(obj);
+ instance._chain = true;
+ return instance;
+ }
+
+ // Internal function to execute `sourceFunc` bound to `context` with optional
+ // `args`. Determines whether to execute a function as a constructor or as a
+ // normal function.
+ function executeBound(sourceFunc, boundFunc, context, callingContext, args) {
+ if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
+ var self = baseCreate(sourceFunc.prototype);
+ var result = sourceFunc.apply(self, args);
+ if (isObject(result)) return result;
+ return self;
+ }
+
+ // Partially apply a function by creating a version that has had some of its
+ // arguments pre-filled, without changing its dynamic `this` context. `_` acts
+ // as a placeholder by default, allowing any combination of arguments to be
+ // pre-filled. Set `_.partial.placeholder` for a custom placeholder argument.
+ var partial = restArguments(function(func, boundArgs) {
+ var placeholder = partial.placeholder;
+ var bound = function() {
+ var position = 0, length = boundArgs.length;
+ var args = Array(length);
+ for (var i = 0; i < length; i++) {
+ args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];
+ }
+ while (position < arguments.length) args.push(arguments[position++]);
+ return executeBound(func, bound, this, this, args);
+ };
+ return bound;
+ });
+
+ partial.placeholder = _;
+
+ // Create a function bound to a given object (assigning `this`, and arguments,
+ // optionally).
+ var bind = restArguments(function(func, context, args) {
+ if (!isFunction$1(func)) throw new TypeError('Bind must be called on a function');
+ var bound = restArguments(function(callArgs) {
+ return executeBound(func, bound, context, this, args.concat(callArgs));
+ });
+ return bound;
+ });
+
+ // Internal helper for collection methods to determine whether a collection
+ // should be iterated as an array or as an object.
+ // Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength
+ // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094
+ var isArrayLike = createSizePropertyCheck(getLength);
+
+ // Internal implementation of a recursive `flatten` function.
+ function flatten(input, depth, strict, output) {
+ output = output || [];
+ if (!depth && depth !== 0) {
+ depth = Infinity;
+ } else if (depth <= 0) {
+ return output.concat(input);
+ }
+ var idx = output.length;
+ for (var i = 0, length = getLength(input); i < length; i++) {
+ var value = input[i];
+ if (isArrayLike(value) && (isArray(value) || isArguments$1(value))) {
+ // Flatten current level of array or arguments object.
+ if (depth > 1) {
+ flatten(value, depth - 1, strict, output);
+ idx = output.length;
+ } else {
+ var j = 0, len = value.length;
+ while (j < len) output[idx++] = value[j++];
+ }
+ } else if (!strict) {
+ output[idx++] = value;
+ }
+ }
+ return output;
+ }
+
+ // Bind a number of an object's methods to that object. Remaining arguments
+ // are the method names to be bound. Useful for ensuring that all callbacks
+ // defined on an object belong to it.
+ var bindAll = restArguments(function(obj, keys) {
+ keys = flatten(keys, false, false);
+ var index = keys.length;
+ if (index < 1) throw new Error('bindAll must be passed function names');
+ while (index--) {
+ var key = keys[index];
+ obj[key] = bind(obj[key], obj);
+ }
+ return obj;
+ });
+
+ // Memoize an expensive function by storing its results.
+ function memoize(func, hasher) {
+ var memoize = function(key) {
+ var cache = memoize.cache;
+ var address = '' + (hasher ? hasher.apply(this, arguments) : key);
+ if (!has(cache, address)) cache[address] = func.apply(this, arguments);
+ return cache[address];
+ };
+ memoize.cache = {};
+ return memoize;
+ }
+
+ // Delays a function for the given number of milliseconds, and then calls
+ // it with the arguments supplied.
+ var delay = restArguments(function(func, wait, args) {
+ return setTimeout(function() {
+ return func.apply(null, args);
+ }, wait);
+ });
+
+ // Defers a function, scheduling it to run after the current call stack has
+ // cleared.
+ var defer = partial(delay, _, 1);
+
+ // Returns a function, that, when invoked, will only be triggered at most once
+ // during a given window of time. Normally, the throttled function will run
+ // as much as it can, without ever going more than once per `wait` duration;
+ // but if you'd like to disable the execution on the leading edge, pass
+ // `{leading: false}`. To disable execution on the trailing edge, ditto.
+ function throttle(func, wait, options) {
+ var timeout, context, args, result;
+ var previous = 0;
+ if (!options) options = {};
+
+ var later = function() {
+ previous = options.leading === false ? 0 : now();
+ timeout = null;
+ result = func.apply(context, args);
+ if (!timeout) context = args = null;
+ };
+
+ var throttled = function() {
+ var _now = now();
+ if (!previous && options.leading === false) previous = _now;
+ var remaining = wait - (_now - previous);
+ context = this;
+ args = arguments;
+ if (remaining <= 0 || remaining > wait) {
+ if (timeout) {
+ clearTimeout(timeout);
+ timeout = null;
+ }
+ previous = _now;
+ result = func.apply(context, args);
+ if (!timeout) context = args = null;
+ } else if (!timeout && options.trailing !== false) {
+ timeout = setTimeout(later, remaining);
+ }
+ return result;
+ };
+
+ throttled.cancel = function() {
+ clearTimeout(timeout);
+ previous = 0;
+ timeout = context = args = null;
+ };
+
+ return throttled;
+ }
+
+ // When a sequence of calls of the returned function ends, the argument
+ // function is triggered. The end of a sequence is defined by the `wait`
+ // parameter. If `immediate` is passed, the argument function will be
+ // triggered at the beginning of the sequence instead of at the end.
+ function debounce(func, wait, immediate) {
+ var timeout, previous, args, result, context;
+
+ var later = function() {
+ var passed = now() - previous;
+ if (wait > passed) {
+ timeout = setTimeout(later, wait - passed);
+ } else {
+ timeout = null;
+ if (!immediate) result = func.apply(context, args);
+ // This check is needed because `func` can recursively invoke `debounced`.
+ if (!timeout) args = context = null;
+ }
+ };
+
+ var debounced = restArguments(function(_args) {
+ context = this;
+ args = _args;
+ previous = now();
+ if (!timeout) {
+ timeout = setTimeout(later, wait);
+ if (immediate) result = func.apply(context, args);
+ }
+ return result;
+ });
+
+ debounced.cancel = function() {
+ clearTimeout(timeout);
+ timeout = args = context = null;
+ };
+
+ return debounced;
+ }
+
+ // Returns the first function passed as an argument to the second,
+ // allowing you to adjust arguments, run code before and after, and
+ // conditionally execute the original function.
+ function wrap(func, wrapper) {
+ return partial(wrapper, func);
+ }
+
+ // Returns a negated version of the passed-in predicate.
+ function negate(predicate) {
+ return function() {
+ return !predicate.apply(this, arguments);
+ };
+ }
+
+ // Returns a function that is the composition of a list of functions, each
+ // consuming the return value of the function that follows.
+ function compose() {
+ var args = arguments;
+ var start = args.length - 1;
+ return function() {
+ var i = start;
+ var result = args[start].apply(this, arguments);
+ while (i--) result = args[i].call(this, result);
+ return result;
+ };
+ }
+
+ // Returns a function that will only be executed on and after the Nth call.
+ function after(times, func) {
+ return function() {
+ if (--times < 1) {
+ return func.apply(this, arguments);
+ }
+ };
+ }
+
+ // Returns a function that will only be executed up to (but not including) the
+ // Nth call.
+ function before(times, func) {
+ var memo;
+ return function() {
+ if (--times > 0) {
+ memo = func.apply(this, arguments);
+ }
+ if (times <= 1) func = null;
+ return memo;
+ };
+ }
+
+ // Returns a function that will be executed at most one time, no matter how
+ // often you call it. Useful for lazy initialization.
+ var once = partial(before, 2);
+
+ // Returns the first key on an object that passes a truth test.
+ function findKey(obj, predicate, context) {
+ predicate = cb(predicate, context);
+ var _keys = keys(obj), key;
+ for (var i = 0, length = _keys.length; i < length; i++) {
+ key = _keys[i];
+ if (predicate(obj[key], key, obj)) return key;
+ }
+ }
+
+ // Internal function to generate `_.findIndex` and `_.findLastIndex`.
+ function createPredicateIndexFinder(dir) {
+ return function(array, predicate, context) {
+ predicate = cb(predicate, context);
+ var length = getLength(array);
+ var index = dir > 0 ? 0 : length - 1;
+ for (; index >= 0 && index < length; index += dir) {
+ if (predicate(array[index], index, array)) return index;
+ }
+ return -1;
+ };
+ }
+
+ // Returns the first index on an array-like that passes a truth test.
+ var findIndex = createPredicateIndexFinder(1);
+
+ // Returns the last index on an array-like that passes a truth test.
+ var findLastIndex = createPredicateIndexFinder(-1);
+
+ // Use a comparator function to figure out the smallest index at which
+ // an object should be inserted so as to maintain order. Uses binary search.
+ function sortedIndex(array, obj, iteratee, context) {
+ iteratee = cb(iteratee, context, 1);
+ var value = iteratee(obj);
+ var low = 0, high = getLength(array);
+ while (low < high) {
+ var mid = Math.floor((low + high) / 2);
+ if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;
+ }
+ return low;
+ }
+
+ // Internal function to generate the `_.indexOf` and `_.lastIndexOf` functions.
+ function createIndexFinder(dir, predicateFind, sortedIndex) {
+ return function(array, item, idx) {
+ var i = 0, length = getLength(array);
+ if (typeof idx == 'number') {
+ if (dir > 0) {
+ i = idx >= 0 ? idx : Math.max(idx + length, i);
+ } else {
+ length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;
+ }
+ } else if (sortedIndex && idx && length) {
+ idx = sortedIndex(array, item);
+ return array[idx] === item ? idx : -1;
+ }
+ if (item !== item) {
+ idx = predicateFind(slice.call(array, i, length), isNaN$1);
+ return idx >= 0 ? idx + i : -1;
+ }
+ for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {
+ if (array[idx] === item) return idx;
+ }
+ return -1;
+ };
+ }
+
+ // Return the position of the first occurrence of an item in an array,
+ // or -1 if the item is not included in the array.
+ // If the array is large and already in sort order, pass `true`
+ // for **isSorted** to use binary search.
+ var indexOf = createIndexFinder(1, findIndex, sortedIndex);
+
+ // Return the position of the last occurrence of an item in an array,
+ // or -1 if the item is not included in the array.
+ var lastIndexOf = createIndexFinder(-1, findLastIndex);
+
+ // Return the first value which passes a truth test.
+ function find(obj, predicate, context) {
+ var keyFinder = isArrayLike(obj) ? findIndex : findKey;
+ var key = keyFinder(obj, predicate, context);
+ if (key !== void 0 && key !== -1) return obj[key];
+ }
+
+ // Convenience version of a common use case of `_.find`: getting the first
+ // object containing specific `key:value` pairs.
+ function findWhere(obj, attrs) {
+ return find(obj, matcher(attrs));
+ }
+
+ // The cornerstone for collection functions, an `each`
+ // implementation, aka `forEach`.
+ // Handles raw objects in addition to array-likes. Treats all
+ // sparse array-likes as if they were dense.
+ function each(obj, iteratee, context) {
+ iteratee = optimizeCb(iteratee, context);
+ var i, length;
+ if (isArrayLike(obj)) {
+ for (i = 0, length = obj.length; i < length; i++) {
+ iteratee(obj[i], i, obj);
+ }
+ } else {
+ var _keys = keys(obj);
+ for (i = 0, length = _keys.length; i < length; i++) {
+ iteratee(obj[_keys[i]], _keys[i], obj);
+ }
+ }
+ return obj;
+ }
+
+ // Return the results of applying the iteratee to each element.
+ function map(obj, iteratee, context) {
+ iteratee = cb(iteratee, context);
+ var _keys = !isArrayLike(obj) && keys(obj),
+ length = (_keys || obj).length,
+ results = Array(length);
+ for (var index = 0; index < length; index++) {
+ var currentKey = _keys ? _keys[index] : index;
+ results[index] = iteratee(obj[currentKey], currentKey, obj);
+ }
+ return results;
+ }
+
+ // Internal helper to create a reducing function, iterating left or right.
+ function createReduce(dir) {
+ // Wrap code that reassigns argument variables in a separate function than
+ // the one that accesses `arguments.length` to avoid a perf hit. (#1991)
+ var reducer = function(obj, iteratee, memo, initial) {
+ var _keys = !isArrayLike(obj) && keys(obj),
+ length = (_keys || obj).length,
+ index = dir > 0 ? 0 : length - 1;
+ if (!initial) {
+ memo = obj[_keys ? _keys[index] : index];
+ index += dir;
+ }
+ for (; index >= 0 && index < length; index += dir) {
+ var currentKey = _keys ? _keys[index] : index;
+ memo = iteratee(memo, obj[currentKey], currentKey, obj);
+ }
+ return memo;
+ };
+
+ return function(obj, iteratee, memo, context) {
+ var initial = arguments.length >= 3;
+ return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);
+ };
+ }
+
+ // **Reduce** builds up a single result from a list of values, aka `inject`,
+ // or `foldl`.
+ var reduce = createReduce(1);
+
+ // The right-associative version of reduce, also known as `foldr`.
+ var reduceRight = createReduce(-1);
+
+ // Return all the elements that pass a truth test.
+ function filter(obj, predicate, context) {
+ var results = [];
+ predicate = cb(predicate, context);
+ each(obj, function(value, index, list) {
+ if (predicate(value, index, list)) results.push(value);
+ });
+ return results;
+ }
+
+ // Return all the elements for which a truth test fails.
+ function reject(obj, predicate, context) {
+ return filter(obj, negate(cb(predicate)), context);
+ }
+
+ // Determine whether all of the elements pass a truth test.
+ function every(obj, predicate, context) {
+ predicate = cb(predicate, context);
+ var _keys = !isArrayLike(obj) && keys(obj),
+ length = (_keys || obj).length;
+ for (var index = 0; index < length; index++) {
+ var currentKey = _keys ? _keys[index] : index;
+ if (!predicate(obj[currentKey], currentKey, obj)) return false;
+ }
+ return true;
+ }
+
+ // Determine if at least one element in the object passes a truth test.
+ function some(obj, predicate, context) {
+ predicate = cb(predicate, context);
+ var _keys = !isArrayLike(obj) && keys(obj),
+ length = (_keys || obj).length;
+ for (var index = 0; index < length; index++) {
+ var currentKey = _keys ? _keys[index] : index;
+ if (predicate(obj[currentKey], currentKey, obj)) return true;
+ }
+ return false;
+ }
+
+ // Determine if the array or object contains a given item (using `===`).
+ function contains(obj, item, fromIndex, guard) {
+ if (!isArrayLike(obj)) obj = values(obj);
+ if (typeof fromIndex != 'number' || guard) fromIndex = 0;
+ return indexOf(obj, item, fromIndex) >= 0;
+ }
+
+ // Invoke a method (with arguments) on every item in a collection.
+ var invoke = restArguments(function(obj, path, args) {
+ var contextPath, func;
+ if (isFunction$1(path)) {
+ func = path;
+ } else {
+ path = toPath$1(path);
+ contextPath = path.slice(0, -1);
+ path = path[path.length - 1];
+ }
+ return map(obj, function(context) {
+ var method = func;
+ if (!method) {
+ if (contextPath && contextPath.length) {
+ context = deepGet(context, contextPath);
+ }
+ if (context == null) return void 0;
+ method = context[path];
+ }
+ return method == null ? method : method.apply(context, args);
+ });
+ });
+
+ // Convenience version of a common use case of `_.map`: fetching a property.
+ function pluck(obj, key) {
+ return map(obj, property(key));
+ }
+
+ // Convenience version of a common use case of `_.filter`: selecting only
+ // objects containing specific `key:value` pairs.
+ function where(obj, attrs) {
+ return filter(obj, matcher(attrs));
+ }
+
+ // Return the maximum element (or element-based computation).
+ function max(obj, iteratee, context) {
+ var result = -Infinity, lastComputed = -Infinity,
+ value, computed;
+ if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {
+ obj = isArrayLike(obj) ? obj : values(obj);
+ for (var i = 0, length = obj.length; i < length; i++) {
+ value = obj[i];
+ if (value != null && value > result) {
+ result = value;
+ }
+ }
+ } else {
+ iteratee = cb(iteratee, context);
+ each(obj, function(v, index, list) {
+ computed = iteratee(v, index, list);
+ if (computed > lastComputed || computed === -Infinity && result === -Infinity) {
+ result = v;
+ lastComputed = computed;
+ }
+ });
+ }
+ return result;
+ }
+
+ // Return the minimum element (or element-based computation).
+ function min(obj, iteratee, context) {
+ var result = Infinity, lastComputed = Infinity,
+ value, computed;
+ if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {
+ obj = isArrayLike(obj) ? obj : values(obj);
+ for (var i = 0, length = obj.length; i < length; i++) {
+ value = obj[i];
+ if (value != null && value < result) {
+ result = value;
+ }
+ }
+ } else {
+ iteratee = cb(iteratee, context);
+ each(obj, function(v, index, list) {
+ computed = iteratee(v, index, list);
+ if (computed < lastComputed || computed === Infinity && result === Infinity) {
+ result = v;
+ lastComputed = computed;
+ }
+ });
+ }
+ return result;
+ }
+
+ // Sample **n** random values from a collection using the modern version of the
+ // [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle).
+ // If **n** is not specified, returns a single random element.
+ // The internal `guard` argument allows it to work with `_.map`.
+ function sample(obj, n, guard) {
+ if (n == null || guard) {
+ if (!isArrayLike(obj)) obj = values(obj);
+ return obj[random(obj.length - 1)];
+ }
+ var sample = isArrayLike(obj) ? clone(obj) : values(obj);
+ var length = getLength(sample);
+ n = Math.max(Math.min(n, length), 0);
+ var last = length - 1;
+ for (var index = 0; index < n; index++) {
+ var rand = random(index, last);
+ var temp = sample[index];
+ sample[index] = sample[rand];
+ sample[rand] = temp;
+ }
+ return sample.slice(0, n);
+ }
+
+ // Shuffle a collection.
+ function shuffle(obj) {
+ return sample(obj, Infinity);
+ }
+
+ // Sort the object's values by a criterion produced by an iteratee.
+ function sortBy(obj, iteratee, context) {
+ var index = 0;
+ iteratee = cb(iteratee, context);
+ return pluck(map(obj, function(value, key, list) {
+ return {
+ value: value,
+ index: index++,
+ criteria: iteratee(value, key, list)
+ };
+ }).sort(function(left, right) {
+ var a = left.criteria;
+ var b = right.criteria;
+ if (a !== b) {
+ if (a > b || a === void 0) return 1;
+ if (a < b || b === void 0) return -1;
+ }
+ return left.index - right.index;
+ }), 'value');
+ }
+
+ // An internal function used for aggregate "group by" operations.
+ function group(behavior, partition) {
+ return function(obj, iteratee, context) {
+ var result = partition ? [[], []] : {};
+ iteratee = cb(iteratee, context);
+ each(obj, function(value, index) {
+ var key = iteratee(value, index, obj);
+ behavior(result, value, key);
+ });
+ return result;
+ };
+ }
+
+ // Groups the object's values by a criterion. Pass either a string attribute
+ // to group by, or a function that returns the criterion.
+ var groupBy = group(function(result, value, key) {
+ if (has(result, key)) result[key].push(value); else result[key] = [value];
+ });
+
+ // Indexes the object's values by a criterion, similar to `_.groupBy`, but for
+ // when you know that your index values will be unique.
+ var indexBy = group(function(result, value, key) {
+ result[key] = value;
+ });
+
+ // Counts instances of an object that group by a certain criterion. Pass
+ // either a string attribute to count by, or a function that returns the
+ // criterion.
+ var countBy = group(function(result, value, key) {
+ if (has(result, key)) result[key]++; else result[key] = 1;
+ });
+
+ // Split a collection into two arrays: one whose elements all pass the given
+ // truth test, and one whose elements all do not pass the truth test.
+ var partition = group(function(result, value, pass) {
+ result[pass ? 0 : 1].push(value);
+ }, true);
+
+ // Safely create a real, live array from anything iterable.
+ var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;
+ function toArray(obj) {
+ if (!obj) return [];
+ if (isArray(obj)) return slice.call(obj);
+ if (isString(obj)) {
+ // Keep surrogate pair characters together.
+ return obj.match(reStrSymbol);
+ }
+ if (isArrayLike(obj)) return map(obj, identity);
+ return values(obj);
+ }
+
+ // Return the number of elements in a collection.
+ function size(obj) {
+ if (obj == null) return 0;
+ return isArrayLike(obj) ? obj.length : keys(obj).length;
+ }
+
+ // Internal `_.pick` helper function to determine whether `key` is an enumerable
+ // property name of `obj`.
+ function keyInObj(value, key, obj) {
+ return key in obj;
+ }
+
+ // Return a copy of the object only containing the allowed properties.
+ var pick = restArguments(function(obj, keys) {
+ var result = {}, iteratee = keys[0];
+ if (obj == null) return result;
+ if (isFunction$1(iteratee)) {
+ if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);
+ keys = allKeys(obj);
+ } else {
+ iteratee = keyInObj;
+ keys = flatten(keys, false, false);
+ obj = Object(obj);
+ }
+ for (var i = 0, length = keys.length; i < length; i++) {
+ var key = keys[i];
+ var value = obj[key];
+ if (iteratee(value, key, obj)) result[key] = value;
+ }
+ return result;
+ });
+
+ // Return a copy of the object without the disallowed properties.
+ var omit = restArguments(function(obj, keys) {
+ var iteratee = keys[0], context;
+ if (isFunction$1(iteratee)) {
+ iteratee = negate(iteratee);
+ if (keys.length > 1) context = keys[1];
+ } else {
+ keys = map(flatten(keys, false, false), String);
+ iteratee = function(value, key) {
+ return !contains(keys, key);
+ };
+ }
+ return pick(obj, iteratee, context);
+ });
+
+ // Returns everything but the last entry of the array. Especially useful on
+ // the arguments object. Passing **n** will return all the values in
+ // the array, excluding the last N.
+ function initial(array, n, guard) {
+ return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
+ }
+
+ // Get the first element of an array. Passing **n** will return the first N
+ // values in the array. The **guard** check allows it to work with `_.map`.
+ function first(array, n, guard) {
+ if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
+ if (n == null || guard) return array[0];
+ return initial(array, array.length - n);
+ }
+
+ // Returns everything but the first entry of the `array`. Especially useful on
+ // the `arguments` object. Passing an **n** will return the rest N values in the
+ // `array`.
+ function rest(array, n, guard) {
+ return slice.call(array, n == null || guard ? 1 : n);
+ }
+
+ // Get the last element of an array. Passing **n** will return the last N
+ // values in the array.
+ function last(array, n, guard) {
+ if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
+ if (n == null || guard) return array[array.length - 1];
+ return rest(array, Math.max(0, array.length - n));
+ }
+
+ // Trim out all falsy values from an array.
+ function compact(array) {
+ return filter(array, Boolean);
+ }
+
+ // Flatten out an array, either recursively (by default), or up to `depth`.
+ // Passing `true` or `false` as `depth` means `1` or `Infinity`, respectively.
+ function flatten$1(array, depth) {
+ return flatten(array, depth, false);
+ }
+
+ // Take the difference between one array and a number of other arrays.
+ // Only the elements present in just the first array will remain.
+ var difference = restArguments(function(array, rest) {
+ rest = flatten(rest, true, true);
+ return filter(array, function(value){
+ return !contains(rest, value);
+ });
+ });
+
+ // Return a version of the array that does not contain the specified value(s).
+ var without = restArguments(function(array, otherArrays) {
+ return difference(array, otherArrays);
+ });
+
+ // Produce a duplicate-free version of the array. If the array has already
+ // been sorted, you have the option of using a faster algorithm.
+ // The faster algorithm will not work with an iteratee if the iteratee
+ // is not a one-to-one function, so providing an iteratee will disable
+ // the faster algorithm.
+ function uniq(array, isSorted, iteratee, context) {
+ if (!isBoolean(isSorted)) {
+ context = iteratee;
+ iteratee = isSorted;
+ isSorted = false;
+ }
+ if (iteratee != null) iteratee = cb(iteratee, context);
+ var result = [];
+ var seen = [];
+ for (var i = 0, length = getLength(array); i < length; i++) {
+ var value = array[i],
+ computed = iteratee ? iteratee(value, i, array) : value;
+ if (isSorted && !iteratee) {
+ if (!i || seen !== computed) result.push(value);
+ seen = computed;
+ } else if (iteratee) {
+ if (!contains(seen, computed)) {
+ seen.push(computed);
+ result.push(value);
+ }
+ } else if (!contains(result, value)) {
+ result.push(value);
+ }
+ }
+ return result;
+ }
+
+ // Produce an array that contains the union: each distinct element from all of
+ // the passed-in arrays.
+ var union = restArguments(function(arrays) {
+ return uniq(flatten(arrays, true, true));
+ });
+
+ // Produce an array that contains every item shared between all the
+ // passed-in arrays.
+ function intersection(array) {
+ var result = [];
+ var argsLength = arguments.length;
+ for (var i = 0, length = getLength(array); i < length; i++) {
+ var item = array[i];
+ if (contains(result, item)) continue;
+ var j;
+ for (j = 1; j < argsLength; j++) {
+ if (!contains(arguments[j], item)) break;
+ }
+ if (j === argsLength) result.push(item);
+ }
+ return result;
+ }
+
+ // Complement of zip. Unzip accepts an array of arrays and groups
+ // each array's elements on shared indices.
+ function unzip(array) {
+ var length = array && max(array, getLength).length || 0;
+ var result = Array(length);
+
+ for (var index = 0; index < length; index++) {
+ result[index] = pluck(array, index);
+ }
+ return result;
+ }
+
+ // Zip together multiple lists into a single array -- elements that share
+ // an index go together.
+ var zip = restArguments(unzip);
+
+ // Converts lists into objects. Pass either a single array of `[key, value]`
+ // pairs, or two parallel arrays of the same length -- one of keys, and one of
+ // the corresponding values. Passing by pairs is the reverse of `_.pairs`.
+ function object(list, values) {
+ var result = {};
+ for (var i = 0, length = getLength(list); i < length; i++) {
+ if (values) {
+ result[list[i]] = values[i];
+ } else {
+ result[list[i][0]] = list[i][1];
+ }
+ }
+ return result;
+ }
+
+ // Generate an integer Array containing an arithmetic progression. A port of
+ // the native Python `range()` function. See
+ // [the Python documentation](https://docs.python.org/library/functions.html#range).
+ function range(start, stop, step) {
+ if (stop == null) {
+ stop = start || 0;
+ start = 0;
+ }
+ if (!step) {
+ step = stop < start ? -1 : 1;
+ }
+
+ var length = Math.max(Math.ceil((stop - start) / step), 0);
+ var range = Array(length);
+
+ for (var idx = 0; idx < length; idx++, start += step) {
+ range[idx] = start;
+ }
+
+ return range;
+ }
+
+ // Chunk a single array into multiple arrays, each containing `count` or fewer
+ // items.
+ function chunk(array, count) {
+ if (count == null || count < 1) return [];
+ var result = [];
+ var i = 0, length = array.length;
+ while (i < length) {
+ result.push(slice.call(array, i, i += count));
+ }
+ return result;
+ }
+
+ // Helper function to continue chaining intermediate results.
+ function chainResult(instance, obj) {
+ return instance._chain ? _(obj).chain() : obj;
+ }
+
+ // Add your own custom functions to the Underscore object.
+ function mixin(obj) {
+ each(functions(obj), function(name) {
+ var func = _[name] = obj[name];
+ _.prototype[name] = function() {
+ var args = [this._wrapped];
+ push.apply(args, arguments);
+ return chainResult(this, func.apply(_, args));
+ };
+ });
+ return _;
+ }
+
+ // Add all mutator `Array` functions to the wrapper.
+ each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
+ var method = ArrayProto[name];
+ _.prototype[name] = function() {
+ var obj = this._wrapped;
+ if (obj != null) {
+ method.apply(obj, arguments);
+ if ((name === 'shift' || name === 'splice') && obj.length === 0) {
+ delete obj[0];
+ }
+ }
+ return chainResult(this, obj);
+ };
+ });
+
+ // Add all accessor `Array` functions to the wrapper.
+ each(['concat', 'join', 'slice'], function(name) {
+ var method = ArrayProto[name];
+ _.prototype[name] = function() {
+ var obj = this._wrapped;
+ if (obj != null) obj = method.apply(obj, arguments);
+ return chainResult(this, obj);
+ };
+ });
+
+ // Named Exports
+
+ var allExports = {
+ __proto__: null,
+ VERSION: VERSION,
+ restArguments: restArguments,
+ isObject: isObject,
+ isNull: isNull,
+ isUndefined: isUndefined,
+ isBoolean: isBoolean,
+ isElement: isElement,
+ isString: isString,
+ isNumber: isNumber,
+ isDate: isDate,
+ isRegExp: isRegExp,
+ isError: isError,
+ isSymbol: isSymbol,
+ isArrayBuffer: isArrayBuffer,
+ isDataView: isDataView$1,
+ isArray: isArray,
+ isFunction: isFunction$1,
+ isArguments: isArguments$1,
+ isFinite: isFinite$1,
+ isNaN: isNaN$1,
+ isTypedArray: isTypedArray$1,
+ isEmpty: isEmpty,
+ isMatch: isMatch,
+ isEqual: isEqual,
+ isMap: isMap,
+ isWeakMap: isWeakMap,
+ isSet: isSet,
+ isWeakSet: isWeakSet,
+ keys: keys,
+ allKeys: allKeys,
+ values: values,
+ pairs: pairs,
+ invert: invert,
+ functions: functions,
+ methods: functions,
+ extend: extend,
+ extendOwn: extendOwn,
+ assign: extendOwn,
+ defaults: defaults,
+ create: create,
+ clone: clone,
+ tap: tap,
+ get: get,
+ has: has$1,
+ mapObject: mapObject,
+ identity: identity,
+ constant: constant,
+ noop: noop,
+ toPath: toPath,
+ property: property,
+ propertyOf: propertyOf,
+ matcher: matcher,
+ matches: matcher,
+ times: times,
+ random: random,
+ now: now,
+ escape: _escape,
+ unescape: _unescape,
+ templateSettings: templateSettings,
+ template: template,
+ result: result,
+ uniqueId: uniqueId,
+ chain: chain,
+ iteratee: iteratee,
+ partial: partial,
+ bind: bind,
+ bindAll: bindAll,
+ memoize: memoize,
+ delay: delay,
+ defer: defer,
+ throttle: throttle,
+ debounce: debounce,
+ wrap: wrap,
+ negate: negate,
+ compose: compose,
+ after: after,
+ before: before,
+ once: once,
+ findKey: findKey,
+ findIndex: findIndex,
+ findLastIndex: findLastIndex,
+ sortedIndex: sortedIndex,
+ indexOf: indexOf,
+ lastIndexOf: lastIndexOf,
+ find: find,
+ detect: find,
+ findWhere: findWhere,
+ each: each,
+ forEach: each,
+ map: map,
+ collect: map,
+ reduce: reduce,
+ foldl: reduce,
+ inject: reduce,
+ reduceRight: reduceRight,
+ foldr: reduceRight,
+ filter: filter,
+ select: filter,
+ reject: reject,
+ every: every,
+ all: every,
+ some: some,
+ any: some,
+ contains: contains,
+ includes: contains,
+ include: contains,
+ invoke: invoke,
+ pluck: pluck,
+ where: where,
+ max: max,
+ min: min,
+ shuffle: shuffle,
+ sample: sample,
+ sortBy: sortBy,
+ groupBy: groupBy,
+ indexBy: indexBy,
+ countBy: countBy,
+ partition: partition,
+ toArray: toArray,
+ size: size,
+ pick: pick,
+ omit: omit,
+ first: first,
+ head: first,
+ take: first,
+ initial: initial,
+ last: last,
+ rest: rest,
+ tail: rest,
+ drop: rest,
+ compact: compact,
+ flatten: flatten$1,
+ without: without,
+ uniq: uniq,
+ unique: uniq,
+ union: union,
+ intersection: intersection,
+ difference: difference,
+ unzip: unzip,
+ transpose: unzip,
+ zip: zip,
+ object: object,
+ range: range,
+ chunk: chunk,
+ mixin: mixin,
+ 'default': _
+ };
+
+ // Default Export
+
+ // Add all of the Underscore functions to the wrapper object.
+ var _$1 = mixin(allExports);
+ // Legacy Node.js API.
+ _$1._ = _$1;
+
+ return _$1;
+
+})));
+//# sourceMappingURL=underscore.js.map
diff --git a/docs/_build/html/_static/underscore-1.3.1.js b/docs/_build/html/_static/underscore-1.3.1.js
deleted file mode 100644
index 208d4cd8..00000000
--- a/docs/_build/html/_static/underscore-1.3.1.js
+++ /dev/null
@@ -1,999 +0,0 @@
-// Underscore.js 1.3.1
-// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
-// Underscore is freely distributable under the MIT license.
-// Portions of Underscore are inspired or borrowed from Prototype,
-// Oliver Steele's Functional, and John Resig's Micro-Templating.
-// For all details and documentation:
-// http://documentcloud.github.com/underscore
-
-(function() {
-
- // Baseline setup
- // --------------
-
- // Establish the root object, `window` in the browser, or `global` on the server.
- var root = this;
-
- // Save the previous value of the `_` variable.
- var previousUnderscore = root._;
-
- // Establish the object that gets returned to break out of a loop iteration.
- var breaker = {};
-
- // Save bytes in the minified (but not gzipped) version:
- var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
-
- // Create quick reference variables for speed access to core prototypes.
- var slice = ArrayProto.slice,
- unshift = ArrayProto.unshift,
- toString = ObjProto.toString,
- hasOwnProperty = ObjProto.hasOwnProperty;
-
- // All **ECMAScript 5** native function implementations that we hope to use
- // are declared here.
- var
- nativeForEach = ArrayProto.forEach,
- nativeMap = ArrayProto.map,
- nativeReduce = ArrayProto.reduce,
- nativeReduceRight = ArrayProto.reduceRight,
- nativeFilter = ArrayProto.filter,
- nativeEvery = ArrayProto.every,
- nativeSome = ArrayProto.some,
- nativeIndexOf = ArrayProto.indexOf,
- nativeLastIndexOf = ArrayProto.lastIndexOf,
- nativeIsArray = Array.isArray,
- nativeKeys = Object.keys,
- nativeBind = FuncProto.bind;
-
- // Create a safe reference to the Underscore object for use below.
- var _ = function(obj) { return new wrapper(obj); };
-
- // Export the Underscore object for **Node.js**, with
- // backwards-compatibility for the old `require()` API. If we're in
- // the browser, add `_` as a global object via a string identifier,
- // for Closure Compiler "advanced" mode.
- if (typeof exports !== 'undefined') {
- if (typeof module !== 'undefined' && module.exports) {
- exports = module.exports = _;
- }
- exports._ = _;
- } else {
- root['_'] = _;
- }
-
- // Current version.
- _.VERSION = '1.3.1';
-
- // Collection Functions
- // --------------------
-
- // The cornerstone, an `each` implementation, aka `forEach`.
- // Handles objects with the built-in `forEach`, arrays, and raw objects.
- // Delegates to **ECMAScript 5**'s native `forEach` if available.
- var each = _.each = _.forEach = function(obj, iterator, context) {
- if (obj == null) return;
- if (nativeForEach && obj.forEach === nativeForEach) {
- obj.forEach(iterator, context);
- } else if (obj.length === +obj.length) {
- for (var i = 0, l = obj.length; i < l; i++) {
- if (i in obj && iterator.call(context, obj[i], i, obj) === breaker) return;
- }
- } else {
- for (var key in obj) {
- if (_.has(obj, key)) {
- if (iterator.call(context, obj[key], key, obj) === breaker) return;
- }
- }
- }
- };
-
- // Return the results of applying the iterator to each element.
- // Delegates to **ECMAScript 5**'s native `map` if available.
- _.map = _.collect = function(obj, iterator, context) {
- var results = [];
- if (obj == null) return results;
- if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);
- each(obj, function(value, index, list) {
- results[results.length] = iterator.call(context, value, index, list);
- });
- if (obj.length === +obj.length) results.length = obj.length;
- return results;
- };
-
- // **Reduce** builds up a single result from a list of values, aka `inject`,
- // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available.
- _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {
- var initial = arguments.length > 2;
- if (obj == null) obj = [];
- if (nativeReduce && obj.reduce === nativeReduce) {
- if (context) iterator = _.bind(iterator, context);
- return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);
- }
- each(obj, function(value, index, list) {
- if (!initial) {
- memo = value;
- initial = true;
- } else {
- memo = iterator.call(context, memo, value, index, list);
- }
- });
- if (!initial) throw new TypeError('Reduce of empty array with no initial value');
- return memo;
- };
-
- // The right-associative version of reduce, also known as `foldr`.
- // Delegates to **ECMAScript 5**'s native `reduceRight` if available.
- _.reduceRight = _.foldr = function(obj, iterator, memo, context) {
- var initial = arguments.length > 2;
- if (obj == null) obj = [];
- if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {
- if (context) iterator = _.bind(iterator, context);
- return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);
- }
- var reversed = _.toArray(obj).reverse();
- if (context && !initial) iterator = _.bind(iterator, context);
- return initial ? _.reduce(reversed, iterator, memo, context) : _.reduce(reversed, iterator);
- };
-
- // Return the first value which passes a truth test. Aliased as `detect`.
- _.find = _.detect = function(obj, iterator, context) {
- var result;
- any(obj, function(value, index, list) {
- if (iterator.call(context, value, index, list)) {
- result = value;
- return true;
- }
- });
- return result;
- };
-
- // Return all the elements that pass a truth test.
- // Delegates to **ECMAScript 5**'s native `filter` if available.
- // Aliased as `select`.
- _.filter = _.select = function(obj, iterator, context) {
- var results = [];
- if (obj == null) return results;
- if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);
- each(obj, function(value, index, list) {
- if (iterator.call(context, value, index, list)) results[results.length] = value;
- });
- return results;
- };
-
- // Return all the elements for which a truth test fails.
- _.reject = function(obj, iterator, context) {
- var results = [];
- if (obj == null) return results;
- each(obj, function(value, index, list) {
- if (!iterator.call(context, value, index, list)) results[results.length] = value;
- });
- return results;
- };
-
- // Determine whether all of the elements match a truth test.
- // Delegates to **ECMAScript 5**'s native `every` if available.
- // Aliased as `all`.
- _.every = _.all = function(obj, iterator, context) {
- var result = true;
- if (obj == null) return result;
- if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context);
- each(obj, function(value, index, list) {
- if (!(result = result && iterator.call(context, value, index, list))) return breaker;
- });
- return result;
- };
-
- // Determine if at least one element in the object matches a truth test.
- // Delegates to **ECMAScript 5**'s native `some` if available.
- // Aliased as `any`.
- var any = _.some = _.any = function(obj, iterator, context) {
- iterator || (iterator = _.identity);
- var result = false;
- if (obj == null) return result;
- if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);
- each(obj, function(value, index, list) {
- if (result || (result = iterator.call(context, value, index, list))) return breaker;
- });
- return !!result;
- };
-
- // Determine if a given value is included in the array or object using `===`.
- // Aliased as `contains`.
- _.include = _.contains = function(obj, target) {
- var found = false;
- if (obj == null) return found;
- if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
- found = any(obj, function(value) {
- return value === target;
- });
- return found;
- };
-
- // Invoke a method (with arguments) on every item in a collection.
- _.invoke = function(obj, method) {
- var args = slice.call(arguments, 2);
- return _.map(obj, function(value) {
- return (_.isFunction(method) ? method || value : value[method]).apply(value, args);
- });
- };
-
- // Convenience version of a common use case of `map`: fetching a property.
- _.pluck = function(obj, key) {
- return _.map(obj, function(value){ return value[key]; });
- };
-
- // Return the maximum element or (element-based computation).
- _.max = function(obj, iterator, context) {
- if (!iterator && _.isArray(obj)) return Math.max.apply(Math, obj);
- if (!iterator && _.isEmpty(obj)) return -Infinity;
- var result = {computed : -Infinity};
- each(obj, function(value, index, list) {
- var computed = iterator ? iterator.call(context, value, index, list) : value;
- computed >= result.computed && (result = {value : value, computed : computed});
- });
- return result.value;
- };
-
- // Return the minimum element (or element-based computation).
- _.min = function(obj, iterator, context) {
- if (!iterator && _.isArray(obj)) return Math.min.apply(Math, obj);
- if (!iterator && _.isEmpty(obj)) return Infinity;
- var result = {computed : Infinity};
- each(obj, function(value, index, list) {
- var computed = iterator ? iterator.call(context, value, index, list) : value;
- computed < result.computed && (result = {value : value, computed : computed});
- });
- return result.value;
- };
-
- // Shuffle an array.
- _.shuffle = function(obj) {
- var shuffled = [], rand;
- each(obj, function(value, index, list) {
- if (index == 0) {
- shuffled[0] = value;
- } else {
- rand = Math.floor(Math.random() * (index + 1));
- shuffled[index] = shuffled[rand];
- shuffled[rand] = value;
- }
- });
- return shuffled;
- };
-
- // Sort the object's values by a criterion produced by an iterator.
- _.sortBy = function(obj, iterator, context) {
- return _.pluck(_.map(obj, function(value, index, list) {
- return {
- value : value,
- criteria : iterator.call(context, value, index, list)
- };
- }).sort(function(left, right) {
- var a = left.criteria, b = right.criteria;
- return a < b ? -1 : a > b ? 1 : 0;
- }), 'value');
- };
-
- // Groups the object's values by a criterion. Pass either a string attribute
- // to group by, or a function that returns the criterion.
- _.groupBy = function(obj, val) {
- var result = {};
- var iterator = _.isFunction(val) ? val : function(obj) { return obj[val]; };
- each(obj, function(value, index) {
- var key = iterator(value, index);
- (result[key] || (result[key] = [])).push(value);
- });
- return result;
- };
-
- // Use a comparator function to figure out at what index an object should
- // be inserted so as to maintain order. Uses binary search.
- _.sortedIndex = function(array, obj, iterator) {
- iterator || (iterator = _.identity);
- var low = 0, high = array.length;
- while (low < high) {
- var mid = (low + high) >> 1;
- iterator(array[mid]) < iterator(obj) ? low = mid + 1 : high = mid;
- }
- return low;
- };
-
- // Safely convert anything iterable into a real, live array.
- _.toArray = function(iterable) {
- if (!iterable) return [];
- if (iterable.toArray) return iterable.toArray();
- if (_.isArray(iterable)) return slice.call(iterable);
- if (_.isArguments(iterable)) return slice.call(iterable);
- return _.values(iterable);
- };
-
- // Return the number of elements in an object.
- _.size = function(obj) {
- return _.toArray(obj).length;
- };
-
- // Array Functions
- // ---------------
-
- // Get the first element of an array. Passing **n** will return the first N
- // values in the array. Aliased as `head`. The **guard** check allows it to work
- // with `_.map`.
- _.first = _.head = function(array, n, guard) {
- return (n != null) && !guard ? slice.call(array, 0, n) : array[0];
- };
-
- // Returns everything but the last entry of the array. Especcialy useful on
- // the arguments object. Passing **n** will return all the values in
- // the array, excluding the last N. The **guard** check allows it to work with
- // `_.map`.
- _.initial = function(array, n, guard) {
- return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));
- };
-
- // Get the last element of an array. Passing **n** will return the last N
- // values in the array. The **guard** check allows it to work with `_.map`.
- _.last = function(array, n, guard) {
- if ((n != null) && !guard) {
- return slice.call(array, Math.max(array.length - n, 0));
- } else {
- return array[array.length - 1];
- }
- };
-
- // Returns everything but the first entry of the array. Aliased as `tail`.
- // Especially useful on the arguments object. Passing an **index** will return
- // the rest of the values in the array from that index onward. The **guard**
- // check allows it to work with `_.map`.
- _.rest = _.tail = function(array, index, guard) {
- return slice.call(array, (index == null) || guard ? 1 : index);
- };
-
- // Trim out all falsy values from an array.
- _.compact = function(array) {
- return _.filter(array, function(value){ return !!value; });
- };
-
- // Return a completely flattened version of an array.
- _.flatten = function(array, shallow) {
- return _.reduce(array, function(memo, value) {
- if (_.isArray(value)) return memo.concat(shallow ? value : _.flatten(value));
- memo[memo.length] = value;
- return memo;
- }, []);
- };
-
- // Return a version of the array that does not contain the specified value(s).
- _.without = function(array) {
- return _.difference(array, slice.call(arguments, 1));
- };
-
- // Produce a duplicate-free version of the array. If the array has already
- // been sorted, you have the option of using a faster algorithm.
- // Aliased as `unique`.
- _.uniq = _.unique = function(array, isSorted, iterator) {
- var initial = iterator ? _.map(array, iterator) : array;
- var result = [];
- _.reduce(initial, function(memo, el, i) {
- if (0 == i || (isSorted === true ? _.last(memo) != el : !_.include(memo, el))) {
- memo[memo.length] = el;
- result[result.length] = array[i];
- }
- return memo;
- }, []);
- return result;
- };
-
- // Produce an array that contains the union: each distinct element from all of
- // the passed-in arrays.
- _.union = function() {
- return _.uniq(_.flatten(arguments, true));
- };
-
- // Produce an array that contains every item shared between all the
- // passed-in arrays. (Aliased as "intersect" for back-compat.)
- _.intersection = _.intersect = function(array) {
- var rest = slice.call(arguments, 1);
- return _.filter(_.uniq(array), function(item) {
- return _.every(rest, function(other) {
- return _.indexOf(other, item) >= 0;
- });
- });
- };
-
- // Take the difference between one array and a number of other arrays.
- // Only the elements present in just the first array will remain.
- _.difference = function(array) {
- var rest = _.flatten(slice.call(arguments, 1));
- return _.filter(array, function(value){ return !_.include(rest, value); });
- };
-
- // Zip together multiple lists into a single array -- elements that share
- // an index go together.
- _.zip = function() {
- var args = slice.call(arguments);
- var length = _.max(_.pluck(args, 'length'));
- var results = new Array(length);
- for (var i = 0; i < length; i++) results[i] = _.pluck(args, "" + i);
- return results;
- };
-
- // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),
- // we need this function. Return the position of the first occurrence of an
- // item in an array, or -1 if the item is not included in the array.
- // Delegates to **ECMAScript 5**'s native `indexOf` if available.
- // If the array is large and already in sort order, pass `true`
- // for **isSorted** to use binary search.
- _.indexOf = function(array, item, isSorted) {
- if (array == null) return -1;
- var i, l;
- if (isSorted) {
- i = _.sortedIndex(array, item);
- return array[i] === item ? i : -1;
- }
- if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item);
- for (i = 0, l = array.length; i < l; i++) if (i in array && array[i] === item) return i;
- return -1;
- };
-
- // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available.
- _.lastIndexOf = function(array, item) {
- if (array == null) return -1;
- if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) return array.lastIndexOf(item);
- var i = array.length;
- while (i--) if (i in array && array[i] === item) return i;
- return -1;
- };
-
- // Generate an integer Array containing an arithmetic progression. A port of
- // the native Python `range()` function. See
- // [the Python documentation](http://docs.python.org/library/functions.html#range).
- _.range = function(start, stop, step) {
- if (arguments.length <= 1) {
- stop = start || 0;
- start = 0;
- }
- step = arguments[2] || 1;
-
- var len = Math.max(Math.ceil((stop - start) / step), 0);
- var idx = 0;
- var range = new Array(len);
-
- while(idx < len) {
- range[idx++] = start;
- start += step;
- }
-
- return range;
- };
-
- // Function (ahem) Functions
- // ------------------
-
- // Reusable constructor function for prototype setting.
- var ctor = function(){};
-
- // Create a function bound to a given object (assigning `this`, and arguments,
- // optionally). Binding with arguments is also known as `curry`.
- // Delegates to **ECMAScript 5**'s native `Function.bind` if available.
- // We check for `func.bind` first, to fail fast when `func` is undefined.
- _.bind = function bind(func, context) {
- var bound, args;
- if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
- if (!_.isFunction(func)) throw new TypeError;
- args = slice.call(arguments, 2);
- return bound = function() {
- if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments)));
- ctor.prototype = func.prototype;
- var self = new ctor;
- var result = func.apply(self, args.concat(slice.call(arguments)));
- if (Object(result) === result) return result;
- return self;
- };
- };
-
- // Bind all of an object's methods to that object. Useful for ensuring that
- // all callbacks defined on an object belong to it.
- _.bindAll = function(obj) {
- var funcs = slice.call(arguments, 1);
- if (funcs.length == 0) funcs = _.functions(obj);
- each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });
- return obj;
- };
-
- // Memoize an expensive function by storing its results.
- _.memoize = function(func, hasher) {
- var memo = {};
- hasher || (hasher = _.identity);
- return function() {
- var key = hasher.apply(this, arguments);
- return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));
- };
- };
-
- // Delays a function for the given number of milliseconds, and then calls
- // it with the arguments supplied.
- _.delay = function(func, wait) {
- var args = slice.call(arguments, 2);
- return setTimeout(function(){ return func.apply(func, args); }, wait);
- };
-
- // Defers a function, scheduling it to run after the current call stack has
- // cleared.
- _.defer = function(func) {
- return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));
- };
-
- // Returns a function, that, when invoked, will only be triggered at most once
- // during a given window of time.
- _.throttle = function(func, wait) {
- var context, args, timeout, throttling, more;
- var whenDone = _.debounce(function(){ more = throttling = false; }, wait);
- return function() {
- context = this; args = arguments;
- var later = function() {
- timeout = null;
- if (more) func.apply(context, args);
- whenDone();
- };
- if (!timeout) timeout = setTimeout(later, wait);
- if (throttling) {
- more = true;
- } else {
- func.apply(context, args);
- }
- whenDone();
- throttling = true;
- };
- };
-
- // Returns a function, that, as long as it continues to be invoked, will not
- // be triggered. The function will be called after it stops being called for
- // N milliseconds.
- _.debounce = function(func, wait) {
- var timeout;
- return function() {
- var context = this, args = arguments;
- var later = function() {
- timeout = null;
- func.apply(context, args);
- };
- clearTimeout(timeout);
- timeout = setTimeout(later, wait);
- };
- };
-
- // Returns a function that will be executed at most one time, no matter how
- // often you call it. Useful for lazy initialization.
- _.once = function(func) {
- var ran = false, memo;
- return function() {
- if (ran) return memo;
- ran = true;
- return memo = func.apply(this, arguments);
- };
- };
-
- // Returns the first function passed as an argument to the second,
- // allowing you to adjust arguments, run code before and after, and
- // conditionally execute the original function.
- _.wrap = function(func, wrapper) {
- return function() {
- var args = [func].concat(slice.call(arguments, 0));
- return wrapper.apply(this, args);
- };
- };
-
- // Returns a function that is the composition of a list of functions, each
- // consuming the return value of the function that follows.
- _.compose = function() {
- var funcs = arguments;
- return function() {
- var args = arguments;
- for (var i = funcs.length - 1; i >= 0; i--) {
- args = [funcs[i].apply(this, args)];
- }
- return args[0];
- };
- };
-
- // Returns a function that will only be executed after being called N times.
- _.after = function(times, func) {
- if (times <= 0) return func();
- return function() {
- if (--times < 1) { return func.apply(this, arguments); }
- };
- };
-
- // Object Functions
- // ----------------
-
- // Retrieve the names of an object's properties.
- // Delegates to **ECMAScript 5**'s native `Object.keys`
- _.keys = nativeKeys || function(obj) {
- if (obj !== Object(obj)) throw new TypeError('Invalid object');
- var keys = [];
- for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key;
- return keys;
- };
-
- // Retrieve the values of an object's properties.
- _.values = function(obj) {
- return _.map(obj, _.identity);
- };
-
- // Return a sorted list of the function names available on the object.
- // Aliased as `methods`
- _.functions = _.methods = function(obj) {
- var names = [];
- for (var key in obj) {
- if (_.isFunction(obj[key])) names.push(key);
- }
- return names.sort();
- };
-
- // Extend a given object with all the properties in passed-in object(s).
- _.extend = function(obj) {
- each(slice.call(arguments, 1), function(source) {
- for (var prop in source) {
- obj[prop] = source[prop];
- }
- });
- return obj;
- };
-
- // Fill in a given object with default properties.
- _.defaults = function(obj) {
- each(slice.call(arguments, 1), function(source) {
- for (var prop in source) {
- if (obj[prop] == null) obj[prop] = source[prop];
- }
- });
- return obj;
- };
-
- // Create a (shallow-cloned) duplicate of an object.
- _.clone = function(obj) {
- if (!_.isObject(obj)) return obj;
- return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
- };
-
- // Invokes interceptor with the obj, and then returns obj.
- // The primary purpose of this method is to "tap into" a method chain, in
- // order to perform operations on intermediate results within the chain.
- _.tap = function(obj, interceptor) {
- interceptor(obj);
- return obj;
- };
-
- // Internal recursive comparison function.
- function eq(a, b, stack) {
- // Identical objects are equal. `0 === -0`, but they aren't identical.
- // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.
- if (a === b) return a !== 0 || 1 / a == 1 / b;
- // A strict comparison is necessary because `null == undefined`.
- if (a == null || b == null) return a === b;
- // Unwrap any wrapped objects.
- if (a._chain) a = a._wrapped;
- if (b._chain) b = b._wrapped;
- // Invoke a custom `isEqual` method if one is provided.
- if (a.isEqual && _.isFunction(a.isEqual)) return a.isEqual(b);
- if (b.isEqual && _.isFunction(b.isEqual)) return b.isEqual(a);
- // Compare `[[Class]]` names.
- var className = toString.call(a);
- if (className != toString.call(b)) return false;
- switch (className) {
- // Strings, numbers, dates, and booleans are compared by value.
- case '[object String]':
- // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
- // equivalent to `new String("5")`.
- return a == String(b);
- case '[object Number]':
- // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for
- // other numeric values.
- return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);
- case '[object Date]':
- case '[object Boolean]':
- // Coerce dates and booleans to numeric primitive values. Dates are compared by their
- // millisecond representations. Note that invalid dates with millisecond representations
- // of `NaN` are not equivalent.
- return +a == +b;
- // RegExps are compared by their source patterns and flags.
- case '[object RegExp]':
- return a.source == b.source &&
- a.global == b.global &&
- a.multiline == b.multiline &&
- a.ignoreCase == b.ignoreCase;
- }
- if (typeof a != 'object' || typeof b != 'object') return false;
- // Assume equality for cyclic structures. The algorithm for detecting cyclic
- // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
- var length = stack.length;
- while (length--) {
- // Linear search. Performance is inversely proportional to the number of
- // unique nested structures.
- if (stack[length] == a) return true;
- }
- // Add the first object to the stack of traversed objects.
- stack.push(a);
- var size = 0, result = true;
- // Recursively compare objects and arrays.
- if (className == '[object Array]') {
- // Compare array lengths to determine if a deep comparison is necessary.
- size = a.length;
- result = size == b.length;
- if (result) {
- // Deep compare the contents, ignoring non-numeric properties.
- while (size--) {
- // Ensure commutative equality for sparse arrays.
- if (!(result = size in a == size in b && eq(a[size], b[size], stack))) break;
- }
- }
- } else {
- // Objects with different constructors are not equivalent.
- if ('constructor' in a != 'constructor' in b || a.constructor != b.constructor) return false;
- // Deep compare objects.
- for (var key in a) {
- if (_.has(a, key)) {
- // Count the expected number of properties.
- size++;
- // Deep compare each member.
- if (!(result = _.has(b, key) && eq(a[key], b[key], stack))) break;
- }
- }
- // Ensure that both objects contain the same number of properties.
- if (result) {
- for (key in b) {
- if (_.has(b, key) && !(size--)) break;
- }
- result = !size;
- }
- }
- // Remove the first object from the stack of traversed objects.
- stack.pop();
- return result;
- }
-
- // Perform a deep comparison to check if two objects are equal.
- _.isEqual = function(a, b) {
- return eq(a, b, []);
- };
-
- // Is a given array, string, or object empty?
- // An "empty" object has no enumerable own-properties.
- _.isEmpty = function(obj) {
- if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;
- for (var key in obj) if (_.has(obj, key)) return false;
- return true;
- };
-
- // Is a given value a DOM element?
- _.isElement = function(obj) {
- return !!(obj && obj.nodeType == 1);
- };
-
- // Is a given value an array?
- // Delegates to ECMA5's native Array.isArray
- _.isArray = nativeIsArray || function(obj) {
- return toString.call(obj) == '[object Array]';
- };
-
- // Is a given variable an object?
- _.isObject = function(obj) {
- return obj === Object(obj);
- };
-
- // Is a given variable an arguments object?
- _.isArguments = function(obj) {
- return toString.call(obj) == '[object Arguments]';
- };
- if (!_.isArguments(arguments)) {
- _.isArguments = function(obj) {
- return !!(obj && _.has(obj, 'callee'));
- };
- }
-
- // Is a given value a function?
- _.isFunction = function(obj) {
- return toString.call(obj) == '[object Function]';
- };
-
- // Is a given value a string?
- _.isString = function(obj) {
- return toString.call(obj) == '[object String]';
- };
-
- // Is a given value a number?
- _.isNumber = function(obj) {
- return toString.call(obj) == '[object Number]';
- };
-
- // Is the given value `NaN`?
- _.isNaN = function(obj) {
- // `NaN` is the only value for which `===` is not reflexive.
- return obj !== obj;
- };
-
- // Is a given value a boolean?
- _.isBoolean = function(obj) {
- return obj === true || obj === false || toString.call(obj) == '[object Boolean]';
- };
-
- // Is a given value a date?
- _.isDate = function(obj) {
- return toString.call(obj) == '[object Date]';
- };
-
- // Is the given value a regular expression?
- _.isRegExp = function(obj) {
- return toString.call(obj) == '[object RegExp]';
- };
-
- // Is a given value equal to null?
- _.isNull = function(obj) {
- return obj === null;
- };
-
- // Is a given variable undefined?
- _.isUndefined = function(obj) {
- return obj === void 0;
- };
-
- // Has own property?
- _.has = function(obj, key) {
- return hasOwnProperty.call(obj, key);
- };
-
- // Utility Functions
- // -----------------
-
- // Run Underscore.js in *noConflict* mode, returning the `_` variable to its
- // previous owner. Returns a reference to the Underscore object.
- _.noConflict = function() {
- root._ = previousUnderscore;
- return this;
- };
-
- // Keep the identity function around for default iterators.
- _.identity = function(value) {
- return value;
- };
-
- // Run a function **n** times.
- _.times = function (n, iterator, context) {
- for (var i = 0; i < n; i++) iterator.call(context, i);
- };
-
- // Escape a string for HTML interpolation.
- _.escape = function(string) {
- return (''+string).replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"').replace(/'/g, ''').replace(/\//g,'/');
- };
-
- // Add your own custom functions to the Underscore object, ensuring that
- // they're correctly added to the OOP wrapper as well.
- _.mixin = function(obj) {
- each(_.functions(obj), function(name){
- addToWrapper(name, _[name] = obj[name]);
- });
- };
-
- // Generate a unique integer id (unique within the entire client session).
- // Useful for temporary DOM ids.
- var idCounter = 0;
- _.uniqueId = function(prefix) {
- var id = idCounter++;
- return prefix ? prefix + id : id;
- };
-
- // By default, Underscore uses ERB-style template delimiters, change the
- // following template settings to use alternative delimiters.
- _.templateSettings = {
- evaluate : /<%([\s\S]+?)%>/g,
- interpolate : /<%=([\s\S]+?)%>/g,
- escape : /<%-([\s\S]+?)%>/g
- };
-
- // When customizing `templateSettings`, if you don't want to define an
- // interpolation, evaluation or escaping regex, we need one that is
- // guaranteed not to match.
- var noMatch = /.^/;
-
- // Within an interpolation, evaluation, or escaping, remove HTML escaping
- // that had been previously added.
- var unescape = function(code) {
- return code.replace(/\\\\/g, '\\').replace(/\\'/g, "'");
- };
-
- // JavaScript micro-templating, similar to John Resig's implementation.
- // Underscore templating handles arbitrary delimiters, preserves whitespace,
- // and correctly escapes quotes within interpolated code.
- _.template = function(str, data) {
- var c = _.templateSettings;
- var tmpl = 'var __p=[],print=function(){__p.push.apply(__p,arguments);};' +
- 'with(obj||{}){__p.push(\'' +
- str.replace(/\\/g, '\\\\')
- .replace(/'/g, "\\'")
- .replace(c.escape || noMatch, function(match, code) {
- return "',_.escape(" + unescape(code) + "),'";
- })
- .replace(c.interpolate || noMatch, function(match, code) {
- return "'," + unescape(code) + ",'";
- })
- .replace(c.evaluate || noMatch, function(match, code) {
- return "');" + unescape(code).replace(/[\r\n\t]/g, ' ') + ";__p.push('";
- })
- .replace(/\r/g, '\\r')
- .replace(/\n/g, '\\n')
- .replace(/\t/g, '\\t')
- + "');}return __p.join('');";
- var func = new Function('obj', '_', tmpl);
- if (data) return func(data, _);
- return function(data) {
- return func.call(this, data, _);
- };
- };
-
- // Add a "chain" function, which will delegate to the wrapper.
- _.chain = function(obj) {
- return _(obj).chain();
- };
-
- // The OOP Wrapper
- // ---------------
-
- // If Underscore is called as a function, it returns a wrapped object that
- // can be used OO-style. This wrapper holds altered versions of all the
- // underscore functions. Wrapped objects may be chained.
- var wrapper = function(obj) { this._wrapped = obj; };
-
- // Expose `wrapper.prototype` as `_.prototype`
- _.prototype = wrapper.prototype;
-
- // Helper function to continue chaining intermediate results.
- var result = function(obj, chain) {
- return chain ? _(obj).chain() : obj;
- };
-
- // A method to easily add functions to the OOP wrapper.
- var addToWrapper = function(name, func) {
- wrapper.prototype[name] = function() {
- var args = slice.call(arguments);
- unshift.call(args, this._wrapped);
- return result(func.apply(_, args), this._chain);
- };
- };
-
- // Add all of the Underscore functions to the wrapper object.
- _.mixin(_);
-
- // Add all mutator Array functions to the wrapper.
- each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
- var method = ArrayProto[name];
- wrapper.prototype[name] = function() {
- var wrapped = this._wrapped;
- method.apply(wrapped, arguments);
- var length = wrapped.length;
- if ((name == 'shift' || name == 'splice') && length === 0) delete wrapped[0];
- return result(wrapped, this._chain);
- };
- });
-
- // Add all accessor Array functions to the wrapper.
- each(['concat', 'join', 'slice'], function(name) {
- var method = ArrayProto[name];
- wrapper.prototype[name] = function() {
- return result(method.apply(this._wrapped, arguments), this._chain);
- };
- });
-
- // Start chaining a wrapped Underscore object.
- wrapper.prototype.chain = function() {
- this._chain = true;
- return this;
- };
-
- // Extracts the result from a wrapped and chained object.
- wrapper.prototype.value = function() {
- return this._wrapped;
- };
-
-}).call(this);
diff --git a/docs/_build/html/_static/underscore.js b/docs/_build/html/_static/underscore.js
index 5b55f32b..166240ef 100644
--- a/docs/_build/html/_static/underscore.js
+++ b/docs/_build/html/_static/underscore.js
@@ -1,31 +1,6 @@
-// Underscore.js 1.3.1
-// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
-// Underscore is freely distributable under the MIT license.
-// Portions of Underscore are inspired or borrowed from Prototype,
-// Oliver Steele's Functional, and John Resig's Micro-Templating.
-// For all details and documentation:
-// http://documentcloud.github.com/underscore
-(function(){function q(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return false;switch(e){case "[object String]":return a==String(c);case "[object Number]":return a!=+a?c!=+c:a==0?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source==
-c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if(typeof a!="object"||typeof c!="object")return false;for(var f=d.length;f--;)if(d[f]==a)return true;d.push(a);var f=0,g=true;if(e=="[object Array]"){if(f=a.length,g=f==c.length)for(;f--;)if(!(g=f in a==f in c&&q(a[f],c[f],d)))break}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return false;for(var h in a)if(b.has(a,h)&&(f++,!(g=b.has(c,h)&&q(a[h],c[h],d))))break;if(g){for(h in c)if(b.has(c,
-h)&&!f--)break;g=!f}}d.pop();return g}var r=this,G=r._,n={},k=Array.prototype,o=Object.prototype,i=k.slice,H=k.unshift,l=o.toString,I=o.hasOwnProperty,w=k.forEach,x=k.map,y=k.reduce,z=k.reduceRight,A=k.filter,B=k.every,C=k.some,p=k.indexOf,D=k.lastIndexOf,o=Array.isArray,J=Object.keys,s=Function.prototype.bind,b=function(a){return new m(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=b;exports._=b}else r._=b;b.VERSION="1.3.1";var j=b.each=
-b.forEach=function(a,c,d){if(a!=null)if(w&&a.forEach===w)a.forEach(c,d);else if(a.length===+a.length)for(var e=0,f=a.length;e2;a==
-null&&(a=[]);if(y&&a.reduce===y)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(z&&a.reduceRight===z)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect=
-function(a,c,b){var e;E(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(A&&a.filter===A)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(B&&a.every===B)return a.every(c,b);j(a,function(a,g,h){if(!(e=
-e&&c.call(b,a,g,h)))return n});return e};var E=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(C&&a.some===C)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return n});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return p&&a.indexOf===p?a.indexOf(c)!=-1:b=E(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck=
-function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;bd?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a,
-c,d){d||(d=b.identity);for(var e=0,f=a.length;e>1;d(a[g])=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e=0;d--)b=[a[d].apply(this,b)];return b[0]}};
-b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=J||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.defaults=function(a){j(i.call(arguments,
-1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return q(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=o||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)};
-b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!b.has(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"};
-b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,b){return I.call(a,b)};b.noConflict=function(){r._=G;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};b.mixin=function(a){j(b.functions(a),
-function(c){K(c,b[c]=a[c])})};var L=0;b.uniqueId=function(a){var b=L++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var t=/.^/,u=function(a){return a.replace(/\\\\/g,"\\").replace(/\\'/g,"'")};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape||t,function(a,b){return"',_.escape("+
-u(b)+"),'"}).replace(d.interpolate||t,function(a,b){return"',"+u(b)+",'"}).replace(d.evaluate||t,function(a,b){return"');"+u(b).replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var v=function(a,c){return c?b(a).chain():a},K=function(a,c){m.prototype[a]=
-function(){var a=i.call(arguments);H.call(a,this._wrapped);return v(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return v(d,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return v(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain=
-true;return this};m.prototype.value=function(){return this._wrapped}}).call(this);
+!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define("underscore",r):(n=n||self,function(){var t=n._,e=n._=r();e.noConflict=function(){return n._=t,e}}())}(this,(function(){
+// Underscore.js 1.12.0
+// https://underscorejs.org
+// (c) 2009-2020 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+// Underscore may be freely distributed under the MIT license.
+var n="1.12.0",r="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},t=Array.prototype,e=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,o=t.push,i=t.slice,a=e.toString,f=e.hasOwnProperty,c="undefined"!=typeof ArrayBuffer,l="undefined"!=typeof DataView,s=Array.isArray,p=Object.keys,v=Object.create,h=c&&ArrayBuffer.isView,y=isNaN,g=isFinite,d=!{toString:null}.propertyIsEnumerable("toString"),b=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],m=Math.pow(2,53)-1;function j(n,r){return r=null==r?n.length-1:+r,function(){for(var t=Math.max(arguments.length-r,0),e=Array(t),u=0;u=0&&t<=m}}function $(n){return function(r){return null==r?void 0:r[n]}}var G=$("byteLength"),H=J(G),Q=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var X=c?function(n){return h?h(n)&&!q(n):H(n)&&Q.test(a.call(n))}:K(!1),Y=$("length");function Z(n,r){r=function(n){for(var r={},t=n.length,e=0;e":">",'"':""","'":"'","`":"`"},Kn=Ln(Cn),Jn=Ln(_n(Cn)),$n=tn.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Gn=/(.)^/,Hn={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Qn=/\\|'|\r|\n|\u2028|\u2029/g;function Xn(n){return"\\"+Hn[n]}var Yn=0;function Zn(n,r,t,e,u){if(!(e instanceof r))return n.apply(t,u);var o=Mn(n.prototype),i=n.apply(o,u);return _(i)?i:o}var nr=j((function(n,r){var t=nr.placeholder,e=function(){for(var u=0,o=r.length,i=Array(o),a=0;a1)er(a,r-1,t,e),u=e.length;else for(var f=0,c=a.length;f0&&(t=r.apply(this,arguments)),n<=1&&(r=null),t}}var cr=nr(fr,2);function lr(n,r,t){r=qn(r,t);for(var e,u=nn(n),o=0,i=u.length;o0?0:u-1;o>=0&&o0?a=o>=0?o:Math.max(o+f,a):f=o>=0?Math.min(o+1,f):o+f+1;else if(t&&o&&f)return e[o=t(e,u)]===u?o:-1;if(u!=u)return(o=r(i.call(e,a,f),C))>=0?o+a:-1;for(o=n>0?a:f-1;o>=0&&o0?0:i-1;for(u||(e=r[o?o[a]:a],a+=n);a>=0&&a=3;return r(n,Fn(t,u,4),e,o)}}var wr=_r(1),Ar=_r(-1);function xr(n,r,t){var e=[];return r=qn(r,t),mr(n,(function(n,t,u){r(n,t,u)&&e.push(n)})),e}function Sr(n,r,t){r=qn(r,t);for(var e=!tr(n)&&nn(n),u=(e||n).length,o=0;o=0}var Er=j((function(n,r,t){var e,u;return D(r)?u=r:(r=Nn(r),e=r.slice(0,-1),r=r[r.length-1]),jr(n,(function(n){var o=u;if(!o){if(e&&e.length&&(n=In(n,e)),null==n)return;o=n[r]}return null==o?o:o.apply(n,t)}))}));function Br(n,r){return jr(n,Rn(r))}function Nr(n,r,t){var e,u,o=-1/0,i=-1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=tr(n)?n:jn(n)).length;ao&&(o=e);else r=qn(r,t),mr(n,(function(n,t,e){((u=r(n,t,e))>i||u===-1/0&&o===-1/0)&&(o=n,i=u)}));return o}function Ir(n,r,t){if(null==r||t)return tr(n)||(n=jn(n)),n[Wn(n.length-1)];var e=tr(n)?En(n):jn(n),u=Y(e);r=Math.max(Math.min(r,u),0);for(var o=u-1,i=0;i1&&(e=Fn(e,r[1])),r=an(n)):(e=Pr,r=er(r,!1,!1),n=Object(n));for(var u=0,o=r.length;u1&&(t=r[1])):(r=jr(er(r,!1,!1),String),e=function(n,t){return!Mr(r,t)}),qr(n,e,t)}));function Wr(n,r,t){return i.call(n,0,Math.max(0,n.length-(null==r||t?1:r)))}function zr(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[0]:Wr(n,n.length-r)}function Lr(n,r,t){return i.call(n,null==r||t?1:r)}var Cr=j((function(n,r){return r=er(r,!0,!0),xr(n,(function(n){return!Mr(r,n)}))})),Kr=j((function(n,r){return Cr(n,r)}));function Jr(n,r,t,e){A(r)||(e=t,t=r,r=!1),null!=t&&(t=qn(t,e));for(var u=[],o=[],i=0,a=Y(n);ir?(e&&(clearTimeout(e),e=null),a=c,i=n.apply(u,o),e||(u=o=null)):e||!1===t.trailing||(e=setTimeout(f,l)),i};return c.cancel=function(){clearTimeout(e),a=0,e=u=o=null},c},debounce:function(n,r,t){var e,u,o=function(r,t){e=null,t&&(u=n.apply(r,t))},i=j((function(i){if(e&&clearTimeout(e),t){var a=!e;e=setTimeout(o,r),a&&(u=n.apply(this,i))}else e=or(o,r,this,i);return u}));return i.cancel=function(){clearTimeout(e),e=null},i},wrap:function(n,r){return nr(r,n)},negate:ar,compose:function(){var n=arguments,r=n.length-1;return function(){for(var t=r,e=n[r].apply(this,arguments);t--;)e=n[t].call(this,e);return e}},after:function(n,r){return function(){if(--n<1)return r.apply(this,arguments)}},before:fr,once:cr,findKey:lr,findIndex:pr,findLastIndex:vr,sortedIndex:hr,indexOf:gr,lastIndexOf:dr,find:br,detect:br,findWhere:function(n,r){return br(n,Dn(r))},each:mr,forEach:mr,map:jr,collect:jr,reduce:wr,foldl:wr,inject:wr,reduceRight:Ar,foldr:Ar,filter:xr,select:xr,reject:function(n,r,t){return xr(n,ar(qn(r)),t)},every:Sr,all:Sr,some:Or,any:Or,contains:Mr,includes:Mr,include:Mr,invoke:Er,pluck:Br,where:function(n,r){return xr(n,Dn(r))},max:Nr,min:function(n,r,t){var e,u,o=1/0,i=1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=tr(n)?n:jn(n)).length;ae||void 0===t)return 1;if(t
- Binning — TreeCorr 4.2.3 documentation
+ Binning — TreeCorr 4.2.5 documentation
@@ -32,7 +32,6 @@
-
@@ -118,6 +117,7 @@
Changes from version 4.2.1 to 4.2.2
Changes from version 4.2.2 to 4.2.3
Changes from version 4.2.3 to 4.2.4
+Changes from version 4.2.4 to 4.2.5
Previous History
diff --git a/docs/_build/html/catalog.html b/docs/_build/html/catalog.html
index 336d02ad..cb53b6f4 100644
--- a/docs/_build/html/catalog.html
+++ b/docs/_build/html/catalog.html
@@ -7,7 +7,7 @@
- Input Data — TreeCorr 4.2.3 documentation
+ Input Data — TreeCorr 4.2.5 documentation
@@ -111,6 +111,7 @@
Changes from version 4.2.1 to 4.2.2
Changes from version 4.2.2 to 4.2.3
Changes from version 4.2.3 to 4.2.4
+Changes from version 4.2.4 to 4.2.5
Previous History
@@ -185,7 +186,7 @@ Input Data¶
-
-class
treecorr.
Catalog
(file_name=None, config=None, num=0, logger=None, is_rand=False, x=None, y=None, z=None, ra=None, dec=None, r=None, w=None, wpos=None, flag=None, g1=None, g2=None, k=None, patch=None, patch_centers=None, rng=None, **kwargs)[source]¶
+class treecorr.
Catalog
(file_name=None, config=None, num=0, logger=None, is_rand=False, x=None, y=None, z=None, ra=None, dec=None, r=None, w=None, wpos=None, flag=None, g1=None, g2=None, k=None, patch=None, patch_centers=None, rng=None, **kwargs)[source]¶
A set of input data (positions and other quantities) to be correlated.
A Catalog object keeps track of the relevant information for a number of objects to
be correlated. The objects each have some kind of position (for instance (x,y), (ra,dec),
@@ -522,7 +523,7 @@
The Catalog class
-
-
checkForNaN
(col, col_str)[source]¶
+checkForNaN
(col, col_str)[source]¶
Check if the column has any NaNs. If so, set those rows to have w[k]=0.
- Parameters
@@ -536,7 +537,7 @@ The Catalog class
-
-
clear_cache
()[source]¶
+clear_cache
()[source]¶
Clear all field caches.
The various kinds of fields built from this catalog are cached. This may or may not
be an optimization for your use case. Normally only a single field is built for a
@@ -566,13 +567,13 @@
The Catalog class
-
-
copy
()[source]¶
+copy
()[source]¶
Make a copy
-
-
getGField
(min_size=0, max_size=None, split_method=None, brute=False, min_top=None, max_top=10, coords=None, logger=None)[source]¶
+getGField
(min_size=0, max_size=None, split_method=None, brute=False, min_top=None, max_top=10, coords=None, logger=None)[source]¶
Return a GField
based on the g1,g2 values in this catalog.
The GField
object is cached, so this is efficient to call multiple times.
cf. resize_cache
and clear_cache
.
@@ -601,7 +602,7 @@ The Catalog class
-
-
getGSimpleField
(logger=None)[source]¶
+getGSimpleField
(logger=None)[source]¶
Return a GSimpleField
based on the g1,g2 values in this catalog.
The GSimpleField
object is cached, so this is efficient to call multiple times.
cf. resize_cache
and clear_cache
@@ -617,7 +618,7 @@ The Catalog class
-
-
getKField
(min_size=0, max_size=None, split_method=None, brute=False, min_top=None, max_top=10, coords=None, logger=None)[source]¶
+getKField
(min_size=0, max_size=None, split_method=None, brute=False, min_top=None, max_top=10, coords=None, logger=None)[source]¶
Return a KField
based on the k values in this catalog.
The KField
object is cached, so this is efficient to call multiple times.
cf. resize_cache
and clear_cache
@@ -646,7 +647,7 @@ The Catalog class
-
-
getKSimpleField
(logger=None)[source]¶
+getKSimpleField
(logger=None)[source]¶
Return a KSimpleField
based on the k values in this catalog.
The KSimpleField
object is cached, so this is efficient to call multiple times.
cf. resize_cache
and clear_cache
@@ -662,7 +663,7 @@ The Catalog class
-
-
getNField
(min_size=0, max_size=None, split_method=None, brute=False, min_top=None, max_top=10, coords=None, logger=None)[source]¶
+getNField
(min_size=0, max_size=None, split_method=None, brute=False, min_top=None, max_top=10, coords=None, logger=None)[source]¶
Return an NField
based on the positions in this catalog.
The NField
object is cached, so this is efficient to call multiple times.
cf. resize_cache
and clear_cache
@@ -691,7 +692,7 @@ The Catalog class
-
-
getNSimpleField
(logger=None)[source]¶
+getNSimpleField
(logger=None)[source]¶
Return an NSimpleField
based on the positions in this catalog.
The NSimpleField
object is cached, so this is efficient to call multiple times.
cf. resize_cache
and clear_cache
@@ -707,7 +708,7 @@ The Catalog class
-
-
get_patch_centers
()[source]¶
+get_patch_centers
()[source]¶
Return an array of patch centers corresponding to the patches in this catalog.
If the patches were set either using K-Means or by giving the centers, then this
will just return that same center array. Otherwise, it will be calculated from the
@@ -726,13 +727,13 @@
The Catalog class
-
-
get_patch_file_names
(save_patch_dir)[source]¶
+get_patch_file_names
(save_patch_dir)[source]¶
Get the names of the files to use for reading/writing patches in save_patch_dir
-
-
get_patches
(low_mem=False)[source]¶
+get_patches
(low_mem=False)[source]¶
Return a list of Catalog instances each representing a single patch from this Catalog
After calling this function once, the patches may be repeatedly accessed by the
patches
attribute, without triggering a rebuild of the patches. Furthermore,
@@ -751,7 +752,7 @@
The Catalog class
-
-
load
()[source]¶
+load
()[source]¶
Load the data from a file, if it isn’t yet loaded.
When a Catalog is read in from a file, it tries to delay the loading of the data from
disk until it is actually needed. This is especially important when running over a
@@ -763,7 +764,7 @@
The Catalog class
-
-
makeArray
(col, col_str, dtype=<class 'float'>)[source]¶
+makeArray
(col, col_str, dtype=<class 'float'>)[source]¶
Turn the input column into a numpy array if it wasn’t already.
Also make sure the input is 1-d.
@@ -782,7 +783,7 @@ The Catalog class
-
-
read_patch_centers
(file_name)[source]¶
+read_patch_centers
(file_name)[source]¶
Read patch centers from a file.
This function typically gets called automatically when setting patch_centers as a
string, being the file name. The patch centers are read from the file and returned.
@@ -798,7 +799,7 @@ The Catalog class
-
-
read_patches
(save_patch_dir=None)[source]¶
+read_patches
(save_patch_dir=None)[source]¶
Read the patches from files on disk.
This function assumes that the patches were written using write_patches
.
In particular, the file names are not arbitrary, but must match what TreeCorr uses
@@ -820,7 +821,7 @@
The Catalog class
-
-
resize_cache
(maxsize)[source]¶
+resize_cache
(maxsize)[source]¶
Resize all field caches.
The various kinds of fields built from this catalog are cached. This may or may not
be an optimization for your use case. Normally only a single field is built for a
@@ -866,7 +867,7 @@
The Catalog class
-
-
select
(indx)[source]¶
+select
(indx)[source]¶
Trim the catalog to only include those objects with the give indices.
- Parameters
@@ -877,7 +878,7 @@ The Catalog class
-
-
unload
()[source]¶
+unload
()[source]¶
Bring the Catalog back to an “unloaded” state, if possible.
When a Catalog is read in from a file, it tries to delay the loading of the data from
disk until it is actually needed. After loading, this method will return the Catalog
@@ -891,7 +892,7 @@
The Catalog class
-
-
write
(file_name, file_type=None, cat_precision=None)[source]¶
+write
(file_name, file_type=None, cat_precision=None)[source]¶
Write the catalog to a file.
The position columns are output using the same units as were used when building the
Catalog. If you want to use a different unit, you can set the catalog’s units directly
@@ -978,7 +979,7 @@
The Catalog class
-
-
write_patch_centers
(file_name)[source]¶
+write_patch_centers
(file_name)[source]¶
Write the patch centers to a file.
The output file will include the following columns: