Go to the source code of this file.
|
void | buildProblem (std::vector< T > &coefficients, Eigen::VectorXd &b, int n) |
|
void | insertCoefficient (int id, int i, int j, double w, std::vector< T > &coeffs, Eigen::VectorXd &b, const Eigen::VectorXd &boundary) |
|
void | saveAsBitmap (const Eigen::VectorXd &x, int n, const char *filename) |
|
◆ SpMat
◆ buildProblem()
void buildProblem |
( |
std::vector< T > & |
coefficients, |
|
|
Eigen::VectorXd & |
b, |
|
|
int |
n |
|
) |
| |
Definition at line 19 of file Tutorial_sparse_example_details.cpp.
23 for(
int j=0;
j<
n; ++
j)
25 for(
int i=0;
i<
n; ++
i)
void insertCoefficient(int id, int i, int j, double w, std::vector< T > &coeffs, Eigen::VectorXd &b, const Eigen::VectorXd &boundary)
General-purpose arrays with easy API for coefficient-wise operations.
static EIGEN_DEPRECATED const RandomAccessLinSpacedReturnType LinSpaced(Sequential_t, Index size, const Scalar &low, const Scalar &high)
◆ insertCoefficient()
Definition at line 8 of file Tutorial_sparse_example_details.cpp.
11 int n = int(boundary.
size());
14 if(
i==-1 ||
i==
n)
b(
id) -=
w * boundary(
j);
15 else if(
j==-1 ||
j==
n)
b(
id) -=
w * boundary(
i);
16 else coeffs.push_back(
T(
id,id1,
w));
Eigen::Triplet< double > T
EIGEN_CONSTEXPR Index size() const EIGEN_NOEXCEPT
◆ saveAsBitmap()
void saveAsBitmap |
( |
const Eigen::VectorXd & |
x, |
|
|
int |
n, |
|
|
const char * |
filename |
|
) |
| |