IT++ Logo Newcom Logo

svec.h File Reference

Sparse Vector Class definitions. More...

#include <itpp/base/vec.h>
#include <itpp/base/stat.h>
#include <cstdlib>

Go to the source code of this file.

Namespaces

namespace  itpp

Classes

class  itpp::Sparse_Vec< T >
 Templated sparse vector class. More...

Typedefs

typedef Sparse_Vec< int > sparse_ivec
 Type definition of an integer sparse vector.
typedef Sparse_Vec< double > sparse_vec
 Type definition of a double sparse vector.
typedef Sparse_Vec< std::complex<
double > > 
sparse_cvec
 Type definition of a complex<double> sparse vector.

Functions

template<class T>
Sparse_Vec< T > operator+ (const Sparse_Vec< T > &v1, const Sparse_Vec< T > &v2)
 Addition v1+v2 where v1 and v2 are sparse vector.
template<class T>
operator * (const Sparse_Vec< T > &v1, const Sparse_Vec< T > &v2)
 Scalar product v1*v2 where v1 and v2 are sparse vectors.
template<class T>
operator * (const Sparse_Vec< T > &v1, const Vec< T > &v2)
 Scalar product v1*v2 where v1 is a sparse vector and v2 is a dense vector.
template<class T>
operator * (const Vec< T > &v1, const Sparse_Vec< T > &v2)
 Scalar product v1*v2 where v1 is a dense vector and v2 is a sparse vector.
template<class T>
Sparse_Vec< T > elem_mult (const Sparse_Vec< T > &v1, const Sparse_Vec< T > &v2)
 Element wise multiplication of two sparse vectors.
template<class T>
Vec< T > elem_mult (const Sparse_Vec< T > &v1, const Vec< T > &v2)
 Element wise multiplication of a sparse vector and a dense vector.
template<class T>
Sparse_Vec< T > elem_mult_s (const Sparse_Vec< T > &v1, const Vec< T > &v2)
 Element wise multiplication of a sparse vector and a dense vector returning a sparse vector.
template<class T>
Vec< T > elem_mult (const Vec< T > &v1, const Sparse_Vec< T > &v2)
 Element wise multiplication of a a dense vector and a sparse vector.
template<class T>
Sparse_Vec< T > elem_mult_s (const Vec< T > &v1, const Sparse_Vec< T > &v2)
 Element wise multiplication of a a dense vector and a sparse vector returning a sparse vector.
template<class T>
Sparse_Vec< T > sparse (const Vec< T > &v)
template<class T>
Sparse_Vec< T > sparse (const Vec< T > &v, T epsilon)
template<class T>
Vec< T > full (const Sparse_Vec< T > &s)


Detailed Description

Sparse Vector Class definitions.

Author:
Tony Ottosson and Tobias Ringstrom
Date
2007-04-18 08:11:24 +0200 (Wed, 18 Apr 2007)
Revision
1010

-------------------------------------------------------------------------

IT++ - C++ library of mathematical, signal processing, speech processing, and communications classes and functions

Copyright (C) 1995-2007 (see AUTHORS file for a list of contributors)

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

-------------------------------------------------------------------------

Definition in file svec.h.


Typedef Documentation

typedef Sparse_Vec<int> itpp::sparse_ivec
 

Type definition of an integer sparse vector.

Definition at line 329 of file svec.h.

typedef Sparse_Vec<double> itpp::sparse_vec
 

Type definition of a double sparse vector.

Definition at line 335 of file svec.h.

typedef Sparse_Vec<std::complex<double> > itpp::sparse_cvec
 

Type definition of a complex<double> sparse vector.

Definition at line 341 of file svec.h.


Function Documentation

template<class T>
Sparse_Vec< T > itpp::operator+ const Sparse_Vec< T > &  v1,
const Sparse_Vec< T > &  v2
 

Addition v1+v2 where v1 and v2 are sparse vector.

Definition at line 1148 of file svec.h.

template<class T>
T itpp::operator * const Sparse_Vec< T > &  v1,
const Sparse_Vec< T > &  v2
 

Scalar product v1*v2 where v1 and v2 are sparse vectors.

Definition at line 1018 of file svec.h.

template<class T>
T itpp::operator * const Sparse_Vec< T > &  v1,
const Vec< T > &  v2
 

Scalar product v1*v2 where v1 is a sparse vector and v2 is a dense vector.

Definition at line 1034 of file svec.h.

template<class T>
T itpp::operator * const Vec< T > &  v1,
const Sparse_Vec< T > &  v2
 

Scalar product v1*v2 where v1 is a dense vector and v2 is a sparse vector.

Definition at line 1046 of file svec.h.

template<class T>
Sparse_Vec< T > itpp::elem_mult const Sparse_Vec< T > &  v1,
const Sparse_Vec< T > &  v2
 

Element wise multiplication of two sparse vectors.

Definition at line 1058 of file svec.h.

template<class T>
Vec< T > itpp::elem_mult const Sparse_Vec< T > &  v1,
const Vec< T > &  v2
 

Element wise multiplication of a sparse vector and a dense vector.

Definition at line 1082 of file svec.h.

template<class T>
Sparse_Vec< T > itpp::elem_mult_s const Sparse_Vec< T > &  v1,
const Vec< T > &  v2
 

Element wise multiplication of a sparse vector and a dense vector returning a sparse vector.

Definition at line 1095 of file svec.h.

template<class T>
Vec< T > itpp::elem_mult const Vec< T > &  v1,
const Sparse_Vec< T > &  v2
 

Element wise multiplication of a a dense vector and a sparse vector.

Definition at line 1115 of file svec.h.

template<class T>
Sparse_Vec< T > itpp::elem_mult_s const Vec< T > &  v1,
const Sparse_Vec< T > &  v2
 

Element wise multiplication of a a dense vector and a sparse vector returning a sparse vector.

Definition at line 1128 of file svec.h.

SourceForge Logo

Generated on Fri Jan 11 08:51:39 2008 for IT++ by Doxygen 1.3.9.1