| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Goal.Geometry.Differential
Description
This module provides tools for working with differential and Riemannian geometry.
- newtype Tangent c m = Tangent {
- removeTangent :: c :#: m
- newtype Bundle c m = Bundle {
- removeBundle :: m
- data Partials = Partials
- data Differentials = Differentials
- gradientStep :: Manifold m => Double -> (Partials :#: Tangent c m) -> c :#: m
- projectTangent :: (d :#: Tangent c m) -> c :#: m
- tangentToBundle :: Manifold m => (c :#: Tangent d m) -> c :#: Bundle d m
- bundleToTangent :: Manifold m => (c :#: Bundle d m) -> c :#: Tangent d m
- class Manifold m => Riemannian c m where
- gradientAscent :: (Riemannian c m, Manifold m) => Double -> ((c :#: m) -> Differentials :#: Tangent c m) -> (c :#: m) -> [c :#: m]
- vanillaGradientAscent :: Manifold m => Double -> ((c :#: m) -> Differentials :#: Tangent c m) -> (c :#: m) -> [c :#: m]
- gradientDescent :: (Riemannian c m, Manifold m) => Double -> ((c :#: m) -> Differentials :#: Tangent c m) -> (c :#: m) -> [c :#: m]
- vanillaGradientDescent :: Manifold m => Double -> ((c :#: m) -> Differentials :#: Tangent c m) -> (c :#: m) -> [c :#: m]
Tangent Spaces
Types
Tangent spaces on Manifolds are the basis for differential geometry.
Tangent spaces are defined at each point on a differentiable Manifold.
Constructors
| Tangent | |
Fields
| |
Constructors
| Bundle | |
Fields
| |
The Partials coordinate system is defined as the partial derivatives of
the coordinate functions at a particular point.
Constructors
| Partials |
data Differentials Source
The Differentials coordinate system represents the set of linear
functionals on the Tangent space.
Constructors
| Differentials |
Instances
Functions
gradientStep :: Manifold m => Double -> (Partials :#: Tangent c m) -> c :#: m Source
gradientStep follows takes a gradient in a particular tangent space and
transforms the point underlying the given tangent space by shifting it
slightly in the direction of the gradient.
projectTangent :: (d :#: Tangent c m) -> c :#: m Source
Returns the underlying Point from a Tangent vector.
Riemannian Manifolds
class Manifold m => Riemannian c m where Source
Riemannian Manifolds are differentiable Manifolds where associated
with each point in the Manifold is a Tangent space with a smoothly
varying inner product. flat and sharp correspond to lowering and
raising the indices via the musical isomorphism determined by the metric
tensor.
A Riemannian Manifold should should satisfy the law
flat $ sharp p = p
Minimal complete definition
Methods
metric :: (c :#: m) -> Function Partials Differentials :#: Tensor (Tangent c m) (Tangent c m) Source
flat :: (Partials :#: Tangent c m) -> Differentials :#: Tangent c m Source
sharp :: (Differentials :#: Tangent c m) -> Partials :#: Tangent c m Source
Instances
| Riemannian Cartesian Continuum Source | |
| Riemannian Cartesian Euclidean Source | |
| (Manifold m, Riemannian c m) => Riemannian c (Replicated m) Source | |
| (Manifold m, Riemannian c m) => Riemannian Partials (Tangent c m) Source |
Gradient Pursuit
Arguments
| :: (Riemannian c m, Manifold m) | |
| => Double | Step size |
| -> ((c :#: m) -> Differentials :#: Tangent c m) | Gradient calculator |
| -> (c :#: m) | The initial point |
| -> [c :#: m] | The gradient ascent |
Arguments
| :: (Riemannian c m, Manifold m) | |
| => Double | Step size |
| -> ((c :#: m) -> Differentials :#: Tangent c m) | Gradient calculator |
| -> (c :#: m) | The initial point |
| -> [c :#: m] | The gradient ascent |