cs_load.c
Go to the documentation of this file.
00001 #include "cs.h"
00002 /* load a triplet matrix from a file */
00003 cs *cs_load (FILE *f)
00004 {
00005     int i, j ;
00006     double x ;
00007     cs *T ;
00008     if (!f) return (NULL) ;                             /* check inputs */
00009     T = cs_spalloc (0, 0, 1, 1, 1) ;                    /* allocate result */
00010     while (fscanf (f, "%d %d %lg\n", &i, &j, &x) == 3)
00011     {
00012         if (!cs_entry (T, i, j, x)) return (cs_spfree (T)) ;
00013     }
00014     return (T) ;
00015 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


hogman_minimal
Author(s): Maintained by Juergen Sturm
autogenerated on Wed Dec 26 2012 15:36:47