Fast Auxiliary Space Preconditioning  1.8.4 Feb/15/2016
sparse_coo.c File Reference

Sparse matrix operations for dCOOmat matrices. More...

#include <math.h>
#include <time.h>
#include "fasp.h"
#include "fasp_functs.h"

Go to the source code of this file.

Functions

dCOOmat fasp_dcoo_create (const INT m, const INT n, const INT nnz)
 Create IJ sparse matrix data memory space. More...
 
void fasp_dcoo_alloc (const INT m, const INT n, const INT nnz, dCOOmat *A)
 Allocate COO sparse matrix memory space. More...
 
void fasp_dcoo_free (dCOOmat *A)
 Free IJ sparse matrix data memory space. More...
 
void fasp_dcoo_shift (dCOOmat *A, const INT offset)
 Re-index a REAL matrix in IJ format to make the index starting from 0 or 1. More...
 

Detailed Description

Sparse matrix operations for dCOOmat matrices.

Definition in file sparse_coo.c.

Function Documentation

void fasp_dcoo_alloc ( const INT  m,
const INT  n,
const INT  nnz,
dCOOmat A 
)

Allocate COO sparse matrix memory space.

Parameters
mNumber of rows
nNumber of columns
nnzNumber of nonzeros
APointer to the dCSRmat matrix
Author
Xiaozhe Hu
Date
03/25/2013

Definition at line 62 of file sparse_coo.c.

dCOOmat fasp_dcoo_create ( const INT  m,
const INT  n,
const INT  nnz 
)

Create IJ sparse matrix data memory space.

Parameters
mNumber of rows
nNumber of columns
nnzNumber of nonzeros
Returns
A The new dCOOmat matrix
Author
Chensong Zhang
Date
2010/04/06

Definition at line 34 of file sparse_coo.c.

void fasp_dcoo_free ( dCOOmat A)

Free IJ sparse matrix data memory space.

Parameters
APointer to the dCOOmat matrix
Author
Chensong Zhang
Date
2010/04/03

Definition at line 94 of file sparse_coo.c.

void fasp_dcoo_shift ( dCOOmat A,
const INT  offset 
)

Re-index a REAL matrix in IJ format to make the index starting from 0 or 1.

Parameters
APointer to IJ matrix
offsetSize of offset (1 or -1)
Author
Chensong Zhang
Date
2010/04/06

Modified by Chunsheng Feng, Zheng Li on 08/25/2012

Definition at line 116 of file sparse_coo.c.