File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ using namespace Eigen;
1818Eigen::MatrixXd L (const Eigen::VectorXd& w) {
1919 int j;
2020 int k = w.size ();
21- const int n = .5 * (1 + sqrt (1 + 8 * k));
21+ const int n = .5 * (1 + sqrt (1 . + 8 . * k));
2222 Eigen::MatrixXd Lw = Eigen::MatrixXd::Zero (n, n);
2323
2424 for (int i = n-2 ; i > -1 ; --i) {
@@ -47,11 +47,11 @@ Eigen::MatrixXd L(const Eigen::VectorXd& w) {
4747Eigen::MatrixXd A (const Eigen::VectorXd& w) {
4848 int j;
4949 int k = w.size ();
50- const int N = .5 * (1 + sqrt (1 + 8 * k));
51- Eigen::MatrixXd Aw = Eigen::MatrixXd::Zero (N, N );
50+ const int n = .5 * (1 + sqrt (1 . + 8 . * k));
51+ Eigen::MatrixXd Aw = Eigen::MatrixXd::Zero (n, n );
5252
53- for (int i = N -2 ; i > -1 ; --i) {
54- j = N - i - 1 ;
53+ for (int i = n -2 ; i > -1 ; --i) {
54+ j = n - i - 1 ;
5555 Aw.row (i).tail (j) = w.head (k).tail (j);
5656 k -= j;
5757 }
You can’t perform that action at this time.
0 commit comments