manifolds-0.6.1.0: Coordinate-free hypersurfaces
Copyright(c) Justus Sagemüller 2015
LicenseGPL v3
Maintainer(@) jsag $ hvl.no
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Manifold.TreeCover

Description

 
Synopsis

Shades

data Shade x where Source #

A Shade 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 http://hackage.haskell.org/package/manifold-random for actually sampling from that distribution).

For a precise description of an arbitrarily-shaped connected subset of a manifold, there is Region, whose implementation is vastly more complex.

Constructors

Shade 

Fields

Instances

Instances details
ImpliesMetric Shade Source # 
Instance details

Defined in Data.Manifold.Shade

Associated Types

type MetricRequirement Shade x Source #

IsShade Shade Source # 
Instance details

Defined in Data.Manifold.Shade

(Show x, Show (Metric' x), WithField PseudoAffine x) => Show (Shade x) Source # 
Instance details

Defined in Data.Manifold.Shade

Methods

showsPrec :: Int -> Shade x -> ShowS #

show :: Shade x -> String #

showList :: [Shade x] -> ShowS #

(AffineSpace x, Manifold x, Diff x ~ Needle x, Atlas x, HasTrie (ChartIndex x), Geodesic x, LinearSpace (Needle x), LinearSpace (Needle' x), Scalar (Needle x) ~ ) => Geodesic (Shade x) Source # 
Instance details

Defined in Data.Manifold.Shade

Methods

geodesicBetween :: Shade x -> Shade x -> Maybe ( -> Shade x) Source #

middleBetween :: Shade x -> Shade x -> Maybe (Shade x) Source #

(AffineSpace x, Manifold x, Diff x ~ Needle x, Atlas x, HasTrie (ChartIndex x), LinearSpace (Needle x), LinearSpace (Needle' x), Num' (Scalar (Needle x))) => SemimanifoldWithBoundary (Shade x) Source # 
Instance details

Defined in Data.Manifold.Shade

Associated Types

type Interior (Shade x) Source #

type Boundary (Shade x) Source #

type HalfNeedle (Shade x) Source #

(PseudoAffine x, VectorSpace (Needle x)) => Semimanifold (Shade x) Source # 
Instance details

Defined in Data.Manifold.Shade

Associated Types

type Needle (Shade x) #

LtdErrorShow x => Show (Shade x) Source # 
Instance details

Defined in Data.Manifold.Shade

Methods

showsPrec :: Int -> Shade x -> ShowS #

show :: Shade x -> String #

showList :: [Shade x] -> ShowS #

type MetricRequirement Shade x Source # 
Instance details

Defined in Data.Manifold.Shade

type Boundary (Shade x) Source # 
Instance details

Defined in Data.Manifold.Shade

type Boundary (Shade x) = x
type HalfNeedle (Shade x) Source # 
Instance details

Defined in Data.Manifold.Shade

type HalfNeedle (Shade x)
type Interior (Shade x) Source # 
Instance details

Defined in Data.Manifold.Shade

type Interior (Shade x) = Shade' x
type Needle (Shade x) Source # 
Instance details

Defined in Data.Manifold.Shade

type Needle (Shade x)

pattern (:±) :: () => (Semimanifold x, SimpleSpace (Needle x)) => x -> [Needle x] -> Shade x infixl 6 Source #

Span a Shade from a center point and multiple deviation-vectors.

data Shade' x Source #

A “co-shade” can describe ellipsoid regions as well, but unlike Shade it can be unlimited / infinitely wide in some directions. It does OTOH need to have nonzero thickness, which Shade needs not.

Constructors

Shade' 

Fields

Instances

Instances details
ImpliesMetric Shade' Source # 
Instance details

Defined in Data.Manifold.Shade

Associated Types

type MetricRequirement Shade' x Source #

IsShade Shade' Source # 
Instance details

Defined in Data.Manifold.Shade

LtdErrorShow x => Show (Shade' x) Source # 
Instance details

Defined in Data.Manifold.Shade

Methods

showsPrec :: Int -> Shade' x -> ShowS #

show :: Shade' x -> String #

showList :: [Shade' x] -> ShowS #

(WithField AffineManifold x, Geodesic x, SimpleSpace (Needle x)) => Geodesic (Shade' x) Source # 
Instance details

Defined in Data.Manifold.Shade

(AffineSpace x, Manifold x, Diff x ~ Needle x, Atlas' x, LinearSpace (Needle x), LinearSpace (Needle' x)) => SemimanifoldWithBoundary (Shade' x) Source # 
Instance details

Defined in Data.Manifold.Shade

Associated Types

type Interior (Shade' x) Source #

type Boundary (Shade' x) Source #

type HalfNeedle (Shade' x) Source #

AffineManifold x => Semimanifold (Shade' x) Source # 
Instance details

Defined in Data.Manifold.Shade

Associated Types

type Needle (Shade' x) #

LtdErrorShow x => Show (Shade' x) Source # 
Instance details

Defined in Data.Manifold.Shade

Methods

showsPrec :: Int -> Shade' x -> ShowS #

show :: Shade' x -> String #

showList :: [Shade' x] -> ShowS #

type MetricRequirement Shade' x Source # 
Instance details

Defined in Data.Manifold.Shade

type Boundary (Shade' x) Source # 
Instance details

Defined in Data.Manifold.Shade

type Boundary (Shade' x) = x
type HalfNeedle (Shade' x) Source # 
Instance details

Defined in Data.Manifold.Shade

type Interior (Shade' x) Source # 
Instance details

Defined in Data.Manifold.Shade

type Interior (Shade' x) = Shade x
type Needle (Shade' x) Source # 
Instance details

Defined in Data.Manifold.Shade

type Needle (Shade' x)

(|±|) :: forall x. WithField EuclidSpace x => x -> [Needle x] -> Shade' x infixl 6 Source #

Similar to , but instead of expanding the shade, each vector restricts it. Iff these form a orthogonal basis (in whatever sense applicable), then both methods will be equivalent.

Note that |±| is only possible, as such, in an inner-product space; in general you need reciprocal vectors (Needle') to define a Shade'.

class IsShade shade Source #

Instances

Instances details
IsShade Shade Source # 
Instance details

Defined in Data.Manifold.Shade

IsShade Shade' Source # 
Instance details

Defined in Data.Manifold.Shade

Lenses

shadeCtr :: IsShade shade => Lens' (shade x) x Source #

Access the center of a Shade or a Shade'.

Construction

pointsShades :: (WithField PseudoAffine x, SimpleSpace (Needle x)) => [x] -> [Shade x] Source #

Attempt to find a Shade 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 pointsCovers 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.

pointsCovers :: forall x. (WithField PseudoAffine x, SimpleSpace (Needle x)) => [x] -> [Shade x] Source #

Like pointsShades, but ensure that all points are actually in the shade, i.e. if [Shade x₀ ex] is the result then metric (recipMetric ex) (p-x₀) ≤ 1 for all p in the list.

coverAllAround :: forall x s. (Fractional' s, WithField s PseudoAffine x, SimpleSpace (Needle x)) => x -> [Needle x] -> Shade x Source #

Evaluation

occlusion :: (IsShade shade, PseudoAffine x, SimpleSpace (Needle x), s ~ Scalar (Needle x), RealFloat' s) => shade x -> x -> s Source #

Check the statistical likelihood-density of a point being within a shade. This is taken as a normal distribution.

Misc

factoriseShade :: (IsShade shade, PseudoAffine x, SimpleSpace (Needle x), PseudoAffine y, SimpleSpace (Needle y), Scalar (Needle x) ~ Scalar (Needle y)) => shade (x, y) -> (shade x, shade y) Source #

linIsoTransformShade :: (IsShade shade, SimpleSpace x, SimpleSpace y, Scalar x ~ Scalar y, Num' (Scalar x)) => (x +> y) -> shade x -> shade y Source #

embedShade :: (IsShade shade, Semimanifold x, Semimanifold y, Object (Affine s) x, Object (Affine s) y, SemiInner (Needle x), SimpleSpace (Needle y)) => Embedding (Affine s) x y -> shade x -> shade y Source #

Include a shade in a higher-dimensional space. Notice that this behaves fundamentally different for Shade and Shade'. For Shade, it gives a “flat image” of the region, whereas for Shade' it gives an “extrusion pillar” pointing in the projection's orthogonal complement.

projectShade :: (IsShade shade, Semimanifold x, Semimanifold y, Object (Affine s) x, Object (Affine s) y, SimpleSpace (Needle x), SemiInner (Needle y)) => Embedding (Affine s) x y -> shade y -> shade x Source #

Squash a shade down into a lower dimensional space.

class (WithField PseudoAffine y, SimpleSpace (Needle y)) => Refinable y Source #

Class of manifolds which can use Shade' as a basic set type. This is easily possible for vector spaces with the default implementations.

Instances

Instances details
Refinable ℝ² Source # 
Instance details

Defined in Data.Manifold.Shade

Refinable ℝ³ Source # 
Instance details

Defined in Data.Manifold.Shade

Refinable ℝ¹ Source # 
Instance details

Defined in Data.Manifold.Shade

Refinable ℝ⁴ Source # 
Instance details

Defined in Data.Manifold.Shade

Refinable Source # 
Instance details

Defined in Data.Manifold.Shade

Refinable ℝ⁰ Source # 
Instance details

Defined in Data.Manifold.Shade

(Refinable a, Refinable b, Scalar (DualVector (DualVector (Needle b))) ~ Scalar (DualVector (DualVector (Needle a)))) => Refinable (a, b) Source # 
Instance details

Defined in Data.Manifold.Shade

Methods

debugView :: Maybe (DebugView (a, b))

subShade' :: Shade' (a, b) -> Shade' (a, b) -> Bool Source #

refineShade' :: Shade' (a, b) -> Shade' (a, b) -> Maybe (Shade' (a, b)) Source #

convolveMetric :: Functor p => p (a, b) -> Metric (a, b) -> Metric (a, b) -> Metric (a, b) Source #

convolveShade' :: Shade' (a, b) -> Shade' (Needle (a, b)) -> Shade' (a, b) Source #

(SimpleSpace a, SimpleSpace b, Refinable a, Refinable b, Scalar a ~ , Scalar b ~ , Scalar (DualVector a) ~ , Scalar (DualVector b) ~ , Scalar (DualVector (DualVector a)) ~ , Scalar (DualVector (DualVector b)) ~ ) => Refinable (LinearMap a b) Source # 
Instance details

Defined in Data.Manifold.Shade

subShade' :: Refinable y => Shade' y -> Shade' y -> Bool Source #

a subShade` b ≡ True means a is fully contained in b, i.e. from minusLogOcclusion' a p < 1 follows also minusLogOcclusion' b p < 1.

refineShade' :: Refinable y => Shade' y -> Shade' y -> Maybe (Shade' y) Source #

Intersection between two shades.

coerceShade :: (IsShade shade, Manifold x, Manifold y, LocallyCoercible x y, SimpleSpace (Needle y)) => shade x -> shade y Source #

mixShade's :: forall y. (WithField Manifold y, SimpleSpace (Needle y)) => NonEmpty (Shade' y) -> Maybe (Shade' y) Source #

Weakened version of intersectShade's. What this function calculates is rather the weighted mean of ellipsoid regions. If you interpret the shades as uncertain physical measurements with normal distribution, it gives the maximum-likelyhood result for multiple measurements of the same quantity.

Shade trees

type ShadeTree x = x `Shaded` () Source #

fromLeafPoints :: forall x. (WithField Manifold x, SimpleSpace (Needle x)) => [x] -> ShadeTree x Source #

Build a quite nicely balanced tree from a cloud of points, on any real manifold.

Example: https://nbviewer.jupyter.org/github/leftaroundabout/manifolds/blob/master/test/Trees-and-Webs.ipynb#pseudorandomCloudTree

fromLeafPoints_ :: forall x y. (WithField Manifold x, SimpleSpace (Needle x)) => [(x, y)] -> x `Shaded` y Source #

onlyLeaves_ :: WithField PseudoAffine x => ShadeTree x -> [x] Source #

Left (and, typically, also right) inverse of fromLeafNodes.

indexShadeTree :: forall x y. (x `Shaded` y) -> Int -> Either Int ([x `Shaded` y], (x, y)) Source #

The 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.

treeLeaf :: forall x y f. Functor f => Int -> (y -> f y) -> (x `Shaded` y) -> Either Int (f (x `Shaded` y)) Source #

positionIndex Source #

Arguments

:: forall x y. (WithField Manifold x, SimpleSpace (Needle x)) 
=> Maybe (Metric x)

For deciding (at the lowest level) what “close” means; this is optional for any tree of depth >1.

-> (x `Shaded` y)

The tree to index into

-> x

Position to look up

-> Maybe (Int, ([x `Shaded` y], (x, y)))

Index 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+info of the found node.

“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.

View helpers

entireTree :: forall x y. (WithField PseudoAffine x, SimpleSpace (Needle x)) => (x `Shaded` y) -> LeafyTree x y Source #

onlyNodes :: forall x. (WithField PseudoAffine x, SimpleSpace (Needle x)) => ShadeTree x -> Trees x Source #

Imitate the specialised ShadeTree structure with a simpler, generic tree.

trunkBranches :: (x `Shaded` y) -> NonEmpty (LeafIndex, x `Shaded` y) Source #

Auxiliary types

type SimpleTree = GenericTree Maybe [] Source #

SimpleTree x ≅ Maybe (x, Trees x)

type Trees = GenericTree [] [] Source #

Trees x ≅ [(x, Trees x)]

newtype GenericTree c b x Source #

Constructors

GenericTree 

Fields

Instances

Instances details
(Foldable c, Foldable b) => Foldable (GenericTree c b) Source # 
Instance details

Defined in Data.Manifold.TreeCover

Methods

fold :: Monoid m => GenericTree c b m -> m #

foldMap :: Monoid m => (a -> m) -> GenericTree c b a -> m #

foldMap' :: Monoid m => (a -> m) -> GenericTree c b a -> m #

foldr :: (a -> b0 -> b0) -> b0 -> GenericTree c b a -> b0 #

foldr' :: (a -> b0 -> b0) -> b0 -> GenericTree c b a -> b0 #

foldl :: (b0 -> a -> b0) -> b0 -> GenericTree c b a -> b0 #

foldl' :: (b0 -> a -> b0) -> b0 -> GenericTree c b a -> b0 #

foldr1 :: (a -> a -> a) -> GenericTree c b a -> a #

foldl1 :: (a -> a -> a) -> GenericTree c b a -> a #

toList :: GenericTree c b a -> [a] #

null :: GenericTree c b a -> Bool #

length :: GenericTree c b a -> Int #

elem :: Eq a => a -> GenericTree c b a -> Bool #

maximum :: Ord a => GenericTree c b a -> a #

minimum :: Ord a => GenericTree c b a -> a #

sum :: Num a => GenericTree c b a -> a #

product :: Num a => GenericTree c b a -> a #

(Traversable c, Traversable b) => Traversable (GenericTree c b) Source # 
Instance details

Defined in Data.Manifold.TreeCover

Methods

traverse :: Applicative f => (a -> f b0) -> GenericTree c b a -> f (GenericTree c b b0) #

sequenceA :: Applicative f => GenericTree c b (f a) -> f (GenericTree c b a) #

mapM :: Monad m => (a -> m b0) -> GenericTree c b a -> m (GenericTree c b b0) #

sequence :: Monad m => GenericTree c b (m a) -> m (GenericTree c b a) #

(Functor c, Functor b) => Functor (GenericTree c b) Source # 
Instance details

Defined in Data.Manifold.TreeCover

Methods

fmap :: (a -> b0) -> GenericTree c b a -> GenericTree c b b0 #

(<$) :: a -> GenericTree c b b0 -> GenericTree c b a #

MonadPlus c => Monoid (GenericTree c b x) Source # 
Instance details

Defined in Data.Manifold.TreeCover

Methods

mempty :: GenericTree c b x #

mappend :: GenericTree c b x -> GenericTree c b x -> GenericTree c b x #

mconcat :: [GenericTree c b x] -> GenericTree c b x #

MonadPlus c => Semigroup (GenericTree c b x) Source # 
Instance details

Defined in Data.Manifold.TreeCover

Methods

(<>) :: GenericTree c b x -> GenericTree c b x -> GenericTree c b x #

sconcat :: NonEmpty (GenericTree c b x) -> GenericTree c b x #

stimes :: Integral b0 => b0 -> GenericTree c b x -> GenericTree c b x #

Generic (GenericTree c b x) Source # 
Instance details

Defined in Data.Manifold.TreeCover

Associated Types

type Rep (GenericTree c b x) :: Type -> Type #

Methods

from :: GenericTree c b x -> Rep (GenericTree c b x) x0 #

to :: Rep (GenericTree c b x) x0 -> GenericTree c b x #

Show (c (x, GenericTree b b x)) => Show (GenericTree c b x) Source # 
Instance details

Defined in Data.Manifold.TreeCover

Methods

showsPrec :: Int -> GenericTree c b x -> ShowS #

show :: GenericTree c b x -> String #

showList :: [GenericTree c b x] -> ShowS #

(NFData x, Foldable c, Foldable b) => NFData (GenericTree c b x) Source # 
Instance details

Defined in Data.Manifold.TreeCover

Methods

rnf :: GenericTree c b x -> () #

Eq (c (x, GenericTree b b x)) => Eq (GenericTree c b x) Source # 
Instance details

Defined in Data.Manifold.TreeCover

Methods

(==) :: GenericTree c b x -> GenericTree c b x -> Bool #

(/=) :: GenericTree c b x -> GenericTree c b x -> Bool #

type Rep (GenericTree c b x) Source # 
Instance details

Defined in Data.Manifold.TreeCover

type Rep (GenericTree c b x) = D1 ('MetaData "GenericTree" "Data.Manifold.TreeCover" "manifolds-0.6.1.0-HwDfr5SAAPC6xJT1NvR2Bm" 'True) (C1 ('MetaCons "GenericTree" 'PrefixI 'True) (S1 ('MetaSel ('Just "treeBranches") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (c (x, GenericTree b b x)))))

:: c (x, GenericTree b b x) -> GenericTree c b x Source #

U+6733 CJK UNIFIED IDEOGRAPH tree. The main purpose of this is to give GenericTree a more concise Show instance.

Misc

class HasFlatView f where Source #

Associated Types

type FlatView f x Source #

Methods

flatView :: f x -> FlatView f x Source #

superFlatView :: f x -> [[x]] Source #

shadesMerge Source #

Arguments

:: forall x. (WithField Manifold x, SimpleSpace (Needle x)) 
=>

How 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.

-> [Shade x]

A list of n shades.

-> [Shade x]

mn shades which cover at least the same area.

Attempt 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.

allTwigs :: forall x y. WithField PseudoAffine x => (x `Shaded` y) -> [Twig x y] Source #

type Twig x y = (Int, x `Shaded` y) Source #

type TwigEnviron x y = [Twig x y] Source #

flexTwigsShading :: forall x y f. (WithField Manifold x, WithField Manifold y, SimpleSpace (Needle x), SimpleSpace (Needle y), Applicative f) => (Shade' (x, y) -> f (x, (Shade' y, LocalLinear x y))) -> (x `Shaded` y) -> f (x `Shaded` y) Source #

traverseTrunkBranchChoices :: Applicative f => ((Int, x `Shaded` y) -> (x `Shaded` y) -> f (x `Shaded` z)) -> (x `Shaded` y) -> f (x `Shaded` z) Source #

data Shaded x y Source #

Constructors

PlainLeaves [(x, y)] 
DisjointBranches !LeafCount (NonEmpty (x `Shaded` y)) 
OverlappingBranches !LeafCount !(Shade x) (NonEmpty (DBranch x y)) 

Instances

Instances details
Foldable (Shaded x) Source # 
Instance details

Defined in Data.Manifold.TreeCover

Methods

fold :: Monoid m => Shaded x m -> m #

foldMap :: Monoid m => (a -> m) -> Shaded x a -> m #

foldMap' :: Monoid m => (a -> m) -> Shaded x a -> m #

foldr :: (a -> b -> b) -> b -> Shaded x a -> b #

foldr' :: (a -> b -> b) -> b -> Shaded x a -> b #

foldl :: (b -> a -> b) -> b -> Shaded x a -> b #

foldl' :: (b -> a -> b) -> b -> Shaded x a -> b #

foldr1 :: (a -> a -> a) -> Shaded x a -> a #

foldl1 :: (a -> a -> a) -> Shaded x a -> a #

toList :: Shaded x a -> [a] #

null :: Shaded x a -> Bool #

length :: Shaded x a -> Int #

elem :: Eq a => a -> Shaded x a -> Bool #

maximum :: Ord a => Shaded x a -> a #

minimum :: Ord a => Shaded x a -> a #

sum :: Num a => Shaded x a -> a #

product :: Num a => Shaded x a -> a #

Traversable (Shaded x) Source # 
Instance details

Defined in Data.Manifold.TreeCover

Methods

traverse :: Applicative f => (a -> f b) -> Shaded x a -> f (Shaded x b) #

sequenceA :: Applicative f => Shaded x (f a) -> f (Shaded x a) #

mapM :: Monad m => (a -> m b) -> Shaded x a -> m (Shaded x b) #

sequence :: Monad m => Shaded x (m a) -> m (Shaded x a) #

Functor (Shaded x) Source # 
Instance details

Defined in Data.Manifold.TreeCover

Methods

fmap :: (a -> b) -> Shaded x a -> Shaded x b #

(<$) :: a -> Shaded x b -> Shaded x a #

(WithField Manifold x, SimpleSpace (Needle x)) => Monoid (ShadeTree x) Source # 
Instance details

Defined in Data.Manifold.TreeCover

(WithField Manifold x, SimpleSpace (Needle x)) => Semigroup (ShadeTree x) Source #

WRT union.

Instance details

Defined in Data.Manifold.TreeCover

Methods

(<>) :: ShadeTree x -> ShadeTree x -> ShadeTree x #

sconcat :: NonEmpty (ShadeTree x) -> ShadeTree x #

stimes :: Integral b => b -> ShadeTree x -> ShadeTree x #

(WithField PseudoAffine x, Show x, Show x, Show (Needle' x), Show (Metric' x)) => Show (ShadeTree x) Source # 
Instance details

Defined in Data.Manifold.TreeCover

Generic (Shaded x y) Source # 
Instance details

Defined in Data.Manifold.TreeCover

Associated Types

type Rep (Shaded x y) :: Type -> Type #

Methods

from :: Shaded x y -> Rep (Shaded x y) x0 #

to :: Rep (Shaded x y) x0 -> Shaded x y #

(NFData x, NFData (Needle' x), NFData y) => NFData (DBranch x y) Source # 
Instance details

Defined in Data.Manifold.TreeCover

Methods

rnf :: DBranch x y -> () #

(NFData x, NFData (Needle' x), NFData y) => NFData (Shaded x y) Source # 
Instance details

Defined in Data.Manifold.TreeCover

Methods

rnf :: Shaded x y -> () #

type Rep (Shaded x y) Source # 
Instance details

Defined in Data.Manifold.TreeCover

type Rep (Shaded x y)

fmapShaded :: (Semimanifold x, SimpleSpace (Needle x)) => (y -> υ) -> (x `Shaded` y) -> x `Shaded` υ Source #

constShaded :: y -> (x `Shaded` y₀) -> x `Shaded` y Source #

zipTreeWithList :: (x `Shaded` w) -> NonEmpty y -> x `Shaded` (w, y) Source #

stiAsIntervalMapping :: (x ~ , y ~ ) => (x `Shaded` y) -> [(x, ((y, Diff y), LinearMap x y))] Source #

type DBranch x y = DBranch' x (x `Shaded` y) Source #

data DBranch' x c Source #

Constructors

DBranch 

Instances

Instances details
Foldable (DBranch' x) Source # 
Instance details

Defined in Data.Manifold.TreeCover

Methods

fold :: Monoid m => DBranch' x m -> m #

foldMap :: Monoid m => (a -> m) -> DBranch' x a -> m #

foldMap' :: Monoid m => (a -> m) -> DBranch' x a -> m #

foldr :: (a -> b -> b) -> b -> DBranch' x a -> b #

foldr' :: (a -> b -> b) -> b -> DBranch' x a -> b #

foldl :: (b -> a -> b) -> b -> DBranch' x a -> b #

foldl' :: (b -> a -> b) -> b -> DBranch' x a -> b #

foldr1 :: (a -> a -> a) -> DBranch' x a -> a #

foldl1 :: (a -> a -> a) -> DBranch' x a -> a #

toList :: DBranch' x a -> [a] #

null :: DBranch' x a -> Bool #

length :: DBranch' x a -> Int #

elem :: Eq a => a -> DBranch' x a -> Bool #

maximum :: Ord a => DBranch' x a -> a #

minimum :: Ord a => DBranch' x a -> a #

sum :: Num a => DBranch' x a -> a #

product :: Num a => DBranch' x a -> a #

Traversable (DBranch' x) Source # 
Instance details

Defined in Data.Manifold.TreeCover

Methods

traverse :: Applicative f => (a -> f b) -> DBranch' x a -> f (DBranch' x b) #

sequenceA :: Applicative f => DBranch' x (f a) -> f (DBranch' x a) #

mapM :: Monad m => (a -> m b) -> DBranch' x a -> m (DBranch' x b) #

sequence :: Monad m => DBranch' x (m a) -> m (DBranch' x a) #

Functor (DBranch' x) Source # 
Instance details

Defined in Data.Manifold.TreeCover

Methods

fmap :: (a -> b) -> DBranch' x a -> DBranch' x b #

(<$) :: a -> DBranch' x b -> DBranch' x a #

Generic (DBranch' x c) Source # 
Instance details

Defined in Data.Manifold.TreeCover

Associated Types

type Rep (DBranch' x c) :: Type -> Type #

Methods

from :: DBranch' x c -> Rep (DBranch' x c) x0 #

to :: Rep (DBranch' x c) x0 -> DBranch' x c #

(WithField PseudoAffine x, Show (Needle' x), Show c) => Show (DBranch' x c) Source # 
Instance details

Defined in Data.Manifold.TreeCover

Methods

showsPrec :: Int -> DBranch' x c -> ShowS #

show :: DBranch' x c -> String #

showList :: [DBranch' x c] -> ShowS #

(NFData x, NFData (Needle' x), NFData y) => NFData (DBranch x y) Source # 
Instance details

Defined in Data.Manifold.TreeCover

Methods

rnf :: DBranch x y -> () #

type Rep (DBranch' x c) Source # 
Instance details

Defined in Data.Manifold.TreeCover

type Rep (DBranch' x c) = D1 ('MetaData "DBranch'" "Data.Manifold.TreeCover" "manifolds-0.6.1.0-HwDfr5SAAPC6xJT1NvR2Bm" 'False) (C1 ('MetaCons "DBranch" 'PrefixI 'True) (S1 ('MetaSel ('Just "boughDirection") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Needle' x)) :*: S1 ('MetaSel ('Just "boughContents") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Hourglass c))))

data Hourglass s Source #

Hourglass as the geometric shape (two opposing ~conical volumes, sharing only a single point in the middle); has nothing to do with time.

Constructors

Hourglass 

Fields

Instances

Instances details
Foldable Hourglass Source # 
Instance details

Defined in Data.Manifold.TreeCover

Methods

fold :: Monoid m => Hourglass m -> m #

foldMap :: Monoid m => (a -> m) -> Hourglass a -> m #

foldMap' :: Monoid m => (a -> m) -> Hourglass a -> m #

foldr :: (a -> b -> b) -> b -> Hourglass a -> b #

foldr' :: (a -> b -> b) -> b -> Hourglass a -> b #

foldl :: (b -> a -> b) -> b -> Hourglass a -> b #

foldl' :: (b -> a -> b) -> b -> Hourglass a -> b #

foldr1 :: (a -> a -> a) -> Hourglass a -> a #

foldl1 :: (a -> a -> a) -> Hourglass a -> a #

toList :: Hourglass a -> [a] #

null :: Hourglass a -> Bool #

length :: Hourglass a -> Int #

elem :: Eq a => a -> Hourglass a -> Bool #

maximum :: Ord a => Hourglass a -> a #

minimum :: Ord a => Hourglass a -> a #

sum :: Num a => Hourglass a -> a #

product :: Num a => Hourglass a -> a #

Traversable Hourglass Source # 
Instance details

Defined in Data.Manifold.TreeCover

Methods

traverse :: Applicative f => (a -> f b) -> Hourglass a -> f (Hourglass b) #

sequenceA :: Applicative f => Hourglass (f a) -> f (Hourglass a) #

mapM :: Monad m => (a -> m b) -> Hourglass a -> m (Hourglass b) #

sequence :: Monad m => Hourglass (m a) -> m (Hourglass a) #

Applicative Hourglass Source # 
Instance details

Defined in Data.Manifold.TreeCover

Methods

pure :: a -> Hourglass a #

(<*>) :: Hourglass (a -> b) -> Hourglass a -> Hourglass b #

liftA2 :: (a -> b -> c) -> Hourglass a -> Hourglass b -> Hourglass c #

(*>) :: Hourglass a -> Hourglass b -> Hourglass b #

(<*) :: Hourglass a -> Hourglass b -> Hourglass a #

Functor Hourglass Source # 
Instance details

Defined in Data.Manifold.TreeCover

Methods

fmap :: (a -> b) -> Hourglass a -> Hourglass b #

(<$) :: a -> Hourglass b -> Hourglass a #

Foldable Hourglass (->) (->) Source # 
Instance details

Defined in Data.Manifold.TreeCover

Methods

ffoldl :: (ObjectPair (->) a b, ObjectPair (->) a (Hourglass b)) => ((a, b) -> a) -> (a, Hourglass b) -> a #

foldMap :: (Object (->) a, Object (->) (Hourglass a), Semigroup m, Monoid m, Object (->) m, Object (->) m) => (a -> m) -> Hourglass a -> m #

(Monoid s, Semigroup s) => Monoid (Hourglass s) Source # 
Instance details

Defined in Data.Manifold.TreeCover

Semigroup s => Semigroup (Hourglass s) Source # 
Instance details

Defined in Data.Manifold.TreeCover

Methods

(<>) :: Hourglass s -> Hourglass s -> Hourglass s #

sconcat :: NonEmpty (Hourglass s) -> Hourglass s #

stimes :: Integral b => b -> Hourglass s -> Hourglass s #

Generic (Hourglass s) Source # 
Instance details

Defined in Data.Manifold.TreeCover

Associated Types

type Rep (Hourglass s) :: Type -> Type #

Methods

from :: Hourglass s -> Rep (Hourglass s) x #

to :: Rep (Hourglass s) x -> Hourglass s #

Show s => Show (Hourglass s) Source # 
Instance details

Defined in Data.Manifold.TreeCover

NFData s => NFData (Hourglass s) Source # 
Instance details

Defined in Data.Manifold.TreeCover

Methods

rnf :: Hourglass s -> () #

type Rep (Hourglass s) Source # 
Instance details

Defined in Data.Manifold.TreeCover

type Rep (Hourglass s) = D1 ('MetaData "Hourglass" "Data.Manifold.TreeCover" "manifolds-0.6.1.0-HwDfr5SAAPC6xJT1NvR2Bm" 'False) (C1 ('MetaCons "Hourglass" 'PrefixI 'True) (S1 ('MetaSel ('Just "upperBulb") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 s) :*: S1 ('MetaSel ('Just "lowerBulb") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 s)))

unsafeFmapTree :: (NonEmpty (x, y) -> NonEmpty (ξ, υ)) -> (Needle' x -> Needle' ξ) -> (Shade x -> Shade ξ) -> (x `Shaded` y) -> ξ `Shaded` υ Source #

External

type AffineManifold m = (Atlas' m, Manifold m, AffineSpace m, Needle m ~ Diff m) Source #

The AffineSpace class plus manifold constraints.