compvect Class Reference

#include <csv.h>

List of all members.

Public Member Functions

void axpy (compvect *x, double aa)
void axpy_known (compvect *x, double aa)
 compvect (long *ii, long nonz)
 compvect ()
void copy (compvect *bc)
double dotprod (compvect *cv)
void reorder_components ()
void setup_vector (double *b, long nc)
void test_ordering ()
 ~compvect ()

Public Attributes

double * a
 array containing nonzero components
long * ind
 array containing indices of nonzero components
double limit
 limit for components extraction
long n
 number of all components (including zero components) of the stored vector
long nz
 number of nonzero components of the stored vector
long ordering
 indicator of reordering

Detailed Description

class deals with compressed sparse vector format

only nonzero vector components are stored in the array a corresponding indices are stored in the array ind

JK, 25.2.2007

Definition at line 13 of file csv.h.


Constructor & Destructor Documentation

compvect (  ) 

Definition at line 6 of file csv.cpp.

References a, ind, limit, n, nz, and ordering.

compvect ( long *  ii,
long  nonz 
)

Definition at line 18 of file csv.cpp.

References a, ind, limit, n, nz, and ordering.

~compvect (  ) 

Definition at line 37 of file csv.cpp.

References a, and ind.

Referenced by copy().


Member Function Documentation

void axpy ( compvect x,
double  aa 
)

function computes y = a*x + y

Parameters:
x - compressed sparse vector
aa - scalar

JK, 27.2.2007

Definition at line 169 of file csv.cpp.

References a, copy(), ind, and nz.

void axpy_known ( compvect x,
double  aa 
)

function computes y = a*x + y

Parameters:
x - compressed sparse vector
aa - scalar

JK, 27.2.2007

Definition at line 225 of file csv.cpp.

References a, and nz.

void copy ( compvect bc  ) 

function copies current vector to back up vector bc

Parameters:
bc - back up vector

JK, 27.2.2007

Definition at line 50 of file csv.cpp.

References a, ind, n, nz, and ~compvect().

Referenced by axpy().

double dotprod ( compvect cv  ) 

function computes dot product of two compressed sparse vectors

Parameters:
 JK, 25.2.2007

Definition at line 243 of file csv.cpp.

References a, ind, nz, and ordering.

void reorder_components (  ) 

function reorders components indices are reordered increasingly

JK, 25.2.2007

Definition at line 135 of file csv.cpp.

References a, ind, nz, and ordering.

void setup_vector ( double *  b,
long  nc 
)

function sets up compressed sparse vector from dense vector

Parameters:
b - dense vector
nc - number of components of the dense vector

JK, 25.2.2007

Definition at line 76 of file csv.cpp.

References a, ind, limit, n, nz, and ordering.

Referenced by comprow::crxcv_cv().

void test_ordering (  ) 

function tests ordering of indices of the vector

JK, 27.2.2007

Definition at line 117 of file csv.cpp.

References ind, nz, and ordering.


Member Data Documentation

double* a

array containing nonzero components

Definition at line 36 of file csv.h.

Referenced by axpy(), axpy_known(), compvect(), copy(), comprow::crxcv_cv(), dotprod(), reorder_components(), setup_vector(), and ~compvect().

long* ind

array containing indices of nonzero components

Definition at line 38 of file csv.h.

Referenced by axpy(), compvect(), copy(), comprow::crxcv_cv(), dotprod(), reorder_components(), setup_vector(), test_ordering(), and ~compvect().

double limit

limit for components extraction

Definition at line 43 of file csv.h.

Referenced by compvect(), and setup_vector().

long n

number of all components (including zero components) of the stored vector

Definition at line 32 of file csv.h.

Referenced by compvect(), copy(), and setup_vector().

long nz

number of nonzero components of the stored vector

Definition at line 34 of file csv.h.

Referenced by aggregator::assemble_smoothed_prol2(), axpy(), axpy_known(), compvect(), copy(), comprow::crxcv_cv(), dotprod(), reorder_components(), setup_vector(), and test_ordering().

long ordering

indicator of reordering

Definition at line 41 of file csv.h.

Referenced by compvect(), comprow::crxcv_cv(), dotprod(), reorder_components(), setup_vector(), and test_ordering().


The documentation for this class was generated from the following files:

Generated by  doxygen 1.6.2