@@ -38,9 +38,9 @@ class kr_balancing{
38
38
// A = A + I;
39
39
}
40
40
41
- void outter_loop (){
41
+ void outer_loop (){
42
42
x = e.sparseView ();
43
- size_t outter_loop_count = 0 ;
43
+ size_t outer_loop_count = 0 ;
44
44
double stop_tol = tol*0.5 ;
45
45
double eta = etamax;
46
46
assert (x.isVector ());
@@ -56,8 +56,8 @@ class kr_balancing{
56
56
if (fl == 1 ) std::cout<< ' intermediate convergence statistics is off' <<std::endl;
57
57
size_t nochange = 0 ;
58
58
while (rout > rt){// outer itteration
59
- outter_loop_count ++;
60
- // if(outter_loop_count == 30) break;
59
+ outer_loop_count ++;
60
+ // if(outer_loop_count == 30) break;
61
61
i=i+1 ; k=0 ; y=e.sparseView ();
62
62
innertol = std::max (std::pow (eta,2 )*rout,rt);
63
63
inner_loop ();
@@ -83,7 +83,7 @@ class kr_balancing{
83
83
if (fl == 1 ){
84
84
res.push_back (res_norm);
85
85
}
86
- if (outter_loop_count %50 ==0 ) std::cout << " outer loop number " << outter_loop_count <<std::endl;
86
+ if (outer_loop_count %50 ==0 ) std::cout << " outer loop number " << outer_loop_count <<std::endl;
87
87
}// End of outer loop
88
88
// if (nochange >= 100) {
89
89
// std::cout << "nochange >=100" <<std::endl;
@@ -150,7 +150,7 @@ class kr_balancing{
150
150
}
151
151
const SparseMatrixCol* get_output (){
152
152
assert (A.rows () == A.cols ());
153
- A = SparseMatrixCol (A.triangularView <Eigen::Lower >());
153
+ A = SparseMatrixCol (A.triangularView <Eigen::Upper >());
154
154
155
155
#pragma omp parallel for num_threads(num_threads) schedule(dynamic)
156
156
for (int k=0 ; k<A.outerSize (); ++k){
@@ -190,7 +190,7 @@ class kr_balancing{
190
190
PYBIND11_MODULE (KRBalancing, m) {
191
191
py::class_<kr_balancing>(m, " kr_balancing" )
192
192
.def (py::init< const SparseMatrixCol & >())
193
- .def (" outter_loop " , &kr_balancing::outter_loop )
193
+ .def (" outer_loop " , &kr_balancing::outer_loop )
194
194
.def (" get_output" ,&kr_balancing::get_output, py::return_value_policy::reference_internal);
195
195
196
196
}
0 commit comments