1
/* ========================================================================== */
2
/* === UMF_report_perm ====================================================== */
3
/* ========================================================================== */
5
/* -------------------------------------------------------------------------- */
6
/* UMFPACK Version 4.1 (Apr. 30, 2003), Copyright (c) 2003 by Timothy A. */
7
/* Davis. All Rights Reserved. See ../README for License. */
8
/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */
9
/* web: http://www.cise.ufl.edu/research/sparse/umfpack */
10
/* -------------------------------------------------------------------------- */
12
#include "umf_internal.h"
14
#define PRINTF4U(params) { if (user || prl >= 4) PRINTF (params) ; }
16
GLOBAL Int UMF_report_perm
20
Int W [ ], /* workspace of size n */
25
Int i, k, valid, prl1 ;
29
PRINTF4U (("permutation vector, n = "ID". ", n)) ;
33
PRINTF (("ERROR: length of permutation is <= 0\n\n")) ;
34
return (UMFPACK_ERROR_n_nonpositive) ;
39
/* if P is (Int *) NULL, this is the identity permutation */
40
PRINTF (("(not present)\n\n")) ;
46
PRINTF (("ERROR: out of memory\n\n")) ;
47
return (UMFPACK_ERROR_out_of_memory) ;
52
for (i = 0 ; i < n ; i++)
58
for (k = 0 ; k < n ; k++)
61
PRINTF4 ((" "ID" : "ID" ", INDEX (k), INDEX (i))) ;
62
valid = (i >= 0 && i < n) ;
70
/* out of range or duplicate entry */
71
PRINTF (("ERROR: invalid\n\n")) ;
72
return (UMFPACK_ERROR_invalid_permutation) ;
75
if (prl == 4 && k == 9 && n > 10)
83
PRINTF4 ((" permutation vector ")) ;
84
PRINTF4U (("OK\n\n")) ;