A class for a 1-D sparse array. More...
#include "../defs.h"
#include <vector>
#include "SparseArray1.ipp"
Go to the source code of this file.
Classes | |
class | SparseArray< 1, T > |
A sparse array of type T in 1 dimension. More... | |
Functions | |
template<typename T > | |
int | countNonNullElementsInUnion (const SparseArray< 1, T > &a, const SparseArray< 1, T > &b) |
Count the number of non-null elements in the union of the arrays. | |
template<typename T > | |
void | computeSum (const SparseArray< 1, T > &x, const SparseArray< 1, T > &y, SparseArray< 1, T > *result) |
Compute the sum of the two arrays. | |
template<typename T > | |
void | computeDifference (const SparseArray< 1, T > &x, const SparseArray< 1, T > &y, SparseArray< 1, T > *result) |
Compute the difference of the two arrays. | |
template<typename T > | |
void | computeProduct (const SparseArray< 1, T > &x, const SparseArray< 1, T > &y, SparseArray< 1, T > *result) |
Compute the product of the two arrays. | |
template<typename T , typename BinaryFunction > | |
void | computeBinaryOperation (const SparseArray< 1, T > &x, const SparseArray< 1, T > &y, SparseArray< 1, T > *result, const BinaryFunction &function) |
Use the binary function to compute the result. | |
template<typename T1 , bool A, typename T2 > | |
Array< 1, T1, A > & | operator+= (Array< 1, T1, A > &x, const SparseArray< 1, T2 > &y) |
+= on the non-null elements. | |
template<typename T1 , bool A, typename T2 > | |
Array< 1, T1, A > & | operator-= (Array< 1, T1, A > &x, const SparseArray< 1, T2 > &y) |
-= on the non-null elements. | |
template<typename T1 , bool A, typename T2 > | |
Array< 1, T1, A > & | operator*= (Array< 1, T1, A > &x, const SparseArray< 1, T2 > &y) |
*= on the non-null elements. | |
template<typename T1 , bool A, typename T2 > | |
Array< 1, T1, A > & | operator/= (Array< 1, T1, A > &x, const SparseArray< 1, T2 > &y) |
/= on the non-null elements. | |
template<typename T1 , bool A, typename T2 > | |
Array< 1, T1, A > & | operator%= (Array< 1, T1, A > &x, const SparseArray< 1, T2 > &y) |
= on the non-null elements. | |
template<typename T1 , bool A, typename T2 , typename T3 > | |
void | scaleAdd (Array< 1, T1, A > *x, const T2 a, const SparseArray< 1, T3 > &y) |
Perform x += a * y on the non-null elements. | |
template<int _N, typename _T1 , typename _T2 > | |
FixedArray< _N, _T1 > & | operator+= (FixedArray< _N, _T1 > &x, const SparseArray< 1, _T2 > &y) |
+= on the non-null elements. | |
template<int _N, typename _T1 , typename _T2 > | |
FixedArray< _N, _T1 > & | operator-= (FixedArray< _N, _T1 > &x, const SparseArray< 1, _T2 > &y) |
-= on the non-null elements. | |
template<int _N, typename _T1 , typename _T2 > | |
FixedArray< _N, _T1 > & | operator*= (FixedArray< _N, _T1 > &x, const SparseArray< 1, _T2 > &y) |
*= on the non-null elements. | |
template<int _N, typename _T1 , typename _T2 > | |
FixedArray< _N, _T1 > & | operator/= (FixedArray< _N, _T1 > &x, const SparseArray< 1, _T2 > &y) |
/= on the non-null elements. | |
template<int _N, typename _T1 , typename _T2 > | |
FixedArray< _N, _T1 > & | operator%= (FixedArray< _N, _T1 > &x, const SparseArray< 1, _T2 > &y) |
= on the non-null elements. | |
template<int _N, typename _T1 , typename _T2 , typename _T3 > | |
void | scaleAdd (FixedArray< _N, _T1 > *x, const _T2 a, const SparseArray< 1, _T3 > &y) |
Perform x += a * y on the non-null elements. |
A class for a 1-D sparse array.