|
|
|
|
|
| Description |
| The type class Point defines all operations on points. This type class is instanciated by the
different data types of points Point1, Point2, Point3, Point4 and PointN.
|
|
| Synopsis |
|
| class Functor p => Point p where | | | | toList :: (Point p, Num a) => p a -> [a] | | | xcoord :: (Num a, Point p) => p a -> a | | | ycoord :: (Num a, Point p) => p a -> a | | | zcoord :: (Num a, Point p) => p a -> a | | | lexic :: (Point p, Num a, Ord a) => OrderRel (p a) | | | lessIth :: (Point p, Ord a, Num a) => Int -> Rel (p a) | | | leqIth :: (Point p, Ord a, Num a) => Int -> Rel (p a) | | | equalIth :: (Point p, Ord a, Num a) => Int -> Rel (p a) | | | geqIth :: (Point p, Ord a, Num a) => Int -> Rel (p a) | | | greaterIth :: (Point p, Ord a, Num a) => Int -> Rel (p a) | | | compareIthBy :: (Num a, Point p) => OrderRel a -> Int -> OrderRel (p a) | | | compareIth :: (Ord a, Num a, Point p) => Int -> OrderRel (p a) | | | inIntervalIth :: (Point p, Num a, Ord a) => Int -> p a -> (p a, p a) -> Bool | | | inInterval :: (Point p, Num a, Ord a) => p a -> (p a, p a) -> Bool | | | norm :: (Point p, Floating a) => p a -> a | | | distance :: (Point p, Floating a) => p a -> p a -> a | | | sqrDistance :: (Point p, Num a) => p a -> p a -> a |
|
|
|
| The Point class
|
|
|
| This type class defines all operations on points.
| | | Methods | | | The origin.
| | | | The dimension.
| | | | The ith component, aka x-, y- and z-coordinates.
| | | | Equality.
| | | | Inequality.
| | | | Addition.
| | | | Subtraction.
| | | | Unary negation
| | | | Dot product
| | | | Scalar multiplication from the left
|
| | Instances | |
|
|
|
| Puts all coordinates into a list.
|
|
|
| The first coordinate, traditionally called x coordinate.
|
|
|
| The second coordinate, traditionally called y coordinate.
|
|
|
| The third coordinate, traditionally called z coordinate.
|
|
| Ordering relations on points.
|
|
|
| Lexicographic ordering
|
|
|
| Less-than relation for the ith dimension.
|
|
|
| Less-than-or-equal relation for the ith dimension.
|
|
|
| Equality relation for the ith dimension.
|
|
|
| Greater-than-or-equal relation for the ith dimension.
|
|
|
| Greater-than relation for the ith dimension.
|
|
|
| Lift a OrderRel to the ith coordinate of the points x and y.
|
|
|
| Compares the ith coordinate.
|
|
| Containedness in intervals
|
|
|
| Test containedness in an (closed) interval in one dimension.
|
|
|
| Test containedness in an (closed) interval in all dimensions.
|
|
| Norm, length and distance
|
|
|
| The norm
|
|
|
| The distance between p and q.
|
|
|
| The square of the distance.
|
|
| Produced by Haddock version 2.4.2 |