COLAMDStats

class sksparse.colamd.COLAMDStats(N_rows_ignored: int, N_cols_ignored: int, Ncmpa: int, status: int, info1: int, info2: int, info3: int)[source]

Information statistics returned by the COLAMD algorithm.

This class wraps the contents of the stats array returned by C colamd() into a Python dataclass.

N_rows_ignored[source]

The number of dense or empty rows ignored in the ordering.

Type:

int

N_cols_ignored[source]

The number of dense or empty columns ignored in the ordering.

Type:

int

Ncmpa[source]

The number of garbage collections performed.

Type:

int

status[source]

Status code indicating the result of the COLAMD operation. If non-zero, colamd will throw an appropriate exception that interprets this status code.

Type:

int

The following fields take on different meanings depending on the value of
``status``
info1[source]

Value of status:

  • 0: the highest numbered column that is unsorted or has duplicate entries.

  • -3: the value of n_row.

  • -4: the value of n_col.

  • -5: the value of nnz == p[n_col].

  • -6: the value of p[0].

  • -7: the required Alen value.

  • -8: the column with negative entries.

  • -9: the column with a row index out of bounds.

Type:

int

info2[source]

Value of status:

  • 0: the last seen duplicate or unsorted row index.

  • -7: the actual Alen value.

  • -9: the bad row index.

Type:

int

info3[source]

Value of status:

  • 0: the number of duplicates or unsorted row indices.

  • -9: n_row.

Type:

int

Notes

Field descriptions are adapted from SuiteSparse colamd.c [1].

Added in version 0.5.0.

References

Methods

__init__

from_array

Create a COLAMDStats instance from an array.