MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / ZSparseMatrix

Class ZSparseMatrix

tests/learning_tests/swig_eigen/ZSparseMatrix.h:7–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include <Core/EigenTypedef.h>
6
7class ZSparseMatrix : public Eigen::SparseMatrix<Float, Eigen::ColMajor> {
8 public:
9 typedef Eigen::SparseMatrix<Float> ParentType;
10 ZSparseMatrix() {}
11 ZSparseMatrix(size_t rows, size_t cols) : ParentType(rows, cols) {}
12
13 public:
14 size_t num_rows() const { return rows(); }
15 size_t num_cols() const { return cols(); }
16 size_t get_inner_size() const { return nonZeros(); }
17 size_t get_outer_size() const { return cols() + 1; }
18 size_t get_value_size() const { return nonZeros(); }
19
20 void get_inner_indices(int* np_idx_array, size_t idx_size) {
21 assert(idx_size <= get_inner_size());
22 int* inner = innerIndexPtr();
23 for (size_t i=0; i<idx_size; i++) {
24 np_idx_array[i] = inner[i];
25 }
26 }
27
28 void get_outer_indices(int* np_idx_array, size_t idx_size) {
29 assert(idx_size <= get_outer_size());
30 int* outer = outerIndexPtr();
31 for (size_t i=0; i<idx_size; i++) {
32 np_idx_array[i] = outer[i];
33 }
34 }
35
36 void get_values(double* np_value_array, size_t num_values) {
37 assert(num_values <= get_value_size());
38 double* values = valuePtr();
39 for (size_t i=0; i<num_values; i++) {
40 np_value_array[i] = values[i];
41 }
42 }
43};

Callers 15

getBdAreaMatrixMethod · 0.50
getBoundaryBlurMatrixMethod · 0.50
getRigidMotionMatrixMethod · 0.50
getMassMatrixMethod · 0.50
getStiffnessMatrixMethod · 0.50
getLaplacianMatrixMethod · 0.50
getStrainStressMatrixMethod · 0.50
getBdLaplacianMatrixMethod · 0.50
getMassMatrixMethod · 0.50
getStiffnessMatrixMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected