Download include/eigen/doc/examples/TutorialLinAlgExComputeSolveError.cpp from adfa5456/FastRobustICP: direct link, hf CLI and curl.
- Browser
- Download file 371 Bytes
-
https://huggingface.co/datasets/adfa5456/FastRobustICP/resolve/main/include/eigen/doc/examples/TutorialLinAlgExComputeSolveError.cpp
- Command line
-
hf download hf://datasets/adfa5456/FastRobustICP/include/eigen/doc/examples/TutorialLinAlgExComputeSolveError.cpp
-
curl -L -o TutorialLinAlgExComputeSolveError.cpp https://huggingface.co/datasets/adfa5456/FastRobustICP/resolve/main/include/eigen/doc/examples/TutorialLinAlgExComputeSolveError.cpp
371 Bytes
| using namespace std; | |
| using namespace Eigen; | |
| int main() | |
| { | |
| MatrixXd A = MatrixXd::Random(100,100); | |
| MatrixXd b = MatrixXd::Random(100,50); | |
| MatrixXd x = A.fullPivLu().solve(b); | |
| double relative_error = (A*x - b).norm() / b.norm(); // norm() is L2 norm | |
| cout << "The relative error is:\n" << relative_error << endl; | |
| } | |