hieraclus-0.1.2.1: Automated clustering of arbitrary elements in Haskell.

Portabilityportable
Stabilityexperimental
Maintainerlibraries@haskell.org

Numeric.Statistics.Clustering.VectorUtils

Contents

Description

A library providing basic vector operations for the clustering module

Synopsis

Datatypes

type Vector a = [a]Source

a vector is represented as an ordinary list

Vector Creation

singleton :: a -> Vector aSource

maps an element into a one element vector

emptyVector :: [a]Source

creates an empty vector

fromList :: [a] -> [Vector a]Source

converts every element of a given list into a one element vector

Vector Operations

addV :: Num a => [a] -> [a] -> [a]Source

adds two given vectors

subV :: Num a => [a] -> [a] -> [a]Source

subtracts two given vectors

mulV :: Num a => [a] -> [a] -> [a]Source

calculates the vector product of two given vectors

divV :: Fractional a => [a] -> [a] -> [a]Source

divides two given vectors

sumV :: Num a => [[a]] -> [a]Source

calculates the sum of a given list of vectors

Vector Metrics

qeuklideanDistance :: Floating a => [a] -> [a] -> aSource

norm :: Floating a => Vector a -> aSource

Mathematical Helper Functions

average :: Floating a => [a] -> aSource

devsq :: Floating a => [a] -> aSource