We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12e646b commit 134e381Copy full SHA for 134e381
src/KRBalancing.cpp
@@ -136,9 +136,11 @@ class kr_balancing{
136
137
}//End of the inner 'while'
138
}
139
- SparseMatrixR get_output(){
140
- std::cout << "export output of shape "<< A.cwiseProduct(x*x.transpose()).rows() <<std::endl;
141
- return A.cwiseProduct(x*x.transpose());
+ const SparseMatrixR* get_output(){
+ output = A.cwiseProduct(x*x.transpose());
+ std::cout << "export output of shape "<< output.rows() <<
142
+ " by " << output.rows()<<std::endl;
143
+ return &output;
144
145
private:
146
std::vector<double> res;
@@ -163,6 +165,7 @@ class kr_balancing{
163
165
SparseMatrixR v;
164
166
SparseMatrixR x;
167
Eigen::SparseVector<double> rk;
168
+ SparseMatrixR output;
169
};
170
171
0 commit comments