00001
00002
00003 #ifndef _CSR_H
00004 #define _CSR_H
00005
00006 #include <stdio.h>
00007
00008 typedef struct _adjnode {
00009 struct _adjnode *next;
00010 int id;
00011 } AdjNode;
00012
00013 typedef struct _csrnode {
00014 struct _adjnode *adj_head;
00015 } CsrNode;
00016
00017 void BuildNodeList( CsrNode *node_list );
00018 void mshAddAdjNode( CsrNode *node, int adj_id );
00019 void BuildIaVector(CsrNode *node_list, int , int *, int * );
00020 void BuildJaVector(CsrNode *node_list, int *ja );
00021 int BuildaVector(int i, int j, double coef, int *ia, int *ja, double *avector );
00022 void BuildIaJaVectors(int *ia, int *ja, int nnu, int *nna);
00023 void FreeNodeList( CsrNode *node_list );
00024 void BuildIaVec(CsrNode *, int *, int , int * );
00025 void BuildJaVec(CsrNode *, int * );
00026 #endif