Skip to content
Snippets Groups Projects
Commit 05f8c95f authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

ENH: JIRA 351: faster matrix inversion for sizes 3x3, hope to remove nan on several platforms

parent 95d4fa59
Branches
Tags
No related merge requests found
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
#include "otbLineOfSightOptimizer.h" #include "otbLineOfSightOptimizer.h"
#include "vnl/vnl_inverse.h"
namespace otb namespace otb
{ {
...@@ -94,8 +96,7 @@ LineOfSightOptimizer<TPrecision,TLabel> ...@@ -94,8 +96,7 @@ LineOfSightOptimizer<TPrecision,TLabel>
++itPointB; ++itPointB;
} }
vnl_matrix_inverse<PrecisionType> inv(m_InvCumul); vnl_vector<PrecisionType> intersection = vnl_inverse(m_InvCumul) * m_SecCumul;
vnl_vector<PrecisionType> intersection = inv.inverse() * m_SecCumul;
result[0] = intersection[0]; result[0] = intersection[0];
result[1] = intersection[1]; result[1] = intersection[1];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment