Skip to content

Commit bd7ecb4

Browse files
author
Leily Rabbani
committed
Added a small value to the main diagonal
1 parent e470515 commit bd7ecb4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/krbalancing.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ kr_balancing::kr_balancing(const SparseMatrixCol & input){
66
e.resize(A.rows(),1);
77
e.setOnes();
88
/*Replace zeros with 0.00001 on the main diagonal*/
9-
//SparseMatrixCol I;
10-
//I.resize(A.rows(),A.cols());
11-
//I.setIdentity();
12-
//I = I*0.00001;
13-
//A = A + I;
9+
SparseMatrixCol I;
10+
I.resize(A.rows(),A.cols());
11+
I.setIdentity();
12+
I = I*0.00001;
13+
A = A + I;
1414
}
1515

1616

0 commit comments

Comments
 (0)