GenSVM
Public Attributes | List of all members
GenSparse Struct Reference

A structure to represent a sparse matrix in CSR format. More...

#include <gensvm_sparse.h>

Public Attributes

long nnz
 number of nonzero elements More...
 
long n_row
 number of rows of the original matrix More...
 
long n_col
 number of columns of the original matrix More...
 
double * values
 actual nonzero values, should be of length nnz More...
 
long * ia
 cumulative row lengths, should be of length n_row+1 More...
 
long * ja
 column indices, should be of length nnz More...
 

Detailed Description

A structure to represent a sparse matrix in CSR format.

This structure holds a sparse matrix in the classic CSR format. Refer to Wikipedia for more details. The total storage requirement for this format is 2*nnz+n_row+1, so it only makes sense to use this format if the number of nonzeros is smaller than $(n_{row}(n_{col} - 1) - 1)/2$.

Parameters
nnznumber of nonzero elements
n_rowrows of the matrix
n_colcolumns of the matrix
valuesnonzero values (length nnz)
iarow indices (length n+1)
jacolumn indices (length nnz)

Definition at line 55 of file gensvm_sparse.h.

Member Data Documentation

◆ ia

long* GenSparse::ia

cumulative row lengths, should be of length n_row+1

Definition at line 65 of file gensvm_sparse.h.

◆ ja

long* GenSparse::ja

column indices, should be of length nnz

Definition at line 67 of file gensvm_sparse.h.

◆ n_col

long GenSparse::n_col

number of columns of the original matrix

Definition at line 60 of file gensvm_sparse.h.

◆ n_row

long GenSparse::n_row

number of rows of the original matrix

Definition at line 58 of file gensvm_sparse.h.

◆ nnz

long GenSparse::nnz

number of nonzero elements

Definition at line 56 of file gensvm_sparse.h.

◆ values

double* GenSparse::values

actual nonzero values, should be of length nnz

Definition at line 63 of file gensvm_sparse.h.


The documentation for this struct was generated from the following file: