umfpack_report_matrix.h 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. /* ========================================================================== */
  2. /* === umfpack_report_matrix ================================================ */
  3. /* ========================================================================== */
  4. /* -------------------------------------------------------------------------- */
  5. /* UMFPACK Copyright (c) Timothy A. Davis, CISE, */
  6. /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */
  7. /* web: http://www.cise.ufl.edu/research/sparse/umfpack */
  8. /* -------------------------------------------------------------------------- */
  9. int umfpack_di_report_matrix
  10. (
  11. int n_row,
  12. int n_col,
  13. const int Ap [ ],
  14. const int Ai [ ],
  15. const double Ax [ ],
  16. int col_form,
  17. const double Control [UMFPACK_CONTROL]
  18. ) ;
  19. UF_long umfpack_dl_report_matrix
  20. (
  21. UF_long n_row,
  22. UF_long n_col,
  23. const UF_long Ap [ ],
  24. const UF_long Ai [ ],
  25. const double Ax [ ],
  26. UF_long col_form,
  27. const double Control [UMFPACK_CONTROL]
  28. ) ;
  29. int umfpack_zi_report_matrix
  30. (
  31. int n_row,
  32. int n_col,
  33. const int Ap [ ],
  34. const int Ai [ ],
  35. const double Ax [ ], const double Az [ ],
  36. int col_form,
  37. const double Control [UMFPACK_CONTROL]
  38. ) ;
  39. UF_long umfpack_zl_report_matrix
  40. (
  41. UF_long n_row,
  42. UF_long n_col,
  43. const UF_long Ap [ ],
  44. const UF_long Ai [ ],
  45. const double Ax [ ], const double Az [ ],
  46. UF_long col_form,
  47. const double Control [UMFPACK_CONTROL]
  48. ) ;
  49. /*
  50. double int Syntax:
  51. #include "umfpack.h"
  52. int n_row, n_col, *Ap, *Ai, status ;
  53. double *Ax, Control [UMFPACK_CONTROL] ;
  54. status = umfpack_di_report_matrix (n_row, n_col, Ap, Ai, Ax, 1, Control) ;
  55. or:
  56. status = umfpack_di_report_matrix (n_row, n_col, Ap, Ai, Ax, 0, Control) ;
  57. double UF_long Syntax:
  58. #include "umfpack.h"
  59. UF_long n_row, n_col, *Ap, *Ai, status ;
  60. double *Ax, Control [UMFPACK_CONTROL] ;
  61. status = umfpack_dl_report_matrix (n_row, n_col, Ap, Ai, Ax, 1, Control) ;
  62. or:
  63. status = umfpack_dl_report_matrix (n_row, n_col, Ap, Ai, Ax, 0, Control) ;
  64. complex int Syntax:
  65. #include "umfpack.h"
  66. int n_row, n_col, *Ap, *Ai, status ;
  67. double *Ax, *Az, Control [UMFPACK_CONTROL] ;
  68. status = umfpack_zi_report_matrix (n_row, n_col, Ap, Ai, Ax, Az, 1,
  69. Control) ;
  70. or:
  71. status = umfpack_zi_report_matrix (n_row, n_col, Ap, Ai, Ax, Az, 0,
  72. Control) ;
  73. complex UF_long Syntax:
  74. #include "umfpack.h"
  75. UF_long n_row, n_col, *Ap, *Ai, status ;
  76. double *Ax, Control [UMFPACK_CONTROL] ;
  77. status = umfpack_zl_report_matrix (n_row, n_col, Ap, Ai, Ax, Az, 1,
  78. Control) ;
  79. or:
  80. status = umfpack_zl_report_matrix (n_row, n_col, Ap, Ai, Ax, Az, 0,
  81. Control) ;
  82. packed complex Syntax:
  83. Same as above, except Az is NULL.
  84. Purpose:
  85. Verifies and prints a row or column-oriented sparse matrix.
  86. Returns:
  87. UMFPACK_OK if Control [UMFPACK_PRL] <= 2 (the input is not checked).
  88. Otherwise (where n is n_col for the column form and n_row for row
  89. and let ni be n_row for the column form and n_col for row):
  90. UMFPACK_OK if the matrix is valid.
  91. UMFPACK_ERROR_n_nonpositive if n_row <= 0 or n_col <= 0.
  92. UMFPACK_ERROR_argument_missing if Ap and/or Ai are missing.
  93. UMFPACK_ERROR_invalid_matrix if Ap [n] < 0, if Ap [0] is not zero,
  94. if Ap [j+1] < Ap [j] for any j in the range 0 to n-1,
  95. if any row index in Ai is not in the range 0 to ni-1, or
  96. if the row indices in any column are not in
  97. ascending order, or contain duplicates.
  98. UMFPACK_ERROR_out_of_memory if out of memory.
  99. Arguments:
  100. Int n_row ; Input argument, not modified.
  101. Int n_col ; Input argument, not modified.
  102. A is an n_row-by-n_row matrix. Restriction: n_row > 0 and n_col > 0.
  103. Int Ap [n+1] ; Input argument, not modified.
  104. n is n_row for a row-form matrix, and n_col for a column-form matrix.
  105. Ap is an integer array of size n+1. If col_form is true (nonzero),
  106. then on input, it holds the "pointers" for the column form of the
  107. sparse matrix A. The row indices of column j of the matrix A are held
  108. in Ai [(Ap [j]) ... (Ap [j+1]-1)]. Otherwise, Ap holds the
  109. row pointers, and the column indices of row j of the matrix are held
  110. in Ai [(Ap [j]) ... (Ap [j+1]-1)].
  111. The first entry, Ap [0], must be zero, and Ap [j] <= Ap [j+1] must hold
  112. for all j in the range 0 to n-1. The value nz = Ap [n] is thus the
  113. total number of entries in the pattern of the matrix A.
  114. Int Ai [nz] ; Input argument, not modified, of size nz = Ap [n].
  115. If col_form is true (nonzero), then the nonzero pattern (row indices)
  116. for column j is stored in Ai [(Ap [j]) ... (Ap [j+1]-1)]. Row indices
  117. must be in the range 0 to n_row-1 (the matrix is 0-based).
  118. Otherwise, the nonzero pattern (column indices) for row j is stored in
  119. Ai [(Ap [j]) ... (Ap [j+1]-1)]. Column indices must be in the range 0
  120. to n_col-1 (the matrix is 0-based).
  121. double Ax [nz] ; Input argument, not modified, of size nz = Ap [n].
  122. Size 2*nz for packed complex case.
  123. The numerical values of the sparse matrix A.
  124. If col_form is true (nonzero), then the nonzero pattern (row indices)
  125. for column j is stored in Ai [(Ap [j]) ... (Ap [j+1]-1)], and the
  126. corresponding (real) numerical values are stored in
  127. Ax [(Ap [j]) ... (Ap [j+1]-1)]. The imaginary parts are stored in
  128. Az [(Ap [j]) ... (Ap [j+1]-1)], for the complex versions
  129. (see below if Az is NULL).
  130. Otherwise, the nonzero pattern (column indices) for row j
  131. is stored in Ai [(Ap [j]) ... (Ap [j+1]-1)], and the corresponding
  132. (real) numerical values are stored in Ax [(Ap [j]) ... (Ap [j+1]-1)].
  133. The imaginary parts are stored in Az [(Ap [j]) ... (Ap [j+1]-1)],
  134. for the complex versions (see below if Az is NULL).
  135. No numerical values are printed if Ax is NULL.
  136. double Az [nz] ; Input argument, not modified, for complex versions.
  137. The imaginary values of the sparse matrix A. See the description
  138. of Ax, above.
  139. If Az is NULL, then both real
  140. and imaginary parts are contained in Ax[0..2*nz-1], with Ax[2*k]
  141. and Ax[2*k+1] being the real and imaginary part of the kth entry.
  142. Int col_form ; Input argument, not modified.
  143. The matrix is in row-oriented form if form is col_form is false (0).
  144. Otherwise, the matrix is in column-oriented form.
  145. double Control [UMFPACK_CONTROL] ; Input argument, not modified.
  146. If a (double *) NULL pointer is passed, then the default control
  147. settings are used. Otherwise, the settings are determined from the
  148. Control array. See umfpack_*_defaults on how to fill the Control
  149. array with the default settings. If Control contains NaN's, the
  150. defaults are used. The following Control parameters are used:
  151. Control [UMFPACK_PRL]: printing level.
  152. 2 or less: no output. returns silently without checking anything.
  153. 3: fully check input, and print a short summary of its status
  154. 4: as 3, but print first few entries of the input
  155. 5: as 3, but print all of the input
  156. Default: 1
  157. */