| Stability | experimental |
|---|---|
| Maintainer | Scott N. Walck <walck@lvc.edu> |
| Safe Haskell | Trustworthy |
Physics.Learn.StateSpace
Description
A StateSpace is an affine space where the associated vector space
has scalars that are instances of Fractional.
If p is an instance of StateSpace, then the associated vectorspace
Diff p is intended to represent the space of time derivatives
of paths in p.
StateSpace is very similar to Conal Elliott's AffineSpace.
- class (VectorSpace (Diff p), Fractional (Scalar (Diff p))) => StateSpace p where
- (.-^) :: StateSpace p => p -> Diff p -> p
- type Time p = Scalar (Diff p)
Documentation
class (VectorSpace (Diff p), Fractional (Scalar (Diff p))) => StateSpace p whereSource
A StateSpace has an associated vector space, the vectors of which
can be multiplied or divided by scalars.
An example would be the set of positions of a particle.
Position is not a vector, but displacement (difference in position) is a vector.
Methods
(.-.) :: p -> p -> Diff pSource
Subtract points
(.+^) :: p -> Diff p -> pSource
Point plus vector
Instances
| StateSpace Double | |
| StateSpace Vec | |
| StateSpace Position | |
| (StateSpace p, StateSpace q, ~ * (Time p) (Time q)) => StateSpace (p, q) | |
| (StateSpace p, StateSpace q, StateSpace r, ~ * (Time p) (Time q), ~ * (Time q) (Time r)) => StateSpace (p, q, r) |
(.-^) :: StateSpace p => p -> Diff p -> pSource
Point minus vector