Changeset 5091

Show
Ignore:
Timestamp:
07/16/09 06:29:39 (4 years ago)
Author:
ignotus
Message:

Added matrix_isnull() function.

Location:
branch/clann/code
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branch/clann/code/matrix.c

    r5089 r5091  
    237237    return b; 
    238238} 
     239 
     240int 
     241matrix_isnull(const struct matrix *a) 
     242{ 
     243    unsigned int i; 
     244    for (i = 0; i < a->rows * a->cols; i++) 
     245        if (a->values[i] != (clann_type) 0) 
     246            return 1; 
     247 
     248    return 0; 
     249} 
  • branch/clann/code/matrix.h

    r5089 r5091  
    127127                      struct matrix *b); 
    128128 
     129/** 
     130 * 
     131 */ 
     132inline int 
     133matrix_isnull(const struct matrix *a); 
     134 
    129135#endif