manifolds-0.6.0.0: Coordinate-free hypersurfaces
Copyright(c) Justus Sagemüller 2016
LicenseGPL v3
Maintainer(@) jsag $ hvl.no
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Data.Manifold.Web

Description

 
Synopsis

The web data type

data PointsWeb :: * -> * -> * Source #

A PointsWeb 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.

†In general, there can be disconnected components, but every connected component is strongly connected.

Instances

Instances details
Functor (PointsWeb a) Source # 
Instance details

Defined in Data.Manifold.Web.Internal

Methods

fmap :: (a0 -> b) -> PointsWeb a a0 -> PointsWeb a b #

(<$) :: a0 -> PointsWeb a b -> PointsWeb a a0 #

Foldable (PointsWeb a) Source # 
Instance details

Defined in Data.Manifold.Web.Internal

Methods

fold :: Monoid m => PointsWeb a m -> m #

foldMap :: Monoid m => (a0 -> m) -> PointsWeb a a0 -> m #

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

foldr :: (a0 -> b -> b) -> b -> PointsWeb a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> PointsWeb a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> PointsWeb a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> PointsWeb a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> PointsWeb a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> PointsWeb a a0 -> a0 #

toList :: PointsWeb a a0 -> [a0] #

null :: PointsWeb a a0 -> Bool #

length :: PointsWeb a a0 -> Int #

elem :: Eq a0 => a0 -> PointsWeb a a0 -> Bool #

maximum :: Ord a0 => PointsWeb a a0 -> a0 #

minimum :: Ord a0 => PointsWeb a a0 -> a0 #

sum :: Num a0 => PointsWeb a a0 -> a0 #

product :: Num a0 => PointsWeb a a0 -> a0 #

Traversable (PointsWeb a) Source # 
Instance details

Defined in Data.Manifold.Web.Internal

Methods

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

sequenceA :: Applicative f => PointsWeb a (f a0) -> f (PointsWeb a a0) #

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

sequence :: Monad m => PointsWeb a (m a0) -> m (PointsWeb a a0) #

Foldable (PointsWeb x) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Data.Manifold.Web.Internal

Methods

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

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

Generic (PointsWeb a b) Source # 
Instance details

Defined in Data.Manifold.Web.Internal

Associated Types

type Rep (PointsWeb a b) :: Type -> Type #

Methods

from :: PointsWeb a b -> Rep (PointsWeb a b) x #

to :: Rep (PointsWeb a b) x -> PointsWeb a b #

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

Defined in Data.Manifold.Web.Internal

Methods

rnf :: PointsWeb x y -> () #

type Rep (PointsWeb a b) Source # 
Instance details

Defined in Data.Manifold.Web.Internal

type Rep (PointsWeb a b) = D1 ('MetaData "PointsWeb" "Data.Manifold.Web.Internal" "manifolds-0.6.0.0-2hpTy2WDbWFIao1Zhdbsgu" 'True) (C1 ('MetaCons "PointsWeb" 'PrefixI 'True) (S1 ('MetaSel ('Just "webNodeRsc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Shaded a (Neighbourhood a b)))))

Construction

fromWebNodes :: forall x y. (WithField Manifold x, SimpleSpace (Needle x)) => MetricChoice x -> [(x, y)] -> PointsWeb x y Source #

fromShadeTree :: forall x. (WithField Manifold x, SimpleSpace (Needle x)) => (Shade x -> Metric x) -> ShadeTree x -> PointsWeb x () Source #

fromShaded Source #

Arguments

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

Local scalar-product generator. You can always use recipMetric . _shadeExpanse (but this may give distortions compared to an actual Riemannian metric).

-> (x `Shaded` y)

Source tree.

-> PointsWeb x y 

Lookup

nearestNeighbour :: forall x y. (WithField Manifold x, SimpleSpace (Needle x)) => PointsWeb x y -> x -> Maybe (x, y) Source #

fmap from the co-Kleisli category of WebLocally.

Decomposition

sliceWeb_lin :: forall x y. (WithField Manifold x, SimpleSpace (Needle x), Geodesic x, Geodesic y) => PointsWeb x y -> Cutplane x -> [(x, y)] Source #

Fetch a point between any two neighbouring web nodes on opposite sides of the plane, and linearly interpolate the values onto the cut plane.

sampleWeb_2Dcartesian_lin :: (x ~ , y ~ , Geodesic z) => PointsWeb (x, y) z -> ((x, x), Int) -> ((y, y), Int) -> [(y, [(x, Maybe z)])] Source #

sampleEntireWeb_2Dcartesian_lin :: (x ~ , y ~ , Geodesic z) => PointsWeb (x, y) z -> Int -> Int -> [(y, [(x, Maybe z)])] Source #

Local environments

localFocusWeb :: WithField Manifold x => PointsWeb x y -> PointsWeb x ((x, y), [(Needle x, y)]) Source #

Uncertain functions

localModels_CGrid :: forall x y ㄇ. (ModellableRelation x y, LocalModel ㄇ) => PointsWeb x (Shade' y) -> [(x, ㄇ x y)] Source #

Calculate a quadratic fit with uncertainty margin centered around the connection between any two adjacent nodes. In case of a regular grid (which we by no means require here!) this corresponds to the vector quantities of an Arakawa type C/D grid (cf. A. Arakawa, V.R. Lamb (1977): Computational design of the basic dynamical processes of the UCLA general circulation model)

Differential equations

Fixed resolution

iterateFilterDEqn_static :: (ModellableRelation x y, MonadPlus m, LocalModel ㄇ) => InformationMergeStrategy [] m (x, Shade' y) iy -> Embedding (->) (Shade' y) iy -> DifferentialEqn ㄇ x y -> PointsWeb x (Shade' y) -> Cofree m (PointsWeb x (Shade' y)) Source #

iterateFilterDEqn_static_selective :: (ModellableRelation x y, MonadPlus m, badness ~ , LocalModel ㄇ) => InformationMergeStrategy [] m (x, Shade' y) iy -> Embedding (->) (Shade' y) iy -> (x -> iy -> badness) -> DifferentialEqn ㄇ x y -> PointsWeb x (Shade' y) -> Cofree m (PointsWeb x (Shade' y)) Source #

Automatic resolution

filterDEqnSolutions_adaptive Source #

Arguments

:: forall x y ㄇ ð badness m. (ModellableRelation x y, AffineManifold y, badness ~ , Monad m, LocalModel ㄇ) 
=> MetricChoice x

Scalar product on the domain, for regularising the web.

-> InconsistencyStrategy m x (Shade' y) 
-> DifferentialEqn ㄇ x y 
-> (x -> Shade' y -> badness) 
-> PointsWeb x (SolverNodeState x y) 
-> m (PointsWeb x (SolverNodeState x y)) 

iterateFilterDEqn_adaptive Source #

Arguments

:: (ModellableRelation x y, AffineManifold y, LocalModel ㄇ, Monad m) 
=> MetricChoice x

Scalar product on the domain, for regularising the web.

-> InconsistencyStrategy m x (Shade' y) 
-> DifferentialEqn ㄇ x y 
-> (x -> Shade' y -> )

Badness function for local results.

-> PointsWeb x (Shade' y) 
-> [PointsWeb x (Shade' y)] 

Configuration

newtype InformationMergeStrategy n m y' y Source #

Constructors

InformationMergeStrategy 

Fields

Misc

data ConvexSet x Source #

Constructors

EmptyConvex 
ConvexSet 

Fields

Instances

Instances details
LtdErrorShow x => Show (ConvexSet x) Source # 
Instance details

Defined in Data.Manifold.Web

Refinable x => Semigroup (ConvexSet x) Source #

Under intersection.

Instance details

Defined in Data.Manifold.Web

Methods

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

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

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

ellipsoidSet :: Embedding (->) (Maybe (Shade' x)) (ConvexSet x) Source #

rescanPDELocally :: forall x y ㄇ. (ModellableRelation x y, LocalModel ㄇ) => DifferentialEqn ㄇ x y -> WebLocally x (Shade' y) -> Maybe (Shade' y) Source #

localOnion :: forall x y. WithField Manifold x => WebLocally x y -> [WebNodeId] -> [[(Needle x, WebLocally x y)]] Source #

webOnions :: forall x y. WithField Manifold x => PointsWeb x y -> PointsWeb x [[(x, y)]] Source #

knitShortcuts :: forall x y. (WithField Manifold x, SimpleSpace (Needle x)) => MetricChoice x -> PointsWeb x y -> PointsWeb x y Source #

Consider at each node not just the connections to already known neighbours, but also the connections to their neighbours. If these next-neighbours turn out to be actually situated closer, link to them directly.