summaryrefslogtreecommitdiffhomepage
path: root/eigen/doc/snippets/LLT_solve.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'eigen/doc/snippets/LLT_solve.cpp')
-rw-r--r--eigen/doc/snippets/LLT_solve.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/eigen/doc/snippets/LLT_solve.cpp b/eigen/doc/snippets/LLT_solve.cpp
deleted file mode 100644
index 7095d2c..0000000
--- a/eigen/doc/snippets/LLT_solve.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-typedef Matrix<float,Dynamic,2> DataMatrix;
-// let's generate some samples on the 3D plane of equation z = 2x+3y (with some noise)
-DataMatrix samples = DataMatrix::Random(12,2);
-VectorXf elevations = 2*samples.col(0) + 3*samples.col(1) + VectorXf::Random(12)*0.1;
-// and let's solve samples * [x y]^T = elevations in least square sense:
-Matrix<float,2,1> xy
- = (samples.adjoint() * samples).llt().solve((samples.adjoint()*elevations));
-cout << xy << endl;