Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- class KnownNat (Dimension x) => Manifold x where
- dimension :: Manifold x => Proxy x -> Int
- data Replicated (k :: Nat) m
- type R k x = Replicated k x
- newtype Point c x = Point {
- coordinates :: Vector (Dimension x) Double
- type (#) c x = Point c x
- breakPoint :: Dimension x ~ Dimension y => (c # x) -> Point d y
- listCoordinates :: (c # x) -> [Double]
- boxCoordinates :: (c # x) -> Vector (Dimension x) Double
- singleton :: Dimension x ~ 1 => Double -> c # x
- fromTuple :: (IndexedListLiterals ds (Dimension x) Double, KnownNat (Dimension x)) => ds -> c # x
- fromBoxed :: Vector (Dimension x) Double -> c # x
- class (Manifold (First z), Manifold (Second z), Manifold z, Dimension z ~ (Dimension (First z) + Dimension (Second z))) => Product z where
- splitReplicated :: (KnownNat k, Manifold x) => (c # Replicated k x) -> Vector k (c # x)
- joinReplicated :: (KnownNat k, Manifold x) => Vector k (c # x) -> c # Replicated k x
- joinBoxedReplicated :: (KnownNat k, Manifold x) => Vector k (c # x) -> c # Replicated k x
- mapReplicated :: (Storable a, KnownNat k, Manifold x) => ((c # x) -> a) -> (c # Replicated k x) -> Vector k a
- mapReplicatedPoint :: (KnownNat k, Manifold x, Manifold y) => ((c # x) -> Point d y) -> (c # Replicated k x) -> Point d (Replicated k y)
- splitReplicatedProduct :: (KnownNat k, Product x) => (c # Replicated k x) -> (c # Replicated k (First x), c # Replicated k (Second x))
- joinReplicatedProduct :: (KnownNat k, Product x) => (c # Replicated k (First x)) -> (c # Replicated k (Second x)) -> c # Replicated k x
- data Euclidean (n :: Nat)
- data Cartesian
- data Polar
- class Transition c d x where
- transition :: (c # x) -> d # x
- transition2 :: (Transition cx dx x, Transition cy dy y) => ((dx # x) -> (dy # y) -> a) -> (cx # x) -> (cy # y) -> a
Manifolds
class KnownNat (Dimension x) => Manifold x Source #
A geometric object with a certain Dimension
.
Instances
Combinators
data Replicated (k :: Nat) m Source #
A Sum type for repetitions of the same Manifold
.
Instances
(KnownNat k, Manifold x, Transition c d x) => Transition c d (Replicated k x) Source # | |
Defined in Goal.Geometry.Manifold transition :: (c # Replicated k x) -> d # Replicated k x Source # | |
(KnownNat k, Manifold x) => Manifold (Replicated k x) Source # | |
Defined in Goal.Geometry.Manifold type Dimension (Replicated k x) :: Nat Source # | |
(DuallyFlat x, KnownNat k) => DuallyFlat (Replicated k x) Source # | |
Defined in Goal.Geometry.Differential dualPotential :: (PotentialCoordinates (Replicated k x) #* Replicated k x) -> Double Source # | |
(Legendre x, KnownNat k) => Legendre (Replicated k x) Source # | |
Defined in Goal.Geometry.Differential potential :: (PotentialCoordinates (Replicated k x) # Replicated k x) -> Double Source # | |
type Dimension (Replicated k x) Source # | |
Defined in Goal.Geometry.Manifold | |
type PotentialCoordinates (Replicated k x) Source # | |
Defined in Goal.Geometry.Differential |
type R k x = Replicated k x Source #
An abbreviation for Replicated
.
Points
A Point
on a Manifold
. The phantom type m
represents the Manifold
, and the phantom type
c
represents the coordinate system, or chart, in which the Point
is represented.
Point | |
|
Instances
breakPoint :: Dimension x ~ Dimension y => (c # x) -> Point d y Source #
Throws away the type-level information about the chart and manifold of the
given Point
.
listCoordinates :: (c # x) -> [Double] Source #
Returns the coordinates of the point in list form.
boxCoordinates :: (c # x) -> Vector (Dimension x) Double Source #
Returns the coordinates of the point as a boxed vector.
Constructors
fromTuple :: (IndexedListLiterals ds (Dimension x) Double, KnownNat (Dimension x)) => ds -> c # x Source #
Constructs a Point
from a tuple.
fromBoxed :: Vector (Dimension x) Double -> c # x Source #
Constructs a point with coordinates given by a boxed vector.
class (Manifold (First z), Manifold (Second z), Manifold z, Dimension z ~ (Dimension (First z) + Dimension (Second z))) => Product z where Source #
A Product
Manifold
is one that is produced out of the
sumproductconcatenation of two source Manifold
s.
Instances
(Manifold x, Manifold y) => Product (x, y) Source # | |
(Manifold z, Manifold (f y x)) => Product (Affine f y z x) Source # | |
Defined in Goal.Geometry.Map.Linear | |
(Manifold (Affine f z z y), Manifold (NeuralNetwork gys g y x)) => Product (NeuralNetwork ('(g, y) ': gys) f z x) Source # | |
Defined in Goal.Geometry.Map.NeuralNetwork type First (NeuralNetwork ('(g, y) ': gys) f z x) Source # type Second (NeuralNetwork ('(g, y) ': gys) f z x) Source # join :: (c # First (NeuralNetwork ('(g, y) ': gys) f z x)) -> (c # Second (NeuralNetwork ('(g, y) ': gys) f z x)) -> c # NeuralNetwork ('(g, y) ': gys) f z x Source # split :: (c # NeuralNetwork ('(g, y) ': gys) f z x) -> (c # First (NeuralNetwork ('(g, y) ': gys) f z x), c # Second (NeuralNetwork ('(g, y) ': gys) f z x)) Source # |
Reshaping Points
splitReplicated :: (KnownNat k, Manifold x) => (c # Replicated k x) -> Vector k (c # x) Source #
Splits a Point
on a Replicated
Manifold
into a Vector of of Point
s.
joinReplicated :: (KnownNat k, Manifold x) => Vector k (c # x) -> c # Replicated k x Source #
Joins a Vector of of Point
s into a Point
on a Replicated
Manifold
.
joinBoxedReplicated :: (KnownNat k, Manifold x) => Vector k (c # x) -> c # Replicated k x Source #
Joins a Vector of of Point
s into a Point
on a Replicated
Manifold
.
mapReplicated :: (Storable a, KnownNat k, Manifold x) => ((c # x) -> a) -> (c # Replicated k x) -> Vector k a Source #
A combination of splitReplicated
and fmap
.
mapReplicatedPoint :: (KnownNat k, Manifold x, Manifold y) => ((c # x) -> Point d y) -> (c # Replicated k x) -> Point d (Replicated k y) Source #
A combination of splitReplicated
and fmap
, where the value of the mapped function is also a point.
splitReplicatedProduct :: (KnownNat k, Product x) => (c # Replicated k x) -> (c # Replicated k (First x), c # Replicated k (Second x)) Source #
Splits a Replicated
Product
Manifold
into a pair of Replicated
Manifold
s.
joinReplicatedProduct :: (KnownNat k, Product x) => (c # Replicated k (First x)) -> (c # Replicated k (Second x)) -> c # Replicated k x Source #
joins a Replicated
Product
Manifold
out of a pair of Replicated
Manifold
s.
Euclidean Manifolds
data Euclidean (n :: Nat) Source #
n
-dimensional Euclidean space.
Instances
Transition Polar Cartesian (Euclidean 2) Source # | |
Defined in Goal.Geometry.Manifold | |
Transition Cartesian Polar (Euclidean 2) Source # | |
Defined in Goal.Geometry.Manifold | |
KnownNat k => Riemannian Cartesian (Euclidean k) Source # | |
Defined in Goal.Geometry.Differential | |
KnownNat k => Manifold (Euclidean k) Source # | |
type Dimension (Euclidean k) Source # | |
Defined in Goal.Geometry.Manifold |
Charts
Instances
Primal Cartesian Source # | |
Defined in Goal.Geometry.Vector | |
Transition Polar Cartesian (Euclidean 2) Source # | |
Defined in Goal.Geometry.Manifold | |
Transition Cartesian Polar (Euclidean 2) Source # | |
Defined in Goal.Geometry.Manifold | |
KnownNat k => Riemannian Cartesian (Euclidean k) Source # | |
Defined in Goal.Geometry.Differential | |
type Dual Cartesian Source # | |
Defined in Goal.Geometry.Vector |
Instances
Transition Polar Cartesian (Euclidean 2) Source # | |
Defined in Goal.Geometry.Manifold | |
Transition Cartesian Polar (Euclidean 2) Source # | |
Defined in Goal.Geometry.Manifold |
Transition
class Transition c d x where Source #
A transition
involves taking a point represented by the chart c,
and re-representing in terms of the chart d.
transition :: (c # x) -> d # x Source #
Instances
Transition Polar Cartesian (Euclidean 2) Source # | |
Defined in Goal.Geometry.Manifold | |
Transition Cartesian Polar (Euclidean 2) Source # | |
Defined in Goal.Geometry.Manifold | |
(KnownNat k, Manifold x, Transition c d x) => Transition c d (Replicated k x) Source # | |
Defined in Goal.Geometry.Manifold transition :: (c # Replicated k x) -> d # Replicated k x Source # | |
(Manifold x, Manifold y, Transition c d x, Transition c d y) => Transition c d (x, y) Source # | |
Defined in Goal.Geometry.Manifold transition :: (c # (x, y)) -> d # (x, y) Source # |
transition2 :: (Transition cx dx x, Transition cy dy y) => ((dx # x) -> (dy # y) -> a) -> (cx # x) -> (cy # y) -> a Source #
Generalizes a function of two points in given coordinate systems to a function on arbitrary coordinate systems.