numeric-prelude-0.4.3.1: An experimental alternative hierarchy of numeric type classes

Copyright (c) Henning Thielemann 2004-2005 numericprelude@henning-thielemann.de provisional portable Safe Haskell98

Algebra.Vector

Description

Abstraction of vectors

Synopsis

# Documentation

class C v where Source #

A Module over a ring satisfies:

  a *> (b + c) === a *> b + a *> c
(a * b) *> c === a *> (b *> c)
(a + b) *> c === a *> c + b *> c

Minimal complete definition

Methods

zero :: C a => v a Source #

zero element of the vector space

(<+>) :: C a => v a -> v a -> v a infixl 6 Source #

add and subtract elements

(*>) :: C a => a -> v a -> v a infixr 7 Source #

scale a vector by a scalar

Instances
 C [] Source # Instance detailsDefined in Algebra.Vector Methodszero :: C a => [a] Source #(<+>) :: C a => [a] -> [a] -> [a] Source #(*>) :: C a => a -> [a] -> [a] Source # Source # Instance detailsDefined in MathObj.PowerSeries Methodszero :: C a => T a Source #(<+>) :: C a => T a -> T a -> T a Source #(*>) :: C a => a -> T a -> T a Source # Source # Instance detailsDefined in MathObj.PowerSeries2 Methodszero :: C a => T a Source #(<+>) :: C a => T a -> T a -> T a Source #(*>) :: C a => a -> T a -> T a Source # Source # Instance detailsDefined in MathObj.Polynomial Methodszero :: C a => T a Source #(<+>) :: C a => T a -> T a -> T a Source #(*>) :: C a => a -> T a -> T a Source # Source # Instance detailsDefined in MathObj.Matrix Methodszero :: C a => T a Source #(<+>) :: C a => T a -> T a -> T a Source #(*>) :: C a => a -> T a -> T a Source # Source # Instance detailsDefined in Number.Complex Methodszero :: C a => T a Source #(<+>) :: C a => T a -> T a -> T a Source #(*>) :: C a => a -> T a -> T a Source # Source # Instance detailsDefined in Number.Quaternion Methodszero :: C a => T a Source #(<+>) :: C a => T a -> T a -> T a Source #(*>) :: C a => a -> T a -> T a Source # Source # Instance detailsDefined in MathObj.LaurentPolynomial Methodszero :: C a => T a Source #(<+>) :: C a => T a -> T a -> T a Source #(*>) :: C a => a -> T a -> T a Source # Ord i => C (Map i) Source # Instance detailsDefined in MathObj.DiscreteMap Methodszero :: C a => Map i a Source #(<+>) :: C a => Map i a -> Map i a -> Map i a Source #(*>) :: C a => a -> Map i a -> Map i a Source # Ord a => C (T a) Source # Instance detailsDefined in MathObj.Algebra Methodszero :: C a0 => T a a0 Source #(<+>) :: C a0 => T a a0 -> T a a0 -> T a a0 Source #(*>) :: C a0 => a0 -> T a a0 -> T a a0 Source # Ord i => C (T i) Source # Instance detailsDefined in Number.Physical Methodszero :: C a => T i a Source #(<+>) :: C a => T i a -> T i a -> T i a Source #(*>) :: C a => a -> T i a -> T i a Source # C (T a) Source # Instance detailsDefined in Number.SI Methodszero :: C a0 => T a a0 Source #(<+>) :: C a0 => T a a0 -> T a a0 -> T a a0 Source #(*>) :: C a0 => a0 -> T a a0 -> T a a0 Source # C ((->) b :: * -> *) Source # Instance detailsDefined in Algebra.Vector Methodszero :: C a => b -> a Source #(<+>) :: C a => (b -> a) -> (b -> a) -> b -> a Source #(*>) :: C a => a -> (b -> a) -> b -> a Source #

class Eq v where Source #

We need a Haskell 98 type class which provides equality test for Vector type constructors.

Minimal complete definition

eq

Methods

eq :: Eq a => v a -> v a -> Bool infix 4 Source #

Instances
 Eq [] Source # Instance detailsDefined in Algebra.Vector Methodseq :: Eq a => [a] -> [a] -> Bool Source #

# Instances for standard type constructors

functorScale :: (Functor v, C a) => a -> v a -> v a Source #

# Related functions

linearComb :: (C a, C v) => [a] -> [v a] -> v a Source #

Compute the linear combination of a list of vectors.

# Properties

propCascade :: (C v, Eq v, C a, Eq a) => a -> a -> v a -> Bool Source #

propRightDistributive :: (C v, Eq v, C a, Eq a) => a -> v a -> v a -> Bool Source #

propLeftDistributive :: (C v, Eq v, C a, Eq a) => a -> a -> v a -> Bool Source #