cs_load.c
Go to the documentation of this file.
1 #include "cs.h"
2 /* load a triplet matrix from a file */
3 cs *cs_load (FILE *f)
4 {
5  int i, j ;
6  double x ;
7  cs *T ;
8  if (!f) return (NULL) ; /* check inputs */
9  T = cs_spalloc (0, 0, 1, 1, 1) ; /* allocate result */
10  while (fscanf (f, "%d %d %lg\n", &i, &j, &x) == 3)
11  {
12  if (!cs_entry (T, i, j, x)) return (cs_spfree (T)) ;
13  }
14  return (T) ;
15 }
USING_NAMESPACE_ACADO typedef TaylorVariable< Interval > T
cs * cs_spfree(cs *A)
Definition: cs_util.c:32
cs * cs_spalloc(int m, int n, int nzmax, int values, int triplet)
Definition: cs_util.c:3
int cs_entry(cs *T, int i, int j, double x)
Definition: cs_entry.c:3
Definition: cs.h:16
cs * cs_load(FILE *f)
Definition: cs_load.c:3


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:34:31