R      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz { | } ~         None&35   SafeUnlike the related ,  "spreads out" the shorter list by duplicating elements, before merging, to minimise the number of elements from the longer list which aren't used.associate = associateWith (,).    (c) Justus Sagemller 2016GPL v3"(@) sagemueller $ geo.uni-koeln.de experimentalportableSafe Subset-finder(c) Justus Sagemller 2016GPL v3"(@) sagemueller $ geo.uni-koeln.de experimentalportableSafe-Safe&6Simply a merge sort that discards equivalent elements.Like :, but doesn't just discard duplicates but "merges" them.  cmp = cmp `fastNubByWith' .!This function is also defined in GHC.Exts`, but only in a version that requires (["log [) function applications, as opposed to [ here.   (c) Justus Sagemller 2015GPL v3"(@) sagemueller $ geo.uni-koeln.de experimentalportableNone!"&'(*-/03457:>CFIKLNMUST have length n.MUST be between 0 and n-1.IMainly intended to be used as a data kind. Of course, we'd rather use  GHC.TypeLits- naturals, but they aren't mature enough yet.FFree vector containing the (0-based) indices of its fields as entries.[   ,6   (c) Justus Sagemller 2015GPL v3"(@) sagemueller $ geo.uni-koeln.de experimentalportableNone!"&(*-/03457:>CFIKLN A pair of matching functions. The projection must be a left (but not necessarily right) inverse of the embedding, i.e. the cardinality of a: will have to be less or equal than the cardinality of b.  Injective embedding9Surjective projection. Must be left inverse of embedding. !"#$%&'     !"#$%&'(c) Justus Sagemller 2015GPL v3"(@) sagemueller $ geo.uni-koeln.de experimentalportableNone!"&34579>FIKLNBetter known as ! z (which is not a legal Haskell name), the ray of positive numbers (including zero, i.e. closed on one end).(*Dense tensor product of two vector spaces.dAn open cone is homeomorphic to a closed cone without the lid , i.e. without the last copy  of x, at the far end of the height interval. Since that means the height does not include its supremum, it is actually more natural to express it as the entire real ray, hence the name.Range [0, "[Irrelevant at h = 0.A (closed) cone over a space x is the product of xN with the closed interval 'D' of heights , except on its tip : here, x is smashed to a single point.hThis construct becomes (homeomorphic-to-) an actual geometric cone (and to 'D') in the special case x = 'S'.Range [0, 1]Irrelevant at h = 0.The standard, closed unit disk. Homeomorphic to the cone over 'S', but not in the the obvious, flat  way. (And not at all, despite the identical ADT definition, to the projective space '!P'!)Range [0, 1].Range [-, [. The one-dimensional disk   really just the line segment between the two points -1 and 1 of 'S p', i.e. this is simply a closed interval."Range [-1, 1].#xThe two-dimensional real projective space, implemented as a unit disk with opposing points on the rim glued together.%Range [0, 1].&Range [-, [.(The ordinary unit sphere.*Range [0, [.+Range [-, [.,The unit circle..Must be in range [-, [./eThe zero-dimensional sphere is actually just two points. Implementation might therefore change to ! p  ! p1: the disjoint sum of two single-point spaces.2RA single point. Can be considered a zero-dimensional vector space, WRT any scalar.W )*+,(-. !"#$%&'()*+,-./0123/0123456789:;<=>?@ABCDEFGHIJKILM )*+,(-. !"#$%&'()*+,-./0123/0123456789:;6 )*+,(-. !"#$%&'()*+,-./0123/0123456789:;<=>?@ABCDEFGHIJK;(c) Justus Sagemller 2015GPL v3"(@) sagemueller $ geo.uni-koeln.de experimentalportableNone&'*3457:>CFKLNNSemantically the same as O tag refvs>, but directly uses the packed-vector array representation.The tag should really be kind-polymorphic, but at least GHC-7.8 doesn't quite handle the associated types of the manifold classes then.4FMany linear algebra operations are best implemented via packed, dense Pes. For one thing, that makes common general vector operations quite efficient, in particular on high-dimensional spaces. More importantly, hmatrixn offers linear facilities such as inverse and eigenbasis transformations, which aren't available in the  vector-spacew library yet. But the classes from that library are strongly preferrable to plain matrices and arrays, conceptually.The 4 class is used to convert between both representations. It would be nice not to have the requirement of finite dimension on  HerMetricH, but it's probably not feasible to get rid of it in forseeable time.Instead of the run-time 55 information, we would rather have a compile-time type Dimension v :: Nath, but type-level naturals are not mature enough yet. This will almost certainly change in the future.7Index must be in [0 .. dimension-1], otherwise this is undefined.QConstraint that a space's scalars need to fulfill so it can be used for efficient linear algebra. Fulfilled pretty much only by the basic real and complex floating-point types.!NRS456789:;<=QTUVWXYZ[\]^_`abcdefNRS456789:;<=QTUVNRS4 56789:;<=QTUVWXYZ[\]^_`abcdef(c) Justus Sagemller 2015GPL v3"(@) sagemueller $ geo.uni-koeln.de experimentalportableNone!"&(*-/03457:>CFIKLN>UClass of spaces that directly represent a free vector space, i.e. that are simply n-fold products of the base field. This class basically contains '!', '!', '!' etc., in future also the complex and probably integral versions.?QA linear mapping between finite-dimensional spaces, implemeted as a dense matrix.3Note that this is equivalent to the tensor product  DualSpace a " bi. One of the types should be deprecated in the future, or either implemented in terms of the other.gCoerce the matrix representations of two linear mappings; the result makes sense iff the spaces are canonically isomorphic (certainly if they are good instances of ).hInverse function application (for isomorphisms), or least-square solution of a linear equation. Note that least-square is not really well-defined, without reference to a norm / scalar product; the operator uses the implicit norm induced from the 4 representation.*ijk>lmn?opqgr@hstuvwxyz{|}~ijk>lmn?opqgr@hs$ijk>lmn?opqgr@hstuvwxyz{|}~None&*345:>CFKLNUAThe nG-th Stiefel manifold is the space of all possible configurations of n" orthonormal vectors. In the case nK = 1, simply the subspace of normalised vectors, i.e. equivalent to the  UnitSphereD. Even so, it strictly speaking requires the containing space to be at least metric (if not Hilbert); we would however like to be able to use this concept also in spaces with no inner product, therefore we define this space not as normalised vectors, but rather as all vectors modulo scaling by positive factors.D3While the main purpose of this class is to express S), it's actually all about dual spaces.EE v5 is isomorphic to the space of linear functionals on v , i.e. v   v#. Typically (for all Hilbert- / !s) this is in turn isomorphic to v itself, which will be rather more efficient (hence the distinction between a vector space and its dual is often neglected or reduced to column vs row vectors ). Mathematically though, it makes sense to keep the concepts apart, even if ultimately E v ~ v (which needs not always be the case, though!).F>Apply a dual space vector (aka linear functional) to a vector.G4Interpret a functional as a dual-space vector. Like , this assumes@ (completely unchecked) that the supplied function is linear.HQWhile isomorphism between a space and its dual isn't generally canonical, the  double-dual space should be canonically isomorphic in pretty much all relevant cases. Indeed, it is recommended that they are the very same type; this condition is enforced by the K0 constraint (which is recommended over using D itself in signatures).LHConstraint that a space's scalars need to fulfill so it can be used for S.OGeneralised combination of p and rD; this will give a maximum spanning set of vector-covector pairs (f,v) such that f .^v "a 1 and metric m f "a 1, whereas all f and v'@ from different tuples are orthogonal. It also yields the kernel of singular metric, spanned by a set of stiefel-manifold points, i.e. vectors of unspecified length that correspond to the eigenvalue 0. You may also consider this as a  factorisation of a linear operator  4 : I ! I' into mappings  E : I ! !  and  ? : !  ! I'5 (or, equivalently because !  is a Hilbert space,  E' : !  ! V' and  ?' : V ! ! +, which gives you an SVD-style inverse).PoA metric on the dual space; equivalent to a linear mapping from the dual space to the original vector space.Prime-versions of the functions in this module target those dual-space metrics, so we can avoid some explicit handling of double-dual spaces.SS is a portmanteau of  Hermitian and metric (in the sense as used in e.g. general relativity  though those particular ones aren't positive definite and thus not really metrics).,Mathematically, there are two directly equivalent ways to describe such a metric: as a bilinear mapping of two vectors to a scalar, or as a linear mapping from a vector space to its dual space. We choose the latter, though you can always as well think of metrics as quadratic dual vectors .8Yet other possible interpretations of this type include density matrix (as in quantum mechanics), *standard range of statistical fluctuations, and volume element.W A metric on v[ that simply yields the squared overlap of a vector with the given dual-space reference.3It will perhaps be the most common way of defining SZ values to start with such dual-space vectors and superimpose the projectors using the  instance; e.g. W (1,0)  W (0,2)M yields a hermitian operator describing the ellipsoid span of the vectors e and 2"et . Metrics generated this way are positive definite if no negative coefficients have been introduced with the  scaling operator or with .Note: #projector a ^+^ projector b ^+^ ...# is more efficiently written as projectors [a, b, ...]YEfficient shortcut for the  of multiple Ws.[hEvaluate a vector through a metric. For the canonical metric on a Hilbert space, this will be simply .]4Evaluate a vector's magnitude  through a metric. This assumes an actual mathematical metric, i.e. positive definite  otherwise the internally used square root may get negative arguments (though it can still produce results if the scalars are complex; however, complex spaces aren't supported yet).aqDivide a vector by its own norm, according to metric, i.e. normalise it or project to the metric's boundary .c Anti-normalise  a vector: multiply( with its own norm, according to metric.e7Square-sum over the metrics for each dual-space vector. 'metrics m vs "a sqrt . sum $ metricSq m  vs i"This does something vaguely like \s t -> (s"t), but without actually requiring an inner product on the covectors. Used for calculating the superaffine term of multiplications in Differentiable categories.j.This doesn't really do anything at all, since S v! is essentially a synonym for S (E v).lThe inverse mapping of a metric tensor. Since a metric maps from a space to its dual, the inverse maps from the dual into the (double-dual) space  i.e., it is a metric on the dual space. Deprecated: the singular case isn't properly handled.pThe eigenbasis of a metric, with each eigenvector scaled to the square root of the eigenvalue. If the metric is not positive definite (i.e. if it has zero eigenvalues), then the p will contain zero vectors.KThis constitutes, in a sense, a decomposition of a metric into a set of X vectors. If those are ed again (use  projectors's for this), then the original metric is obtained. (This holds even for non-Hilbert/Banach spaces, although the concept of eigenbasis and scaled length  doesn't really make sense there.)r]The reciprocal-space counterparts of the nonzero-EV eigenvectors, as can be obtained from pd. The systems of vectors/dual vectors behave as orthonormal groups WRT each other, i.e. for each f in r m there will be exactly one v in p m such that f .^v "a 1 ; the other f .^v pairings are zero. Furthermore, ] m f "a 1 for each fl in the co-span, which might be seen as the actual defining characteristic of these span/co-span systems.tSimple flipped version of F.vTranspose a linear operator. Contrary to popular belief, this does not just inverse the direction of mapping between the spaces, but also switch to their duals.w}Project a metric on each of the factors of a product space. This works by projecting the eigenvectors into both subspaces.Unsafe version of E, only works reliable if the metric is strictly positive definite.Same as , but with the standard euclideanMetricM (i.e., the basis vectors will be orthonormal in the usual sense, in both w and v). Deprecated8Deprecated (this doesn't preserve positive-definiteness)lABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~8Metric to induce the inner product on the Hilbert space.n4 linearly independent vectors, to span the subspace w.An embedding of the n-dimensional free subspace wJ (if the given vectors actually span such a space) into the main space v$. Regardless of the structure of v; (which doesn't need to have an inner product at all!), w will be an 8 with the scalar product defined by the given metric.U456789:;<=>ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~USTUPQR_`[\]^efWXYZu>wxyzghijklmnopqrsMNOabdcvV{|}KDEFGHIJtL456789:;<=ABC~^ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Ft(c) Justus Sagemller 2015GPL v3"(@) sagemueller $ geo.uni-koeln.de experimentalportableNone!"&(34579:>FHIKLNV}A Riemannian metric assigns each point on a manifold a scalar product on the tangent space. Note that this association is not continuous, because the charts/tangent spaces in the bundle are a priori disjoint. However, for a proper Riemannian metric, all arising expressions of scalar products from needles between points on the manifold ought to be differentiable.EThe word metric  is used in the sense as in general relativity. Cf. S.A co-needle can be understood as a paper stack , with which you can measure the length that a needle reaches in a given direction by counting the number of holes punched through them.QAn euclidean space is a real affine space whose tangent space is a Hilbert space.A Hilbert space is a completeE inner product space. Being a vector space, it is also a manifold.^(Stricly speaking, that doesn't have much to do with the completeness criterion; but since \s are at the moment confined to finite dimension, they are in fact (trivially) complete.)The ! class plus manifold constraints.The ! class plus manifold constraints.qRequire some constraint on a manifold, and also fix the type of the manifold's underlying field. For example,  WithField !  v constrains v to be a real (i.e., T-) Hilbert space. Note that for this to compile, you will in general need the -XLiberalTypeSynonymsF extension (except if the constraint is an actual type class (like 6): only those can always be partially applied, for type- constraints this is by default not allowed).+Basically just an updated  version of the O class. Every vector space is a manifold, this constraint makes it explicit. (Actually,  is stronger than  at the moment, since K requires 4&. This might be lifted in the future.)JInstances of this class must be diffeomorphic manifolds, and even have canonically isomorphic tangent spaces, so that < . : ::  x ->  J defines a meaningful representational identity  between these spaces.RMust be compatible with the canonical isomorphism on the tangent spaces, i.e. ' locallyTrivialDiffeomorphism (p .+~^ <- v) "a locallyTrivialDiffeomorphism p .+~^ < v See  and  for the methods.)This is the class underlying manifolds. ( only precludes boundaries and adds an extra constraint that would be circular if it was in a single class. You can always just use 5 as a constraint in your signatures, but you must define only  for manifold types  the , instance follows universally from this, if 'Interior x ~ x.)LThe interface is (boundaries aside) almost identical to the better-known . class, but we don't require associativity of  with   except in an asymptotic sense for small vectors.QThat innocent-looking change makes the class applicable to vastly more general types: while an affine space is basically nothing but a vector space without particularly designated origin, a pseudo-affine space can have nontrivial topology on the global scale, and yet be used in practically the same way as an affine space. At least the usual spheres and tori make good instances, perhaps the class is in fact equivalent to manifolds in their usual maths definition (with an atlas of charts: a family of overlapping regions of the topological space, each homeomorphic to the : vector space or some simply-connected subset thereof).BThe path reaching from one point to another. Should only yield  ifBThe points are on disjoint segments of a non path-connected space.-Either of the points is on the boundary. Use |-~. to deal with this.On manifolds, the identity p .+~^ (q.-~.p) "a q Dshould hold, at least save for floating-point precision limits etc.. and ; only really work in manifolds without boundary. If you consider the path between two points, one of which lies on the boundary, it can't really be possible to scale this path any longer  it would have to reach out of the manifold . To adress this problem, these functions basically consider only the interior of the space.Unsafe version of K. If the two points lie in disjoint regions, the behaviour is undefined.The space of natural  ways starting from some reference point and going to some particular target point. Hence, the name: like a compass needle, but also with an actual length. For affine spaces, \ is simply the space of line segments (aka vectors) between two points, i.e. the same as  . The , constraint makes that requirement explicit.dThis space should be isomorphic to the tangent space (and is in fact used somewhat synonymously).Manifolds with boundary are a bit tricky. We support such manifolds, but carry out most calculations only in the fleshy part   the interior, which is an infinite space , so you can arbitrarily scale paths.The default implementation is  x = xH, which corresponds to a manifold that has no boundary to begin with.Generalised translation operation. Note that the result will always also be in the interior; scaling up the needle can only get you ever closer to a boundary. sans boundary.The signature of  should really be  x ->  x ->  x, only, this is not possible because it only consists of non-injective type families. The solution is this tagged signature, which is of course rather unwieldy. That's why p has the stronger, but easier usable signature. Without boundary, these functions should be equivalent, i.e. translateP = Tagged (.+~^).Shorthand for \p v -> p .+~^  v, which should obey the  asymptotic law p .-~^ v .+~^ v "E p  Meaning: if v0 is scaled down with sufficiently small factors , then the difference (p.-~^v.+~^v) .-~. p& should scale down even faster: as O (). For large vectors, it will however behave differently, except in flat spaces (where all this should be equivalent to the  instance).Interpolate between points, approximately linearly. For points that aren't close neighbours (i.e. lie in an almost flat region), the pathway is basically undefined  save for its end points.pA proper, really well-defined (on global scales) interpolation only makes sense on a Riemannian manifold, as .Like W, but actually restricted to the interval between the points, with a signature like  rather than .Like =, but actually restricted to the interval between the points.Y$$L(c) Justus Sagemller 2015GPL v3"(@) sagemueller $ geo.uni-koeln.de experimentalportableNone!"&(*-/034579:>@CFIKLN Type-level zero of kind .*A conservative  state monad containing a J. It can be extended by new simplices, which can then be indexed using  . The universally-quantified t_ argument ensures you can't index simplices that don't actually exist in this triangulation.An n -dimensional abstract simplicial complex is a collection of ns-simplices which are glued together  in some way. The preferred way to construct such complexes is to run a  builder.An n-simplex is a connection of n5+1 points in a simply connected region of a manifold.Use this together with D to easily build simplices, like you might construct lists. E.g. (0,0)  (1,0)  (0,1) ::   !.dConsider a single simplex as a simplicial complex, consisting only of this simplex and its faces.}A unique (for the given dimension) ID of a triagulation's simplex. It is the index where that simplex can be found in the .Reference the k--faces of a given simplex in a triangulation.QImport an entire triangulation, as disjoint from everything already in the monad.!Import a triangulation like with :, together with references to some of its subsimplices.TCombine two triangulations (assumed as disjoint) to a single, non-connected complex.G     ((?     (c) Justus Sagemller 2015GPL v3"(@) sagemueller $ geo.uni-koeln.de experimentalportableNone !"&34579:>FHIKLNVZBasically evaluates an affine function as a generic differentiable one, yielding at a given reference point the result and Jacobian. Unlike with B, the induced 1st-order Taylor series is equal to the function!^Affine composition using only the reified skeleton, without trying to be clever in any way./ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEF39+ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEF"#,-8None!"4KLwCategory of functions that, where defined, have an open region in which they are continuously differentiable. Hence RegionWiseDiff'able0. Basically these are the partial version of  PWDiffable.Though the possibility of undefined regions is of course not too nice (we don't need Java to demonstrate this with its everywhere-looming null values...), this category will propably be the workhorse  for most serious calculus applications, because it contains all the usual trig etc. functions and of course everything algebraic you can do in the reals.SThe easiest way to define ordinary functions in this category is hence with its AgentVal2ues, which have instances of the standard classes G through H*. For instance, the following defines the binary entropy1 as a differentiable function on the interval ]0,1[: (it will actually knowP where it's defined and where not. And I don't mean you need to exhaustively I-check all results...) Uhb :: RWDiffable ! ! ! hb = alg (\p -> - p * logBase 2 p - (1-p) * logBase 2 (1-p) ) JA J8 needs to be associated with a certain reference point (D includes that point) to define a connected subset of a manifold.*A pathwise connected subset of a manifold m!, whose tangent space has scalar s.GThe category of differentiable functions between manifolds over scalar s. As you might guess, these offer automatic differentiation of sorts (basically, simple forward AD), but that's in itself is not really the killer feature here. More interestingly, we actually have the ( la Curry-Howard) proof built in: the function f has at x derivative f'  , if, for >0, there exists  such that |f x " (f x + x"f'  )| <  for all |x " x | < .Observe that, though this looks quite similar to the standard definition of differentiability, it is not equivalent thereto  in fact it does not prove any analytic properties at all. To make it equivalent, we need a lower bound on  : simply ? gives us continuity, and for continuous differentiability,  must grow at least like " for small . Neither of these conditions are enforced by the type system, but we do require them for any allowed values because these proofs are obviously tremendously useful  for instance, you can have a root-finding algorithm and actually be sure you get all solutions correctly, not just some] that are (hopefully) the closest to some reference point you'd need to laborously define!2Unfortunately however, this also prevents doing any serious algebra with the category, because even something as simple as division necessary introduces singularities where the derivatives must diverge. Not to speak of many e.g. trigonometric functions that are undefined on whole regions. The  PWDiffable and  categories have explicit handling for those issues built in; you may simply use these categories even when you know the result will be smooth in your relevant domain (or must be, for e.g. physics reasons).((The implementation does not deal with  and  as difference-bounding reals, but rather as metric tensors which define a boundary by prohibiting the overlap from exceeding one. This makes the category actually work on general manifolds.)KLJMNOPQRSTUVWXYZ[KLJMNOPQRSTUVWXY KLJMNOPQRSTUVWXYZ[(c) Justus Sagemller 2015GPL v3"(@) sagemueller $ geo.uni-koeln.de experimentalportableNone!"&34579:>FHIKLNV  Represent a _ by a smooth function which is positive within the region, and crosses zero at the boundary.\=Important special operator needed to compute intersection of s.]Set-intersection of regions would not be guaranteed to yield a connected result or even have the reference point of one region contained in the other. This combinator assumes (unchecked) that the references are in a connected sub-intersection, which is used as the result.^!Cartesian product of two regions._%Cartesian product of two pre-regions.nRequire the LHS to be defined before considering the RHS as result. This works analogously to the standard  method  (,) :: Maybe a -> Maybe b -> Maybe b Just _  a = a _  a = Nothing Return the RHS, if it is less than the LHS. (Really the purpose is just to compare the values, but returning one of them allows chaining of comparison operators like in Python.) Note that less-than comparison is  http://www.paultaylor.eu/ASD/ equivalentL to less-or-equal comparison, because there is no such thing as equality..Return the RHS, if it is greater than the LHS.WTry the LHS, if it is undefined use the RHS. This works analogously to the standard   method  (!,) :: Maybe a -> Maybe a -> Maybe a Just x ! _ = Just x _ ! a = a -Basically a weaker and agent-ised version of .eReplace the regions in which the first function is undefined with values from the second function.`Like a?, but gives a differentiable function instead of a Hask one.Nbcdefg_Limit the number of steps taken in either direction. Note this will not cap the resolution but length of the discretised path.Parameter interval of interest.Inaccuracy allowance .Path specification.]Trail of points along the path, such that a linear interpolation deviates nowhere by more as .*Max number of exploration steps per regionNeeded resolution of boundariesFunction to investigate<Subintervals on which the function is guaranteed continuous.:Maximum number of path segments and/or points per segment.Inaccuracy allowance  for arguments (mostly relevant for resolution of discontinuity boundaries  consider it a safety margin from singularities ), and ! for results in the target space.kPath specification. It is recommended that this function be limited to a compact interval (e.g. with ,  and ). For many functions the discretisation will even work on an infinite interval: the point density is exponentially decreased towards the infinities. But this is still pretty bad for performance.:Discretised paths: continuous segments in either directionx value.f xI , derivative (i.e. Taylor-1-coefficient), and reverse propagation of O ( ) bound.*Max number of exploration steps per region$Needed resolution in (x,y) directionFunction to investigateF(XInterval, YInterval) rectangles in which the function graph lies.hijklmnopqr\st]^_uvwxyz{|}~`Kbcdefghijklmnopqr\st]^_uvwxyz{|}~`"(c) Justus Sagemller 2015GPL v3"(@) sagemueller $ geo.uni-koeln.de experimentalportableNone!"&34579:>FHIKLNV$Products of simply connected spaces.-Must be nonzero.%(c) Justus Sagemller 2015GPL v3"(@) sagemueller $ geo.uni-koeln.de experimentalportableNone!"&34579>FHIKLNV-Oriented hyperplanes, navely generalised to  manifolds:  p w" represents the set of all points q such that (q.-~.p) ^<.> w "a 0.|In vector spaces this is indeed a hyperplane; for general manifolds it should behave locally as a plane, globally as an (n"1)-dimensional submanifold.'(Hyperplane to measure the distance from.~Metric to use for measuring that distance. This can only be accurate if the metric is valid both around the cut-plane's M, and around the points you measure. (Strictly speaking, we would need parallel transport to ensure this).!Point to measure the distance to.mA signed number, giving the distance from plane to point with indication on which side the point lies. - if the point isn't reachable from the plane.I  !"#$%&'()*+,-./0123?@AI 23A/01,-.()*+'#$%& !"?@(c) Justus Sagemller 2015GPL v3"(@) sagemueller $ geo.uni-koeln.de experimentalportableNone!"&(*-/034579:>@CFHIKLNMOne-dimensional manifolds, whose closure is homeomorpic to the unit interval.'8Starting point; the interpolation will yield this at -1.End point, for +1.5If the two points are actually connected by a path...S...then this is the interpolation function. Attention: the type will change to Differentiable in the future.     '     $     (c) Justus Sagemller 2015GPL v3"(@) sagemueller $ geo.uni-koeln.de experimentalportableNone" !"&(*-./034579:>@BCFHIKLNUZ" This is to 4 as #$ is to %&.#Essentially the same as (x,y)3, but not considered as a product topology. The * etc. instances just copy the topology of x , ignoring y.* * x "E (x, + x) + + x "E [(x, + x)] , , x "E Maybe (x, + x) 0!Class of manifolds which can use =d as a basic set type. This is easily possible for vector spaces with the default implementations.1a 1 b "a True means a is fully contained in b, i.e. from  a p < 1 follows also minusLogOcclusion' b p < 1.3If p is in a (red) and  is in b (green), then p.+~^ is in convolveShade' a b (blue). Example: xhttps://nbviewer.jupyter.org/github/leftaroundabout/manifolds/blob/master/test/ShadeCombinations.ipynb#shadeConvolutions :images/examples/ShadeCombinations/2Dconvolution-skewed.pngUnsafeM: this assumes the direction information of both containers to be equivalent.Hourglass as the geometric shape (two opposing ~conical volumes, sharing only a single point in the middle); has nothing to do with time.9Access the center of a A or a =.:tCheck the statistical likelihood-density of a point being within a shade. This is taken as a normal distribution.=CA co-shade  can describe ellipsoid regions as well, but unlike Aq it can be unlimited / infinitely wide in some directions. It does OTOH need to have nonzero thickness, which A needs not.AA A is a very crude description of a region within a manifold. It can be interpreted as either an ellipsoid shape, or as the Gaussian peak of a normal distribution (use  2http://hackage.haskell.org/package/manifold-random2 for actually sampling from that distribution).For a preciseR description of an arbitrarily-shaped connected subset of a manifold, there is Region., whose implementation is vastly more complex. Possibly  Partially  asymPtotically singular metric.ESpan a A4 from a center point and multiple deviation-vectors.JASimilar to ':', but instead of expanding the shade, each vector  restrictsr it. Iff these form a orthogonal basis (in whatever sense applicable), then both methods will be equivalent.qNote that '||' is only possible, as such, in an inner-product space; in general you need reciprocal vectors () to define a =.KAttempt to find a Am that describes the distribution of given points. At least in an affine space (and thus locally in any manifold), this can be used to estimate the parameters of a normal distribution from which some points were sampled. Note that some points will be outside  of the shade, as happens for a normal distribution with some statistical likelyhood. (Use L if you need to prevent that.)For  nonconnected manifolds it will be necessary to yield separate shades for each connected component. And for an empty input list, there is no shade! Hence the result type is a list.LLike KC, but ensure that all points are actually in the shade, i.e. if [A x ex] is the result then ] (recipMetric ex) (p-x ) "d 1 for all p in the list.MAttempt to reduce the number of shades to fewer (ideally, a single one). In the simplest cases these should guaranteed cover the same area; for non-flat manifolds it only works in a heuristic sense.5Evaluate the shade as a quadratic form; essentially  minusLogOcclusion sh x = x  .)^ (sh^.shadeExpanse $ x - sh^.shadeCtr)  where FD gives a metric (matrix) that characterises the width of the shade.NPBuild a quite nicely balanced tree from a cloud of points, on any real manifold. Example: yhttps://nbviewer.jupyter.org/github/leftaroundabout/manifolds/blob/master/test/Trees-and-Webs.ipynb#pseudorandomCloudTree 'images/examples/simple-2d-ShadeTree.pngOThe leaves of a shade tree are numbered. For a given index, this function attempts to find the leaf with that ID, within its immediate environment.P Inverse indexing  of a tree. This is roughly a nearest-neighbour search, but not guaranteed to give the correct result unless evaluated at the precise position of a tree leaf.XBUGGY: this does connect the supplied triangulations, but it doesn't choose the right boundary simplices yet. Probable cause: inconsistent internal numbering of the subsimplices.[Imitate the specialised 4( structure with a simpler, generic tree.\-Left (and, typically, also right) inverse of  fromLeafNodes.^OSaw a tree into the domains covered by the respective branches of another tree. WRT union.?Experimental. There might be a more powerful instance possible. !"#$%&'()*+,-./01234567    89:;<=>?@ABCD EFGHIJKLMHow near (inverse normalised distance, relative to shade expanse) two shades must be to be merged. If this is zero, any shades in the same connected region of a manifold are merged. A list of n shades.m "d n+ shades which cover at least the same area.NOPdFor deciding (at the lowest level) what close  means; this is optional for any tree of depth >1.The tree to index intoPosition to look upIndex of the leaf near to the query point, the path  of environment trees leading down to its position (in decreasing order of size), and actual position of the found node. !"#$.Sorted list of non-negative indices to extract Input list((Extracted elements, remaining elements)%&'()*QRS+T,U-./0123456789VW:;<Tip of the desired simplex.Base of the desired simplex..Return the exposed faces of the new simplices.=X>YZ?@[\]^L Reference tree , defines the cut regions. Must be at least one level of 7 deep.&Tree to take the actual contents from.]All points within each region, plus those from the boundaries of each neighbouring region.AB_`aCbcdDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrsG !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdGABCDE=>?@J89:;<FGHIKLQ01234567N\OP[,+*'()^] !McSTU#$%&"abd_`/R.VWX-YZ !"#$%&'()*+,-./01234567    89:;<=>?@ABCD EFGHIJKLMNOP !"#$%&'()*QRS+T,U-./0123456789VW:;<=X>YZ?@[\]^AB_`aCbcdDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrs(c) Justus Sagemller 2016GPL v3"(@) sagemueller $ geo.uni-koeln.de experimentalportableNone!"&*-./03457:>@CFHIKLNUeA e is almost, but not quite a mesh. It is a stongly connected directed graph, backed by a tree for fast nearest-neighbour lookup of points.j In general, there can be disconnected components, but every connected component is strongly connected.lFetch a point between any two neighbouring web nodes on opposite sides of the plane, and linearly interpolate the values onto the cut plane.rIf p5 is in all intersectors, it must also be in the hull.tUnder intersection.\uvwxyz{|}~efghi6Local scalar-product generator. You can always use l . DO (but this may give distortions compared to an actual Riemannian metric). Source tree.kSource tree, with a priori topology information (needles pointing to already-known neighbour candidates)jklmnopqrstuvwtx7Scalar product on the domain, for regularising the web.y7Scalar product on the domain, for regularising the web.#Badness function for local results.efghijklmnopqrstuvwxyefghinjktlmwvxyopqrsu<uvwxyz{|}~efghijklmnopqrstuvwtxy (c) Justus Sagemller 2016GPL v3"(@) sagemueller $ geo.uni-koeln.de experimentalportableNone!"&*-./03457:>@CFHIKLNUA function that variates, relatively speaking, most strongly for arguments around 1. In the zero-limit it approaches a constant (but with arbitrarily large derivative); for  ! " the derivative approaches 0.-The idea is that if you consider the ratio of two function values, it will be close to 1 if both arguments on the same side of 1, even if their ratio is large. Only if both arguments are close to 1, or lie on opposite sides of it, will the ratio of the function values will be significant.z{|}~/vwz{|}~/zwv|}~{z{|}~ (c) Justus Sagemller 2015GPL v3"(@) sagemueller $ geo.uni-koeln.de experimentalportableNone!"&(*-/034579:>@CFHIKLNU '(c) Justus Sagemller 2013GPL v3"(@) sagemueller $ geo.uni-koeln.de experimentalportableNone35l  !"#$%&'()*+,-./0123?@A()*+,-./0123456789:;<<=>??@ABBCDEEFGGHIJKKLMNNOPQRSTUVWXYZ[\]^_`abbcdefghijklmnoppqrrstuvwxyz{|}~""""""       !"#$%&'()*+,-./0123456789:;;<=>>?@ABCDEFGHIJKLMNOPQRSSTUVVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                             !"#$%&'()*+,-./01234567899:;<=>?@ABCDEFGHIJKLMNOPQRS TUVWXYZ[\]^W_`abcdefghijklmnopqrstuvwxyz{|}~2      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_\`abcdefghijklmnopqrstuvwxyz{|}~"""""""""""""""""""""""""""""""""""""""C      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}}~y                    manif_8eOW8btP6mx4VvrMZEte00Data.SimplicialComplexData.Manifold.TypesData.LinearMap.HerMetricData.Manifold.PseudoAffineData.Function.DifferentiableData.Manifold.RiemannianData.Manifold.TreeCoverData.Manifold.Web"Data.Manifold.DifferentialEquationData.Manifold.Griddable Util.LtdShowUtil.AssociateData.SetLike.IntersectionControl.Monad.Trans.OuterMaybeData.List.FastNub Data.CoNatData.EmbeddingData.Manifold.Types.PrimitiveControl.Category.Constrained+"Data.VectorSpace.FiniteDimensionalData.LinearMap.CategoryLocallyCoercibleGeodesicgeodesicBetweenData.Function.AffineDifferentiable!Data.Function.Differentiable.DataControl.Applicative Applicative*> Alternative<|>Data.Manifold.ConeData.MapMapData.SetSet Data.ManifoldNatOpenConeConeDisk2Disk1 Projective2 Projective1Sphere2Sphere1Sphere0Real3Real2RealPlusReal1Real0ℝayℝ³ℝ²ℝℝ⁰Cℝay hParamCℝay pParamCℝayCD¹ hParamCD¹ pParamCD¹D² rParamD² φParamD²D¹ xParamD¹ℝP² rParamℝP² φParamℝP²ℝP¹S² ϑParamS² φParamS²S¹ φParamS¹S⁰PositiveHalfSphereNegativeHalfSphereZeroDimOriginFiniteDimensional dimension basisIndex indexBasis completeBasiscompleteBasisValuesasPackedVectorasPackedMatrixfromPackedVectorfromPackedMatrix IsFreeSpaceLinear denseLinearStiefel1 getStiefel1N HasMetric' DualSpace<.>^ functional doubleDual doubleDual' basisInDual HasMetric MetricScalarHasEigenSystem EigenVector eigenSystem HerMetric' metricMatrix' HerMetric metricMatrix extendMetric projector projector' projectors projector'smetricSq metricSq'metricmetric' toDualWith fromDualWithmetriNormalisemetriNormalise' metriScale metriScale'metricsmetrics'transformMetrictransformMetric'dualCoCoProduct dualiseMetricdualiseMetric' recipMetric recipMetric'safeRecipMetricsafeRecipMetric' eigenSpan eigenSpan' eigenCoSpan eigenCoSpan'^<.>euclideanMetric'adjointfactoriseMetricfactoriseMetric' productMetricproductMetric'applyLinMapMetricapplyLinMapMetric'imitateMetricSpanChange covariance volumeRatioeuclideanRelativeMetricVolumetryMetricAsLengthmetricAsLengthmetricFromLengthmetric'AsLengthspanHilbertSubspacespanSubHilbertSpaceorthogonalComplementSpanlinMapAsTensProdlinMapFromTensProd outerProducts ImpliesMetricMetricRequirement inferMetric inferMetric' RieMetric' RieMetricMetric'MetricNeedle' EuclidSpace HilbertSpaceAffineManifold RealDimension WithFieldLinearManifold LocalAffine LocalLinearLocallyScalablelocallyTrivialDiffeomorphismManifold PseudoAffine.-~..-~! SemimanifoldNeedleInterior.+~^ fromInterior toInterior translateP.-~^euclideanMetricpalerppalerpBalerpBSuccThreeTwoOneZeroNeighbouringSimplices SimplexIT HaskMonadTriangT TriangulationSimplexZS:<|.<. makeSimplex makeSimplex'simplexVerticessimplexVertices' singleSimplex evalTriangT runTriangT doTriangT getTriang liftInTriangTunliftInTriangT tgetSimplexITlookSplxFacesITlookSplxVerticesIT lookVertexIT lookSimplex simplexITListlookSupersimplicesITsharedBoundarydistinctSimplicesdisjointTriangulationdisjointSimplexmixinTriangulationwebinateTriangintroVertToTriang RWDiffableRegiondiscretisePathIncontinuityRangesdiscretisePathSegsanalyseLocalBehavioursmoothIndicatorregionOfContinuityAroundintervalImages?->?>?<?|: backupRegions HasUnitSphere UnitSpherestiefel unstiefelstiefel1Project stiefel1EmbedCutplane sawHandle cutNormalLine lineHandle lineDirection sideOfCutfathomCutDistance cutPosBetweenlineAsPlaneIntersection Riemannian rieMetric IntervalLiketoClosedInterval interpolate$fRiemannianDouble$fIntervalLikeDouble$fIntervalLikeCℝay$fIntervalLikeCD¹$fIntervalLikeCℝay0$fIntervalLikeCD¹0$fIntervalLikeD¹$fGeodesicCD¹$fGeodesicCℝay$fGeodesicCD¹0$fGeodesicCℝay0$fGeodesicCD¹1$fGeodesicCℝay1$fGeodesicCD¹2$fGeodesicCℝay2$fGeodesicCD¹3$fGeodesicCℝay3$fGeodesicCD¹4$fGeodesicCℝay4$fGeodesicCD¹5$fGeodesicCℝay5$fGeodesicCD¹6$fGeodesicCℝay6 $fGeodesicS¹$fGeodesicS⁰$fGeodesicStiefel1$fGeodesicFinVecArrRep$fGeodesicFreeVect$fGeodesic(,,) $fGeodesic(,)$fGeodesicZeroDim$fGeodesicDouble HasFlatViewFlatViewflatView superFlatViewShadedWithAny_untopological _topological GenericTree treeBranches NonEmptyTreeTrees SimpleTree AutoTriang TriangBuildDifferentialEqn Refinable subShade' refineShade'convolveShade' ShadeTree PlainLeavesDisjointBranchesOverlappingBranchesIsShadeshadeCtr occlusionfactoriseShade coerceShadeShade' _shade'Ctr_shade'NarrownessShade _shadeCtr _shadeExpanse:± shadeExpanseshadeNarrowness fullShade fullShade'|±| pointsShades pointsCovers shadesMergefromLeafPointsindexShadeTree positionIndexintersectShade'spropagateDEqnSolution_loctwigsWithEnvironscompleteTopShadingflexTwigsShading doTriangBuildsingleFullSimplexautoglueTriangulationelementaryTriangbreakdownAutoTriang onlyNodes onlyLeaveschainsawsShSaw constShadedstripShadedUntopological fmapShadedstiAsIntervalMappingsmoothInterpolate spanShading PointsWeb fromWebNodesfromShadeTree_auto fromShadeTree fromShadedindexWebwebEdges sliceWeb_lin localFocusWebnearestNeighbour ConvexSet EmptyConvex convexSetHullconvexSetIntersectorstoGraph ellipsoiditerateFilterDEqn_staticfilterDEqnSolution_staticfilterDEqnSolutions_adaptiveiterateFilterDEqn_adaptiveconstLinearDEqneuclideanVolGoalmaxDeviationsGoaluncertaintyGoaluncertaintyGoal' GriddableGriddingParameters mkGriddingGridAxisGridAxInterval GridAxConsGridAxisClosedLtdShowTLtdShow runLtdShowltdShowArrayltdShowsltdPrint $fLtdShow[] $fLtdShow(,)$fLtdShowVector$fLtdShowLtdShowT associateWithbaseGHC.ListzipWith associateassociaterSectorsWithassociaterSectorsassociatelSectorsWithassociatelSectors partitionsdividemapOnNthmapExceptOnNth IntersectTgetIntersectorssingleIntersectrmTautologyIntersect OuterMaybeT OuterNothing OuterJust$fApplicativeOuterMaybeT fastNubBy fastNubByWithGHC.BaseconstsortWithFastNubfastNub fnubMergeBy sfGroupBy fnubConcatBy fnubConcat fnubConcatMap fnubIntersect getFreeVect getInRangeindices AsHaskFunctorrunAsHaskFunctor^FreeVectRangeInRangeNatTagAtFtorAntepænultimategetNatTagAtFtorAntepænultimateNatTagAtFtorPænultimategetNatTagAtFtorPænultimateNatTagAtFtorUltimategetNatTagAtFtorUltimateNatTagAtPreantepænultimategetNatTagAtPreantepænultimateNatTagAtAntepænultimategetNatTagAtAntepænultimateNatTagAtPænultimategetNatTagAtPænultimateKnownNattheNattheNatNcozerocozeroTcosuccfCosucccosuccTfCosuccTcoNatcoNatTcoInduce coInduceT ftorCoInduce ftorCoInduceT tryToMatchZS RangeTrienatToIntfromNat natTagLastnatTagPænultimatenatTagAntepænultimate natSelfSucc natSelfSuccNmapNatTagAtPænultimatemapNatTagAtAntepænultimatemapNatTagAtPreantepænultimatemapNatTagAtFtorUltimatemapNatTagAtFtorPænultimatemapNatTagAtFtorAntepænultimate tryToMatchT tryToMatchTT tryToMatchTTTftorTryToMatchftorTryToMatchTftorTryToMatchTT clipToRange replicVector freeVectorperfectZipWith freeSortBy freeRotatefreeConsfreeSnocempty$fApplicativeAsHaskFunctor$fFunctorAsHaskFunctor$fHasBasisFreeVect$fInnerSpaceFreeVect$fVectorSpaceFreeVect$fAdditiveGroupFreeVect$fAffineSpaceFreeVect$fShowFreeVect%$fTraversableFreeVectFreeVect(->)(->)$fApplicativeFreeVectTFCo:R::->:Rangex$fHasTrieRange $fKnownNatS $fKnownNatZ Embedding embedding projection Isomorphism forwardIso backwardIso$->$$<-$fromInversePair perfectInvertfromEmbedProject$->>-$$fEnhancedCatcEmbedding$fMorphChoiceEmbedding$fMorphismEmbedding$fCoCartesianEmbedding$fCartesianEmbedding$fCategoryEmbedding!$fEnhancedCatEmbeddingIsomorphism$fEnhancedCatcIsomorphism$fMorphChoiceIsomorphism$fMorphismIsomorphism$fCoCartesianIsomorphism$fCartesianIsomorphism$fCategoryIsomorphism⊗ EndomorphismNaturallyEmbeddedembedcoEmbed DensTensProdgetDensTensProdGraphWindowSpeclBoundrBoundbBoundtBound xResolution yResolution EqFloatingisoAttachZeroDimotherHalfSphere fromIntv0to1$fInnerSpace() $fHasBasis()$fVectorSpace()$fNaturallyEmbeddedCℝay(,)$fNaturallyEmbeddedD¹Double$fNaturallyEmbeddedℝP²(,)$fNaturallyEmbeddedS²(,)$fNaturallyEmbeddedS¹(,)$fNaturallyEmbeddedS⁰Double$fNaturallyEmbeddedx(,)$fNaturallyEmbeddedx(,)0$fHasBasisZeroDim$fVectorSpaceZeroDim$fAdditiveGroupZeroDim$fAffineSpaceZeroDim$fMonoidZeroDimmicro_4sFFTlbpBvy7HZ00BAdlFf Lens.Micro^. FinVecArrReptagge_6Tf46oJAk552xT73wGffBW Data.TaggedTaggedhmatr_4tr17C0FUQtAHd2Ix1DfUNInternal.MatrixMatrix SmoothScalargetFinVecArrRepconcreteArrRep⊕ splitArrRep $fNaturallyEmbeddedmFinVecArrRep$fFiniteDimensionalFinVecArrRep$fHasBasisFinVecArrRep$fInnerSpaceFinVecArrRep$fVectorSpaceFinVecArrRep$fAdditiveGroupFinVecArrRep$fAffineSpaceFinVecArrRep$fFiniteDimensionalFreeVect$fFiniteDimensional⊗ $fHasBasis⊗$fInnerSpace⊗$fVectorSpace⊗$fAdditiveGroup⊗$fFiniteDimensional(,)$fFiniteDimensionalDouble$fFiniteDimensionalZeroDimunsafeCoerceLinear<\$ FreeTupleTuplity freeTuple FreeDimensionidentityMatrixDenseLinearFuncValue DenseLineargetDenseMatrixidentMat convertLinearcanonicalIdentityMatrix$fFreeTuple(,)$fFreeTuple(,)0$fFreeTuple(,,)$fFreeTuple(,)1$fFreeTupleInt$fFreeTuple(,)2$fFreeTuple(,)3$fFreeTuple(,,)0$fFreeTuple(,)4$fFreeTupleDouble$fIsFreeSpace(,)$fIsFreeSpaceDouble$fIsFreeSpaceFreeVect$fAdditiveGroupGenericAgent$fFiniteDimensionalLinear$fHasBasisLinear$fVectorSpaceLinear$fAdditiveGroupLinear$fAffineSpaceLinear$fCartesianAgentLinear$fHasAgentLinear$fEnhancedCat(->)Linear$fPreArrowLinear$fMorphismLinear$fCartesianLinear$fCategoryLinearvecto_B7ERKFLj74s9E6QjxzRZ7QData.LinearMap:-*Data.VectorSpaceScalar InnerSpacelinear VectorSpaceData.AdditiveGroup^+^*^^-^sumV magnitudeSqconst_KcAoe95UYRTLxnSzVOLyo2Control.Functor.Constrained<$>$fAdditiveGroupHerMetric'$fAdditiveGroupHerMetric matrixMetric matrixMetric'singularMetricsingularMetric' isInfinite'completeBasisFunctional adjoint_fln metrConst metrNumFun normaliseWithorthonormalPairsWithpseudoRieszPairmkPseudoRieszPair $fShowLinear$fShowHerMetric'$fShowHerMetric$fFloatingHerMetric$fFractionalHerMetric$fNumHerMetric$fHasMetric'Linear$fHasMetric'FinVecArrRep$fHasMetric'FreeVect$fHasMetric'(,)$fHasMetric'Double$fHasMetric'ZeroDim$fHasEigenSystem(,)$fHasEigenSystem(,)0$fHasEigenSystemHerMetric$fHasEigenSystemHerMetric'$fVectorSpaceHerMetric'$fVectorSpaceHerMetricData.AffineSpace AffineSpace GHC.Float RealFloatghc-prim GHC.TypesDoubleNothingDiffidnegateValerpLinearManifold' hugeℝVal sphereFoldtau toS¹range$fImpliesMetricHerMetric'$fImpliesMetricHerMetric$fPseudoAffineℝP²$fSemimanifoldℝP²$fPseudoAffineS²$fSemimanifoldS²$fPseudoAffineD¹$fSemimanifoldD¹$fPseudoAffineS¹$fSemimanifoldS¹$fPseudoAffineS⁰$fSemimanifoldS⁰$fPseudoAffineLinear$fSemimanifoldLinear$fPseudoAffine:-*$fSemimanifold:-*$fPseudoAffine⊗$fSemimanifold⊗ $fLocallyCoercibleFreeVectDouble $fLocallyCoercibleDoubleFreeVect$fPseudoAffineFreeVect$fSemimanifoldFreeVect$fLocallyCoercible(,)(,,)$fLocallyCoercible(,)(,,)0$fLocallyCoercible(,,)(,)$fLocallyCoercible(,,)(,)0$fPseudoAffine(,,)$fSemimanifold(,,)$fLocallyCoercible(,)(,)$fLocallyCoercible(,)(,)0$fPseudoAffine(,)$fSemimanifold(,)$fPseudoAffineZeroDim$fSemimanifoldZeroDim$fLocallyCoerciblebFinVecArrRep$fLocallyCoercibleFinVecArrRepb*$fLocallyCoercibleFinVecArrRepFinVecArrRep$fPseudoAffineFinVecArrRep$fSemimanifoldFinVecArrRep$fPseudoAffineRatio$fSemimanifoldRatio$fPseudoAffineDouble$fSemimanifoldDouble$fLocallyCoercible(,)(,)1$fLocallyCoercible(,)(,)2$fLocallyCoercible(,)(,)3$fLocallyCoercibleDoubleDouble $fManifoldm$fSemigroupTriangulationtgetSimplexIT'unsafeRunTriangTTriangSkeletonTriangVertices nTopSplxsnSplxs triangReadTunsafeEvalTriangT execTriangTgetEntireTriang forgetVolumes onSkeletonlookSplxFacesIT'lookSplxVerticesIT'lookSplxsVerticesIT lookVertexIT'simplexITList'lookSupersimplicesIT'lookSupersimplicesIT''triangulationBulkwithThisSubsimplexlookupSimplexCone$fMonadTransTriangT$fMonadTriangT$fApplicativeTriangT$fMonoidTriangulation$fFunctorTriangulation$fFunctorSimplextoOffset'Slope>>>!AffinFuncValueAffineSubtractAddTo ScaleWithReAffineSpecificId:>>>:<<<Swap AttachUnit DetachUnitRegroupRegroup'TerminalFstSnd:***:&&&Const PreSubtractPostAddPostAdd'reAffine toOffsetSlope coOffsetForm preSubtractpostAddpostAdd'<<)AffineGHC.NumNumFloatingisNaN PreRegion tryDfblDomain GlobalRegion RealSubrayregionRefPoint regionRDefDiffableEndoProofIsDiffableEndoNotDiffableEndo AffinDiffable LinDevPropagnotDefinedHere$fCategoryDiffableEndoProof$fSemigroupDiffableEndoProof minDblfuncsunsafePreRegionIntersect regionProd preRegionProd lerp_diffablelerpRWDfblFuncValue ConstRWDFV RWDFV_IdVar GenericRWDFV DfblFuncValue ℝIntervalunsafe_dev_ε_δ dev_ε_δ as_devεδgenericiseDifferentiableactuallyLinearEndoactuallyAffineEndoactuallyLinearactuallyAffinedfblFnValsFuncdfblFnValsCombinepostEndogenericisePreRegionpositivePreRegionnegativePreRegionpositivePreRegion'negativePreRegion'preRegionToInfFrompreRegionFromMinInfTopreRegionToInfFrom'preRegionFromMinInfTo'intervalPreRegionglobalDiffable'genericiseRWDFVgrwDfblFnValsFuncgrwDfblFnValsCombine rwDfbl_plusrwDfbl_negateV postCompRWpositiveRegionalId isZeroMap$fFloatingRWDfblFuncValue$fFractionalRWDfblFuncValue$fNumRWDfblFuncValue$fAdditiveGroupRWDfblFuncValue'$fPointAgentRWDfblFuncValueRWDiffableax$fCartesianAgentRWDiffable$fHasAgentRWDiffable$fWellPointedRWDiffable$fPreArrowRWDiffable$fMorphismRWDiffable$fCartesianRWDiffable%$fEnhancedCatRWDiffableDifferentiable$fCategoryRWDiffable$fNumGenericAgent($fPointAgentGenericAgentDifferentiableax$fCartesianAgentDifferentiable$fHasAgentDifferentiable$fWellPointedDifferentiable$fPreArrowDifferentiable$fMorphismDifferentiable$fCartesianDifferentiable$fEnhancedCat(->)Differentiable$fCategoryDifferentiable$fConeSemimfd(,) ConeSemimfdCℝayInteriorfromCℝayInteriorfromCD¹InteriortoCℝayInteriortoCD¹InteriorSConn'dConeVecArr ConeNeedle ConeVecArrsimplyCncted_fromCℝayInteriorsimplyCncted_toCℝayInteriorbijectℝplustoℝbijectℝtoℝplusbijectℝplustoIntvbijectIntvtoℝplusbijectℝtoIntvbijectIntvtoℝembCℝayToCD¹projCD¹ToCℝay$fHasUnitSphereFinVecArrRep$fHasUnitSphere(,)$fHasUnitSphereFinVecArrRep0$fHasUnitSphere(,)0$fHasUnitSphereFinVecArrRep1$fHasUnitSphereDouble$fConeSemimfdCℝay$fConeSemimfdCD¹$fConeSemimfdFinVecArrRep$fConeSemimfdFreeVect$fConeSemimfdS²$fConeSemimfdS¹$fConeSemimfdS⁰$fConeSemimfdDouble$fConeSemimfdZeroDim$fPseudoAffineCD¹$fPseudoAffineCℝay$fSemimanifoldCD¹$fSemimanifoldCℝay Stiefel1BasisgetStiefel1BasisStiefel1NeedlegetStiefel1TangentSt1BTries1bTries1nZs1bVs1nDs1nFl2norm$fConeSemimfdStiefel1$fPseudoAffineStiefel1$fSemimanifoldStiefel1$fHasMetric'Stiefel1Needle$fPseudoAffineStiefel1Needle$fSemimanifoldStiefel1Needle$fAffineSpaceStiefel1Needle!$fFiniteDimensionalStiefel1Needle$fHasBasisStiefel1Needle$fVectorSpaceStiefel1Needle$fAdditiveGroupStiefel1NeedleTFCo:R::->:Stiefel1Basisa$fHasTrieStiefel1BasisminusLogOcclusion' DBranches' HourglassPSM$fSemigroupShadeTree$fSemimanifoldShadeTree Sawboneses SingleCut DustyEdgessawChunk chunkDustDListSawbones sawnTrunk1 sawnTrunk2sawdust1sawdust2 getAutoTriang FullTriang TriangBuilderTriangVerticesStISimplexiSimplexBCCordEmbed BaryCoordsgetBaryCoordsTail DBranchesDBranchDBranch'boughDirection boughContents HourglassBulb UpperBulb LowerBulb upperBulb lowerBulb psmExpanserelevantEigenspan subshadeId' subshadeId pointsShade's pointsCover's pseudoECM pointsShades'minusLogOcclusionflipHouroneBulbdirectionChoicestraverseDirectionChoicesindexDBranchesfromFnGraphPointsfromLeafPoints'sShIdPartition'sShIdPartitionasList update_nth amputateId deleteIds amputateIds sortByKeytrunksnLeavesoverlappingBranchesunsafeFmapLeavesunsafeFmapTreetraverseTwigsWithEnvironsflexTopShading getBaryCoordsgetBaryCoords' getBaryCoord mkBaryCoords mkBaryCoords'bottomExtendSuitabilityoptimalBottomExtension simplexPlaneleavesBarycentersimplexBarycenter toISimplex fromISimplexiSimplexSideViewsfullOpenSimplexhypotheticalSimplexScorespanSemiOpenSimplexmultiextendTriangautoTriangMappendpartitionsOfFstLength splxVertices shadeWithAnyshadeWithoutAnythingstiWithDensityconeTipmkConefocifociNE.: catOptions extractJust$fHasFlatViewSawboneses$fHasFlatViewSawbones$fMonadWithAny$fApplicativeWithAny$fAdditiveGroupWithAny$fVectorSpaceWithAny$fAffineSpaceWithAny$fPseudoAffineWithAny$fSemimanifoldWithAny$fNFDataWithAny$fSemigroupSawboneses$fSemigroupDustyEdges$fMonoidSawbones$fSemigroupSawbones$fMonoidGenericTree$fSemigroupGenericTree$fNFDataGenericTree$fSemigroupAutoTriang$fPseudoAffineBaryCoords$fSemimanifoldBaryCoords$fAffineSpaceBaryCoords$fRefinable(,)$fRefinableDouble$fImpliesMetricShadeTree$fMonoidShadeTree$fNFDataDBranch'$fNFDataShadeTree$fSemigroupDBranches'$fFoldableHourglass(->)(->)$fApplicativeHourglass$fMonoidHourglass$fSemigroupHourglass$fNFDataHourglass$fGeodesicShade'$fSemimanifoldShade'$fGeodesicShade$fSemimanifoldShade$fIsShadeShade'$fImpliesMetricShade'$fImpliesMetricShade$fIsShadeShade$fSemigroupConvexSet WebLocally LocalWebInfo_thisNodeCoord _thisNodeData_containingWeb _thisNodeId_nodeNeighbours_nodeLocalScalarProduct_nodeIsOnBoundary GridSetup_gridStartCorner_gridSplitDirs GridPlanes_gridPlaneNormal_gridPlaneSpacing_gridPlanesCountInterpolationSeqInterpolationIv_interpolationSegRange_interpolationFunction MetricChoice webNodeRscwebNodeAssocData Neighbourhood neighbourslocalScalarProduct WebNodeIdfromTopWebNodes fromTopShadedunsafeIndexWebDatamkInterpolationSeq_lincartesianGrid2DsplitToGridLinessampleWebAlongGrid_linsampleWeb_2Dcartesian_linsampleEntireWeb_2Dcartesian_lin webLocalInfo'$fTraversablePointsWebPointsWeb(->)(->)$fFoldablePointsWeb(->)(->)$fNFDataPointsWeb$fNFDataNeighbourhoodSolverNodeStateSolverNodeInfo_solverNodeStatus_solverNodeBadness_solverNodeAge containingWebnodeIsOnBoundarynodeLocalScalarProductnodeNeighbours thisNodeCoord thisNodeData thisNodeId intersectors itWhileJustdupHeadfilterDEqnSolutions_static$fComonadWebLocally$fFunctorWebLocally OldAndNew solverNodeAgesolverNodeBadnesssolverNodeStatus oldAndNew oldAndNew' goalSensitiveIntervalivLBoundivRBoundPairGriddingParametersfstGriddingParamssndGriddingParams ℝGridParamgshmapaxisEnumFromStepTo axisGrLengthprettyFloatShow shade2Intvl intvl2ShadelgTFCo:R:GriddingParameters(,)a$fGriddable(,)a!TFCo:R:GriddingParametersDouble[]$fGriddableDouble[]