Skip to content
This repository was archived by the owner on Nov 13, 2021. It is now read-only.

Commit bbae17f

Browse files
committed
fix some bugs.
1 parent a17e3ee commit bbae17f

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/Matrix.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ namespace Mat_pro {
220220

221221
T determinant() const;
222222

223-
224223
Matrix<T> convolution(const Matrix<T> &kernel, int32_t padding = 0, int32_t stride = 1) const;
225224

226225
Matrix<T>
@@ -706,15 +705,15 @@ namespace Mat_pro {
706705

707706
template<typename T>
708707
T Matrix<T>::determinant() const {
709-
T will_return(0);
710708
if (!this->is_square()) {
711709
throw Matrix_Shape_Not_Match_Exception(
712710
"this Matrix is not Squre, can not get determinant", __FILE__, __LINE__);
713-
return will_return;
711+
//return will_return;
714712
}
715713
return determinant_in(this->vec);
716714
}
717715

716+
718717
template<typename T>
719718
Matrix<T> Matrix<T>::conj() const {
720719
vector<vector<T>> vvc(this->rows(), vector<T>(this->cols()));

src/test_matrix_1.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ TEST_CASE("test for row_exchange in test 5") {
871871
{3, 4}};
872872
Matrix<double_t> result1 = {{3, 4},
873873
{1, 2}};
874-
CHECK(Matrix<double_t>::inside_equal(result1, matrix.row_exchange(0,1)));
874+
CHECK(Matrix<double_t>::inside_equal(result1, matrix.row_exchange(0, 1)));
875875
CHECK(!Matrix<double_t>::inside_equal(result1, matrix));
876876
}
877877

@@ -903,8 +903,6 @@ TEST_CASE("eigenvalue", "[test 5]") {
903903
}
904904
cout << endl;
905905
cout << "m1's eigenvector:\n";
906-
907-
908906
Matrix<int32_t> m2 = {{9, 3, 5},
909907
{2, 6, 7},
910908
{4, 8, 1}};

0 commit comments

Comments
 (0)