Commit e3b35c46 authored by Kirill Terekhov's avatar Kirill Terekhov
Browse files

Fix small leak

parent 6853b1e7
...@@ -669,11 +669,12 @@ namespace INMOST ...@@ -669,11 +669,12 @@ namespace INMOST
} }
if( ok ) AtA(i,i) = AtA(i,i) < 0.0 ? - 1.0e-12 : 1.0e-12; if( ok ) AtA(i,i) = AtA(i,i) < 0.0 ? - 1.0e-12 : 1.0e-12;
else else
{ {
if( print_fail ) std::cout << "Failed to invert matrix" << std::endl; if( print_fail ) std::cout << "Failed to invert matrix" << std::endl;
ret.second = false; ret.second = false;
return ret; delete [] order;
} return ret;
}
} }
for(enumerator k = i+1; k < m; k++) for(enumerator k = i+1; k < m; k++)
{ {
...@@ -968,22 +969,22 @@ namespace INMOST ...@@ -968,22 +969,22 @@ namespace INMOST
}; };
template<typename typeB> typedef Matrix<INMOST_DATA_REAL_TYPE> rMatrix; //shortcut for real matrix
Matrix<typename Promote<INMOST_DATA_REAL_TYPE,typeB>::type> operator *(INMOST_DATA_REAL_TYPE coef, const Matrix<typeB> & other)
{return other*coef;}
#if defined(USE_AUTODIFF) #if defined(USE_AUTODIFF)
template<typename typeB> typedef Matrix<variable> vMatrix; //shortcut for matrix with variations
Matrix<typename Promote<variable,typeB>::type> operator *(const variable & coef, const Matrix<typeB> & other)
{return other*coef;}
#endif #endif
}
template<typename typeB>
typedef Matrix<INMOST_DATA_REAL_TYPE> rMatrix; //shortcut for real matrix INMOST::Matrix<typename INMOST::Promote<INMOST_DATA_REAL_TYPE,typeB>::type> operator *(INMOST_DATA_REAL_TYPE coef, const INMOST::Matrix<typeB> & other)
{return other*coef;}
#if defined(USE_AUTODIFF) #if defined(USE_AUTODIFF)
typedef Matrix<variable> vMatrix; //shortcut for matrix with variations template<typename typeB>
INMOST::Matrix<typename INMOST::Promote<INMOST::variable,typeB>::type> operator *(const INMOST::variable & coef, const INMOST::Matrix<typeB> & other)
{return other*coef;}
#endif #endif
}
#endif //INMOST_DENSE_INCLUDED #endif //INMOST_DENSE_INCLUDED
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment