FEI
Version of the Day
base
fei_CSRMat.hpp
1
#ifndef _fei_CSRMat_hpp_
2
#define _fei_CSRMat_hpp_
3
4
/*--------------------------------------------------------------------*/
5
/* Copyright 2005 Sandia Corporation. */
6
/* Under the terms of Contract DE-AC04-94AL85000, there is a */
7
/* non-exclusive license for use of this work by or on behalf */
8
/* of the U.S. Government. Export of this program may require */
9
/* a license from the United States Government. */
10
/*--------------------------------------------------------------------*/
11
12
#include "fei_macros.hpp"
13
#include "fei_FillableMat.hpp"
14
#include "fei_SparseRowGraph.hpp"
15
#include "fei_CSVec.hpp"
16
17
namespace
fei
{
18
21
class
CSRMat
{
22
public
:
23
CSRMat
();
24
CSRMat
(
const
FillableMat& fmat);
25
virtual
~
CSRMat
();
26
27
SparseRowGraph
& getGraph() {
return
srg_;}
28
const
SparseRowGraph
& getGraph()
const
{
return
srg_;}
29
30
std::vector<double>& getPackedCoefs() {
return
packedcoefs_;}
31
const
std::vector<double>& getPackedCoefs()
const
{
return
packedcoefs_;}
32
33
unsigned
getNumRows()
const
{
return
srg_.
rowNumbers
.size();}
34
35
CSRMat
& operator=(
const
FillableMat& src);
36
37
CSRMat
& operator+=(
const
CSRMat
& src);
38
39
bool
operator==(
const
CSRMat
& rhs)
const
;
40
41
bool
operator!=(
const
CSRMat
& rhs)
const
;
42
43
private
:
44
SparseRowGraph
srg_;
45
std::vector<double> packedcoefs_;
46
};
//class CSRMat
47
49
void
multiply_CSRMat_CSVec
(
const
CSRMat
& A,
const
CSVec
& x,
CSVec
& y);
50
52
void
multiply_trans_CSRMat_CSVec
(
const
CSRMat
& A,
const
CSVec
& x,
CSVec
& y);
53
55
void
multiply_CSRMat_CSRMat
(
const
CSRMat
& A,
const
CSRMat
& B,
CSRMat
& C,
56
bool
storeResultZeros=
false
);
57
59
void
multiply_trans_CSRMat_CSRMat
(
const
CSRMat
& A,
const
CSRMat
& B,
CSRMat
& C,
60
bool
storeResultZeros=
false
);
61
62
void
add_CSRMat_to_FillableMat(
const
CSRMat
& csrm, FillableMat& fm);
63
64
}
//namespace fei
65
66
#endif
67
fei::multiply_CSRMat_CSRMat
void multiply_CSRMat_CSRMat(const CSRMat &A, const CSRMat &B, CSRMat &C, bool storeResultZeros)
Definition:
fei_CSRMat.cpp:189
fei::SparseRowGraph::rowNumbers
std::vector< int > rowNumbers
Definition:
fei_SparseRowGraph.hpp:46
fei::multiply_trans_CSRMat_CSVec
void multiply_trans_CSRMat_CSVec(const CSRMat &A, const CSVec &x, CSVec &y)
Definition:
fei_CSRMat.cpp:148
fei::multiply_CSRMat_CSVec
void multiply_CSRMat_CSVec(const CSRMat &A, const CSVec &x, CSVec &y)
Definition:
fei_CSRMat.cpp:102
fei::multiply_trans_CSRMat_CSRMat
void multiply_trans_CSRMat_CSRMat(const CSRMat &A, const CSRMat &B, CSRMat &C, bool storeResultZeros)
Definition:
fei_CSRMat.cpp:268
fei::SparseRowGraph
Definition:
fei_SparseRowGraph.hpp:23
fei
Definition:
fei_ArrayUtils.hpp:16
fei::CSVec
Definition:
fei_CSVec.hpp:24
fei::CSRMat
Definition:
fei_CSRMat.hpp:21
Generated by
1.8.16