GClasses
GClasses::GSparseVec Class Reference

Detailed Description

Provides static methods for operating on sparse vectors.

#include <GSparseMatrix.h>

Static Public Member Functions

static size_t count_matching_elements (SparseVec &a, SparseVec &b)
 Returns the number of elements that the two vectors both specify in common. More...
 
static double dotProduct (SparseVec &sparse, GVec &dense)
 Computes the dot product of a sparse vector with a dense vector. More...
 
static double dotProduct (SparseVec &a, SparseVec &b)
 Computes the dot product of two sparse vectors. More...
 

Member Function Documentation

static size_t GClasses::GSparseVec::count_matching_elements ( SparseVec &  a,
SparseVec &  b 
)
static

Returns the number of elements that the two vectors both specify in common.

static double GClasses::GSparseVec::dotProduct ( SparseVec &  sparse,
GVec &  dense 
)
static

Computes the dot product of a sparse vector with a dense vector.

static double GClasses::GSparseVec::dotProduct ( SparseVec &  a,
SparseVec &  b 
)
static

Computes the dot product of two sparse vectors.