clustering-0.2.0: High performance clustering algorithms

Safe HaskellNone
LanguageHaskell2010

AI.Clustering.Hierarchical.Types

Synopsis

Documentation

type DistFn a = a -> a -> Distance Source

type Size = Int Source

data Dendrogram a Source

Constructors

Leaf !a 
Branch !Size !Distance !(Dendrogram a) !(Dendrogram a) 

Instances

size :: Dendrogram a -> Int Source

O(1) Return the size of a dendrogram

data DistanceMat Source

Constructors

DistanceMat !Int !(Vector Double) 

Instances

idx :: Int -> Int -> Int -> Int Source

computeDists :: Vector v a => DistFn a -> v a -> DistanceMat Source

compute distance matrix

computeDists' :: Vector v a => DistFn a -> v a -> DistanceMat Source

compute distance matrix in parallel