Skip to content

Commit

Permalink
Last fix with resize
Browse files Browse the repository at this point in the history
  • Loading branch information
alkino committed Sep 4, 2023
1 parent 3407b1c commit 715d5b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 27 deletions.
26 changes: 0 additions & 26 deletions docs/python/programming/math/matrix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -500,10 +500,6 @@ Matrix
.. warning::
Implemented only for full and sparse matrices.


----


Expand Down Expand Up @@ -660,9 +656,6 @@ Matrix
print()
m.solv(b,1).printf("%8.3f", 475, 535)
.. warning::
Implemented only for full and sparse matrices.

----

Expand Down Expand Up @@ -790,9 +783,6 @@ Matrix
m.printf()
.. warning::
Implemented only for full and sparse matrices.

----

Expand All @@ -813,9 +803,6 @@ Matrix

Otherwise fill the matrix row with a constant.

.. warning::
Implemented only for full matrices and sparse.


----

Expand All @@ -836,9 +823,6 @@ Matrix

Otherwise fill the matrix column with a constant.

.. warning::
Implemented only for full matrices.


----

Expand Down Expand Up @@ -883,9 +867,6 @@ Matrix
m.printf()
.. warning::
Implemented only for full and sparse matrices.

----

Expand All @@ -901,9 +882,6 @@ Matrix
Description:
Fills the matrix with 0.

.. warning::
Implemented only for full matrices.


----

Expand All @@ -929,10 +907,6 @@ Matrix
m.printf()
.. warning::
Implemented only for full matrices.


----


Expand Down
4 changes: 3 additions & 1 deletion src/ivoc/ocmatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ int OcFullMatrix::ncol() {
}

void OcFullMatrix::resize(int i, int j) {
m_.conservativeResize(i, j);
// This is here because we want that new values are initialized to 0
auto v = Eigen::MatrixXd::Zero(i, j);
m_.conservativeResizeLike(v);
}

void OcFullMatrix::mulv(Vect* vin, Vect* vout) {
Expand Down

0 comments on commit 715d5b0

Please sign in to comment.