scijs/ndarray-gram-schmidt-qr-complex

Name: ndarray-gram-schmidt-qr-complex

Owner: scijs

Description: Modified Gram-Schmidt Algorithm for QR Factorization of complex matrices

Created: 2015-05-03 14:36:02.0

Updated: 2017-04-16 02:43:46.0

Pushed: 2015-05-16 06:24:46.0

Homepage: null

Size: 136

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

ndarray-gram-schmidt-qr-complex

Build Status npm version

A module for calculating the in-place QR decomposition of a complex matrix

Introduction

The algorithm is the numerically stable variant of the Gram-Schmidt QR decomposition as found on p. 58 of Trefethen and Bau's Numerical Linear Algebra. In pseudocode, the algorithm is:

i = 1 to n
i = a_i

i = 1 to n
ii = ||v_i||
i = v_i / r_ii

r j = i+1 to n
r_ij = q_i' * v_j
v_j = v_j - r_ij * q_i

For real numbers, see ndarray-gram-schmidt-qr.

Usage

The algorithm currently only calculates the in-place QR decomposition and returns true on successful completion.

qr = require('ndarray-gram-schmidt-qr-complex'),
pool = require('ndarray-scratch');

A_r = ndarray( new Float64Array([1,2,7,4,5,1,7,4,9]), [3,3] ),
A_i = ndarray( new Float64Array([9,3,2,4,4,0,4,1,1]), [3,3] ),
R_r = pool.zeros( A_r.shape, A_r.dtype );
R_i = pool.zeros( A_r.shape, A_r.dtype );

A_r, A_i, R_r, R_i );

Then the product A * R is approximately equal to the original matrix.

Credits

(c) 2015 Ricky Reusser. MIT License


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.