manifolds-0.2.3.0: Coordinate-free hypersurfaces

Copyright(c) Justus Sagemüller 2015
LicenseGPL v3
Maintainer(@) sagemueller $ geo.uni-koeln.de
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Data.Manifold.Types

Contents

Description

Several commonly-used manifolds, represented in some simple way as Haskell data types. All these are in the PseudoAffine class.

Synopsis

Index / ASCII names

Linear manifolds

type ℝ² = (, ) Source

type ℝ³ = (ℝ², ) Source

Hyperspheres

General form: Stiefel manifolds

data Stiefel1 v Source

The n-th Stiefel manifold is the space of all possible configurations of n orthonormal vectors. In the case n = 1, simply the subspace of normalised vectors, i.e. equivalent to the UnitSphere. 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.

stiefel1Project Source

Arguments

:: LinearManifold v 
=> DualSpace v

Must be nonzero.

-> Stiefel1 v 

Specific examples

class (PseudoAffine v, InnerSpace v, NaturallyEmbedded (UnitSphere v) (DualSpace v)) => HasUnitSphere v where Source

Minimal complete definition

Nothing

Associated Types

type UnitSphere v :: * Source

data S⁰ Source

The zero-dimensional sphere is actually just two points. Implementation might therefore change to ℝ⁰ + ℝ⁰: the disjoint sum of two single-point spaces.

newtype Source

The unit circle.

Constructors

 

Fields

φParamS¹ :: Double

Must be in range [-π, π[.

data Source

The ordinary unit sphere.

Constructors

 

Fields

ϑParamS² :: !Double

Range [0, π[.

φParamS² :: !Double

Range [-π, π[.

Projective spaces

data ℝP² Source

The two-dimensional real projective space, implemented as a unit disk with opposing points on the rim glued together.

Constructors

ℝP² 

Fields

rParamℝP² :: !Double

Range [0, 1].

φParamℝP² :: !Double

Range [-π, π[.

Intervals/disks/cones

newtype Source

The “one-dimensional disk” – really just the line segment between the two points -1 and 1 of 'S⁰', i.e. this is simply a closed interval.

Constructors

 

Fields

xParamD¹ :: Double

Range [-1, 1].

data Source

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²'!)

Constructors

 

Fields

rParamD² :: !Double

Range [0, 1].

φParamD² :: !Double

Range [-π, π[.

Instances

type ℝay = Cℝay ℝ⁰ Source

Better known as ℝ⁺ (which is not a legal Haskell name), the ray of positive numbers (including zero, i.e. closed on one end).

data CD¹ x Source

A (closed) cone over a space x is the product of x with the closed interval 'D¹' of “heights”, except on its “tip”: here, x is smashed to a single point.

This construct becomes (homeomorphic-to-) an actual geometric cone (and to 'D²') in the special case x = 'S¹'.

Constructors

CD¹ 

Fields

hParamCD¹ :: !Double

Range [0, 1]

pParamCD¹ :: !x

Irrelevant at h = 0.

data Cℝay x Source

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

Constructors

Cℝay 

Fields

hParamCℝay :: !Double

Range [0, ∞[

pParamCℝay :: !x

Irrelevant at h = 0.

Affine subspaces

Lines

data Line x Source

Constructors

Line 

Hyperplanes

data Cutplane x Source

Oriented hyperplanes, naïvely generalised to PseudoAffine manifolds: Cutplane p w represents the set of all points q such that (q.-~.p) ^<.> w ≡ 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.

Constructors

Cutplane 

Fields

sawHandle :: x
 
cutNormal :: Stiefel1 (Needle x)
 

fathomCutDistance Source

Arguments

:: WithField Manifold x 
=> Cutplane x

Hyperplane to measure the distance from.

-> HerMetric' (Needle x)

Metric to use for measuring that distance. This can only be accurate if the metric is valid both around the cut-plane's sawHandle, and around the points you measure. (Strictly speaking, we would need parallel transport to ensure this).

-> x

Point to measure the distance to.

-> Option

A signed number, giving the distance from plane to point with indication on which side the point lies. Nothing if the point isn't reachable from the plane.

cutPosBetween :: WithField Manifold x => Cutplane x -> (x, x) -> Option Source

Linear mappings

data Linear s a b Source

A linear mapping between finite-dimensional spaces, implemeted as a dense matrix.

Note that this is equivalent to the tensor product DualSpace a ⊗ b. One of the types should be deprecated in the future, or either implemented in terms of the other.

Instances

SmoothScalar s => EnhancedCat (->) (Linear s) Source 
SmoothScalar s => Morphism (Linear s) Source 
SmoothScalar s => PreArrow (Linear s) Source 
SmoothScalar s => CartesianAgent (Linear s) Source 
SmoothScalar s => Category (Linear s) Source 
SmoothScalar s => Cartesian (Linear s) Source 
SmoothScalar s => HasAgent (Linear s) Source 
(FiniteDimensional v, (~) * (Scalar v) s, FiniteDimensional w, (~) * (Scalar w) s, SmoothScalar s) => AffineSpace (Linear s v w) Source 
(FiniteDimensional v, (~) * (Scalar v) s, FiniteDimensional w, (~) * (Scalar w) s, SmoothScalar s) => HasBasis (Linear s v w) Source 
(FiniteDimensional v, (~) * (Scalar v) s, FiniteDimensional w, (~) * (Scalar w) s, SmoothScalar s) => VectorSpace (Linear s v w) Source 
(FiniteDimensional v, (~) * (Scalar v) s, FiniteDimensional w, (~) * (Scalar w) s, SmoothScalar s) => AdditiveGroup (Linear s v w) Source 
(FiniteDimensional v, (~) * (Scalar v) s, FiniteDimensional w, (~) * (Scalar w) s) => FiniteDimensional (Linear s v w) Source 
(HasMetric v, HasMetric w, (~) * s (Scalar v), (~) * s (Scalar w)) => HasMetric' (Linear s v w) Source 
(HasMetric a, FiniteDimensional b, (~) * (Scalar a) s, (~) * (Scalar b) s) => PseudoAffine (Linear s a b) Source 
(HasMetric a, FiniteDimensional b, (~) * (Scalar a) s, (~) * (Scalar b) s) => Semimanifold (Linear s a b) Source 
type UnitObject (Linear s) = ZeroDim s Source 
type Object (Linear s) v = (FiniteDimensional v, (~) * (Scalar v) s) Source 
type PairObjects (Linear s) a b = () 
type AgentVal (Linear s) a v = GenericAgent (Linear s) a v 
type Diff (Linear s v w) = Linear s v w Source 
type Basis (Linear s v w) = (Basis v, Basis w) Source 
type Scalar (Linear s v w) = s Source 
type DualSpace (Linear s v w) = Linear s w v Source 
type Needle (Linear s a b) = Linear s a b Source 
type Interior (Linear s a b) = Linear s a b 

denseLinear :: forall v w s. (FiniteDimensional v, FiniteDimensional w, Scalar w ~ s) => (v -> w) -> Linear s v w Source