Copyright | (c) Justus Sagemüller 2017 |
---|---|
License | GPL v3 |
Maintainer | (@) sagemueller $ geo.uni-koeln.de |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
- type WebNodeId = Int
- type WebNodeIdOffset = Int
- data Neighbourhood x y = Neighbourhood {
- _dataAtNode :: y
- _neighbours :: Vector WebNodeIdOffset
- _localScalarProduct :: Metric x
- _webBoundaryAtNode :: Maybe (Needle' x)
- webBoundaryAtNode :: forall x y. Lens' (Neighbourhood x y) (Maybe (Needle' x))
- neighbours :: forall x y. Lens' (Neighbourhood x y) (Vector WebNodeIdOffset)
- localScalarProduct :: forall x y. Lens' (Neighbourhood x y) (Metric x)
- dataAtNode :: forall x y y. Lens (Neighbourhood x y) (Neighbourhood x y) y y
- data WebLocally x y = LocalWebInfo {
- _thisNodeCoord :: x
- _thisNodeData :: y
- _thisNodeId :: WebNodeId
- _nodeNeighbours :: [(WebNodeId, (Needle x, WebLocally x y))]
- _nodeLocalScalarProduct :: Metric x
- _webBoundingPlane :: Maybe (Needle' x)
- webBoundingPlane :: forall x y. Lens' (WebLocally x y) (Maybe (Needle' x))
- thisNodeId :: forall x y. Lens' (WebLocally x y) WebNodeId
- thisNodeData :: forall x y. Lens' (WebLocally x y) y
- thisNodeCoord :: forall x y. Lens' (WebLocally x y) x
- nodeNeighbours :: forall x y. Lens' (WebLocally x y) [(WebNodeId, (Needle x, WebLocally x y))]
- nodeLocalScalarProduct :: forall x y. Lens' (WebLocally x y) (Metric x)
- data NeighbourhoodVector x = NeighbourhoodVector {
- _nvectId :: Int
- _theNVect :: Needle x
- _nvectNormal :: Needle' x
- _nvectLength :: Scalar (Needle x)
- _otherNeighboursOverlap :: Scalar (Needle x)
- theNVect :: forall x. Lens' (NeighbourhoodVector x) (Needle x)
- otherNeighboursOverlap :: forall x. Lens' (NeighbourhoodVector x) (Scalar (Needle x))
- nvectNormal :: forall x. Lens' (NeighbourhoodVector x) (Needle' x)
- nvectLength :: forall x. Lens' (NeighbourhoodVector x) (Scalar (Needle x))
- nvectId :: forall x. Lens' (NeighbourhoodVector x) Int
- data PropagationInconsistency x υ
- = PropagationInconsistency {
- _inconsistentPropagatedData :: [(x, υ)]
- _inconsistentAPrioriData :: υ
- | PropagationInconsistencies [PropagationInconsistency x υ]
- = PropagationInconsistency {
- inconsistentPropagatedData :: forall x υ. Traversal' (PropagationInconsistency x υ) [(x, υ)]
- inconsistentAPrioriData :: forall x υ. Traversal' (PropagationInconsistency x υ) υ
- newtype PointsWeb :: * -> * -> * where
- data WebChunk x y = WebChunk {
- _thisChunk :: PointsWeb x y
- _layersAroundChunk :: [(x `Shaded` Neighbourhood x y, WebNodeId)]
- thisChunk :: forall x y. Lens' (WebChunk x y) (PointsWeb x y)
- layersAroundChunk :: forall x y. Lens' (WebChunk x y) [(Shaded x (Neighbourhood x y), WebNodeId)]
- data NodeInWeb x y = NodeInWeb {
- _thisNodeOnly :: (x, Neighbourhood x y)
- _layersAroundNode :: [(x `Shaded` Neighbourhood x y, WebNodeId)]
- thisNodeOnly :: forall x y. Lens' (NodeInWeb x y) (x, Neighbourhood x y)
- layersAroundNode :: forall x y. Lens' (NodeInWeb x y) [(Shaded x (Neighbourhood x y), WebNodeId)]
- data PathStep x y = PathStep {
- _pathStepStart :: WebLocally x y
- _pathStepEnd :: WebLocally x y
- pathStepStart :: forall x y. Lens' (PathStep x y) (WebLocally x y)
- pathStepEnd :: forall x y. Lens' (PathStep x y) (WebLocally x y)
- type MetricChoice x = Shade x -> Metric x
- traverseInnermostChunks :: forall f x y z. Applicative f => (WebChunk x y -> f (PointsWeb x z)) -> PointsWeb x y -> f (PointsWeb x z)
- traverseNodesInEnvi :: forall f x y z. Applicative f => (NodeInWeb x y -> f (Neighbourhood x z)) -> PointsWeb x y -> f (PointsWeb x z)
- fmapNodesInEnvi :: (NodeInWeb x y -> Neighbourhood x z) -> PointsWeb x y -> PointsWeb x z
- ixedFoci :: [a] -> [((Int, a), [a])]
- indexWeb :: PointsWeb x y -> WebNodeId -> Maybe (x, y)
- unsafeIndexWebData :: PointsWeb x y -> WebNodeId -> y
- jumpNodeOffset :: WebNodeIdOffset -> NodeInWeb x y -> NodeInWeb x y
- webAroundChunk :: WebChunk x y -> PointsWeb x y
- zoomoutWebChunk :: WebNodeIdOffset -> WebChunk x y -> (WebChunk x y, WebNodeId)
- pickNodeInWeb :: PointsWeb x y -> WebNodeId -> NodeInWeb x y
- webLocalInfo :: forall x y. WithField ℝ Manifold x => PointsWeb x y -> PointsWeb x (WebLocally x y)
- localFmapWeb :: WithField ℝ Manifold x => (WebLocally x y -> z) -> PointsWeb x y -> PointsWeb x z
- tweakWebGeometry :: (WithField ℝ Manifold x, SimpleSpace (Needle x)) => MetricChoice x -> (WebLocally x y -> [WebNodeId]) -> PointsWeb x y -> PointsWeb x y
- bidirectionaliseWebLinks :: forall x y. PointsWeb x y -> PointsWeb x y
- pumpHalfspace :: forall v. (SimpleSpace v, Scalar v ~ ℝ) => Norm v -> v -> (DualVector v, [v]) -> Maybe (DualVector v)
- smallPseudorandSeq :: [ℝ]
- data LinkingBadness r = LinkingBadness {
- gatherDirectionsBadness :: !r
- closeSystemBadness :: !r
- linkingUndesirability :: ℝ -> ℝ -> LinkingBadness ℝ
- bestNeighbours :: forall i v. (SimpleSpace v, Scalar v ~ ℝ) => Norm v -> [(i, v)] -> ([i], Maybe (DualVector v))
- bestNeighbours' :: forall i v. (SimpleSpace v, Scalar v ~ ℝ) => Norm v -> [(i, v)] -> ([(i, v)], Maybe (DualVector v))
- gatherGoodNeighbours :: forall i v. (SimpleSpace v, Scalar v ~ ℝ) => Norm v -> Variance v -> DualVector v -> [v] -> [(i, v)] -> [(i, v)] -> ([(i, v)], Maybe (DualVector v))
- extractSmallestOn :: Ord b => (a -> Maybe b) -> [a] -> Maybe (a, [a])
- type WNIPath = [WebNodeId]
- type NodeSet = IntSet
- traversePathInIWeb :: forall φ x y. (WithField ℝ Manifold x, Monad φ, HasCallStack) => [WebNodeId] -> (PathStep x y -> φ y) -> PointsWeb x (WebLocally x y) -> φ (PointsWeb x (WebLocally x y))
- traversePathsTowards :: forall f φ x y. (WithField ℝ Manifold x, Monad φ, Monad f, HasCallStack) => WebNodeId -> (PathStep x y -> φ y) -> (forall υ. WebLocally x y -> φ υ -> f υ) -> PointsWeb x y -> f (PointsWeb x y)
Documentation
type WebNodeIdOffset = Int Source #
data Neighbourhood x y Source #
Neighbourhood | |
|
Functor (Neighbourhood x) Source # | |
Foldable (Neighbourhood x) Source # | |
Traversable (Neighbourhood x) Source # | |
(WithField ℝ PseudoAffine x, SimpleSpace (Needle x), Show (Needle' x), Show y) => Show (Neighbourhood x y) Source # | |
Generic (Neighbourhood x y) Source # | |
(NFData x, NFData (Metric x), NFData (Needle' x), NFData y) => NFData (Neighbourhood x y) Source # | |
type Rep (Neighbourhood x y) Source # | |
webBoundaryAtNode :: forall x y. Lens' (Neighbourhood x y) (Maybe (Needle' x)) Source #
neighbours :: forall x y. Lens' (Neighbourhood x y) (Vector WebNodeIdOffset) Source #
localScalarProduct :: forall x y. Lens' (Neighbourhood x y) (Metric x) Source #
dataAtNode :: forall x y y. Lens (Neighbourhood x y) (Neighbourhood x y) y y Source #
data WebLocally x y Source #
LocalWebInfo | |
|
Functor (WebLocally x) Source # | |
WithField ℝ Manifold x => Comonad (WebLocally x) Source # |
|
Generic (WebLocally x y) Source # | |
type Rep (WebLocally x y) Source # | |
webBoundingPlane :: forall x y. Lens' (WebLocally x y) (Maybe (Needle' x)) Source #
thisNodeId :: forall x y. Lens' (WebLocally x y) WebNodeId Source #
thisNodeData :: forall x y. Lens' (WebLocally x y) y Source #
thisNodeCoord :: forall x y. Lens' (WebLocally x y) x Source #
nodeNeighbours :: forall x y. Lens' (WebLocally x y) [(WebNodeId, (Needle x, WebLocally x y))] Source #
nodeLocalScalarProduct :: forall x y. Lens' (WebLocally x y) (Metric x) Source #
data NeighbourhoodVector x Source #
NeighbourhoodVector | |
|
otherNeighboursOverlap :: forall x. Lens' (NeighbourhoodVector x) (Scalar (Needle x)) Source #
nvectNormal :: forall x. Lens' (NeighbourhoodVector x) (Needle' x) Source #
nvectLength :: forall x. Lens' (NeighbourhoodVector x) (Scalar (Needle x)) Source #
data PropagationInconsistency x υ Source #
PropagationInconsistency | |
| |
PropagationInconsistencies [PropagationInconsistency x υ] |
(Show υ, Show x) => Show (PropagationInconsistency x υ) Source # | |
Monoid (PropagationInconsistency x υ) Source # | |
inconsistentPropagatedData :: forall x υ. Traversal' (PropagationInconsistency x υ) [(x, υ)] Source #
inconsistentAPrioriData :: forall x υ. Traversal' (PropagationInconsistency x υ) υ Source #
newtype PointsWeb :: * -> * -> * where 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.
PointsWeb :: {..} -> PointsWeb x y | |
|
Functor (PointsWeb a) Source # | |
Foldable (PointsWeb a) Source # | |
Traversable (PointsWeb a) Source # | |
Foldable (PointsWeb x) (->) (->) Source # | |
Generic (PointsWeb a b) Source # | |
(NFData x, NFData (Metric x), NFData (Needle' x), NFData y) => NFData (PointsWeb x y) Source # | |
type Rep (PointsWeb a b) Source # | |
WebChunk | |
|
layersAroundChunk :: forall x y. Lens' (WebChunk x y) [(Shaded x (Neighbourhood x y), WebNodeId)] Source #
NodeInWeb | |
|
thisNodeOnly :: forall x y. Lens' (NodeInWeb x y) (x, Neighbourhood x y) Source #
layersAroundNode :: forall x y. Lens' (NodeInWeb x y) [(Shaded x (Neighbourhood x y), WebNodeId)] Source #
PathStep | |
|
pathStepStart :: forall x y. Lens' (PathStep x y) (WebLocally x y) Source #
pathStepEnd :: forall x y. Lens' (PathStep x y) (WebLocally x y) Source #
type MetricChoice x = Shade x -> Metric x Source #
traverseInnermostChunks :: forall f x y z. Applicative f => (WebChunk x y -> f (PointsWeb x z)) -> PointsWeb x y -> f (PointsWeb x z) Source #
traverseNodesInEnvi :: forall f x y z. Applicative f => (NodeInWeb x y -> f (Neighbourhood x z)) -> PointsWeb x y -> f (PointsWeb x z) Source #
fmapNodesInEnvi :: (NodeInWeb x y -> Neighbourhood x z) -> PointsWeb x y -> PointsWeb x z Source #
unsafeIndexWebData :: PointsWeb x y -> WebNodeId -> y Source #
jumpNodeOffset :: WebNodeIdOffset -> NodeInWeb x y -> NodeInWeb x y Source #
webAroundChunk :: WebChunk x y -> PointsWeb x y Source #
zoomoutWebChunk :: WebNodeIdOffset -> WebChunk x y -> (WebChunk x y, WebNodeId) Source #
webLocalInfo :: forall x y. WithField ℝ Manifold x => PointsWeb x y -> PointsWeb x (WebLocally x y) Source #
localFmapWeb :: WithField ℝ Manifold x => (WebLocally x y -> z) -> PointsWeb x y -> PointsWeb x z Source #
tweakWebGeometry :: (WithField ℝ Manifold x, SimpleSpace (Needle x)) => MetricChoice x -> (WebLocally x y -> [WebNodeId]) -> PointsWeb x y -> PointsWeb x y Source #
bidirectionaliseWebLinks :: forall x y. PointsWeb x y -> PointsWeb x y Source #
:: (SimpleSpace v, Scalar v ~ ℝ) | |
=> Norm v | |
-> v | A vector |
-> (DualVector v, [v]) | A plane |
-> Maybe (DualVector v) | The plane |
smallPseudorandSeq :: [ℝ] Source #
data LinkingBadness r Source #
LinkingBadness | |
|
linkingUndesirability Source #
:: ℝ | Absolute-square distance (euclidean norm squared) |
-> ℝ | Directional distance (distance from wall containing all already known neighbours) |
-> LinkingBadness ℝ | “Badness” of this point as the next neighbour to link to. In gatherDirections mode this is large if the point is far away, but also if it is right normal to the wall. The reason we punish this is that adding two points directly opposed to each other would lead to an ill-defined wall orientation, i.e. wrong normals on the web boundary. |
bestNeighbours :: forall i v. (SimpleSpace v, Scalar v ~ ℝ) => Norm v -> [(i, v)] -> ([i], Maybe (DualVector v)) Source #
bestNeighbours' :: forall i v. (SimpleSpace v, Scalar v ~ ℝ) => Norm v -> [(i, v)] -> ([(i, v)], Maybe (DualVector v)) Source #
gatherGoodNeighbours :: forall i v. (SimpleSpace v, Scalar v ~ ℝ) => Norm v -> Variance v -> DualVector v -> [v] -> [(i, v)] -> [(i, v)] -> ([(i, v)], Maybe (DualVector v)) Source #
traversePathInIWeb :: forall φ x y. (WithField ℝ Manifold x, Monad φ, HasCallStack) => [WebNodeId] -> (PathStep x y -> φ y) -> PointsWeb x (WebLocally x y) -> φ (PointsWeb x (WebLocally x y)) Source #
:: (WithField ℝ Manifold x, Monad φ, Monad f, HasCallStack) | |
=> WebNodeId | The node towards which the paths should converge. |
-> (PathStep x y -> φ y) | The action which to traverse along each path. |
-> (forall υ. WebLocally x y -> φ υ -> f υ) | Initialisation/evaluation for each path-traversal. |
-> PointsWeb x y | |
-> f (PointsWeb x y) |