HasGP-0.1: A Haskell library for inference using Gaussian processes

HasGP.Support.Linear

Description

HasGP Gaussian Process Library. This module contains assorted functions that support GP calculations and are specifically related to linear algebra.

Copyright (C) 2011 Sean Holden. sbh11@cl.cam.ac.uk.

Synopsis

# Documentation

Sum the elements in a vector.

Sum of elements in a vector, divided by an Int.

lengthV :: Normed a b => a b -> RealOf bSource

Length of a vector.

Generate a vector equal to the first column of a matrix.

Replace the element at a specified position in a vector. NOTE: hmatrix numbers from 0, which is odd. This numbers from 1. The result is returned by overwriting v. This is implemented via runSTVector because the increase in efficiency is HUGE.

Efficiently pre multiply by a diagonal matrix (passed as a vector)

Efficiently post multiply by a diagonal matrix (passed as a vector)

Compute x^T A x when A is diagonal. The second argument is the diagonal of A.

Compute the diagonal only of the product of two square matrices

Compute ABA where A is diagonal. The first argument is the diagonal of A.

Compute aBa where a is a vector and B is a matrix