1function C = cs_symperm (A,p)                                               %#ok
2%CS_SYMPERM symmetric permutation of a symmetric matrix.
3%   C = cs_symperm(A,p) computes C = A(p,p), but accesses only the
4%   upper triangular part of A, and returns C upper triangular (A and C are
5%   symmetric with just their upper triangular parts stored).  A must be square.
6%
7%   Example:
8%       Prob = ssget ('HB/bcsstk01') ; A = Prob.A ;
9%       p = cs_amd (A) ;
10%       C = cs_symperm (A, p) ;
11%       cspy (A (p,p)) ;
12%       cspy (C) ;
13%       C - triu (A (p,p))
14%
15%   See also CS_PERMUTE, SUBSREF, TRIU.
16
17% Copyright 2006-2012, Timothy A. Davis, http://www.suitesparse.com
18
19error ('cs_symperm mexFunction not found') ;
20