Handling the general case for an empty CSC matrix during the conversion to CSR format

This commit is contained in:
Francesco Lannutti 2016-07-03 01:36:26 +02:00 committed by rlar
parent d8ea559c92
commit 8a22b6a096
1 changed files with 5 additions and 2 deletions

View File

@ -88,8 +88,11 @@ KLU_convert_matrix_in_CSR /* return TRUE if successful, FALSE otherwise
{
if (Ai_CSC == NULL || Ax_CSC == NULL)
{
Ap_CSR [0] = 0 ;
Ap_CSR [1] = 0 ;
/* CSC Matrix is empty, so the CSR one */
for (i = 0 ; i <= n ; i++)
{
Ap_CSR [i] = 0 ;
}
Common->status = KLU_OK ;
return (TRUE) ;
}