#include <nimble_linear_solver.h>
◆ MatrixContainer()
nimble::MatrixContainer::MatrixContainer |
( |
| ) |
|
|
inline |
◆ ~MatrixContainer()
nimble::MatrixContainer::~MatrixContainer |
( |
| ) |
|
|
inline |
◆ AllocateNonzeros()
void nimble::MatrixContainer::AllocateNonzeros |
( |
std::vector< int > const & | i_index, |
|
|
std::vector< int > const & | j_index ) |
|
inline |
68 {
69 num_rows_ = 0;
70 for (auto const& entry : i_index) {
71 if (entry > num_rows_) { num_rows_ = entry; }
72 }
73 num_rows_ += 1;
74 data_.resize(num_rows_ * num_rows_, 0.0);
75 }
◆ NumNonzeros()
unsigned int nimble::MatrixContainer::NumNonzeros |
( |
| ) |
const |
|
inline |
97 {
98 return data_.size();
99 }
◆ operator()() [1/2]
double & nimble::MatrixContainer::operator() |
( |
int | i, |
|
|
int | j ) |
|
inline |
109 {
110 return data_[num_rows_ * i + j];
111 }
◆ operator()() [2/2]
double nimble::MatrixContainer::operator() |
( |
int | i, |
|
|
int | j ) const |
|
inline |
103 {
104 return data_[num_rows_ * i + j];
105 }
◆ SetAllValues()
void nimble::MatrixContainer::SetAllValues |
( |
double | value | ) |
|
|
inline |
79 {
80 for (unsigned int i = 0; i < data_.size(); i++) { data_[i] = value; }
81 }
◆ SetColumnValues()
void nimble::MatrixContainer::SetColumnValues |
( |
int | col, |
|
|
double | value ) |
|
inline |
91 {
92 for (int i = 0; i < num_rows_; ++i) { data_[num_rows_ * i + col] = value; }
93 }
◆ SetRowValues()
void nimble::MatrixContainer::SetRowValues |
( |
int | row, |
|
|
double | value ) |
|
inline |
85 {
86 for (int i = 0; i < num_rows_; ++i) { data_[num_rows_ * row + i] = value; }
87 }
The documentation for this class was generated from the following file: