tbeason / VectorizationTransformations.jl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VectorizationTransformations.jl

lifecycle build

codecov.io

This package provides common transformation operations related to matrix vectorization.

  • vech provides the half-vectorization
  • duplication_matrix and elimination_matrix allow transformation between vec(A) and vech(A)
  • commutation_matrix transforms vec(A) into vec(A')
  • symmetrizer_matrix transforms vec(A) into vec((A + A')/2)

The matrix transformations are returned as sparse arrays to improve performance.

Refer to the function docstrings for additional detail.

Usage

using VectorizationTransformations

n = 5
A = rand(n,n)
Asym = (A + A')/2

vech(Asym)

duplication_matrix(5)
elimination_matrix(5)
commutation_matrix(5)
symmetrizer_matrix(5)

? vech

? duplication_matrix

Reference

Wikipedia pages and the following paper:

The Elimination Matrix: Some Lemmas and Applications Jan R. Magnus and H. Neudecker SIAM Journal on Algebraic Discrete Methods 1980 1:4, 422-449

About

License:MIT License


Languages

Language:Julia 100.0%