Learn R Programming

edmcr (version 0.2.0)

colamdR: Column Approximate Minimum Degree Permutation

Description

colamdR returns the column approximate minimum degree permutation of a sparse matrix S. The permutation of S, S[,p], will result in LU factors sparser than S.

Usage

colamdR(M)

Arguments

M

A matrix to be permuted.

Value

A vector containing the column minimum degree permutation of the matrix M.

Details

This is an implementation of the colamd function available in SuiteSparse, and also implemented in Matlab.

References

The authors of the code for "colamd" are Stefan I. Larimore and Timothy A. Davis (davis@cise.ufl.edu), University of Florida.

Examples

Run this code
# NOT RUN {
M <- matrix(c(1,1,0,0,1,0,0,1,0,1,1,1,1,1,0,0,1,0,1,0), ncol=4)
p <- colamdR(M)
M[,p]

# }

Run the code above in your browser using DataLab