Commit 6090e399 authored by Carsten Gräser's avatar Carsten Gräser
Browse files

Remove obsolete OLD_TNNMG switch

parent 9ef511b2
Pipeline #32284 passed with stage
in 3 minutes and 9 seconds
......@@ -32,11 +32,7 @@ namespace TNNMG {
*/
template <class Functional>
void testConvexity(const Functional& functional,
#ifdef USE_OLD_TNNMG
const std::vector<typename Functional::VectorType>& testPoints)
#else
const std::vector<typename Functional::Vector>& testPoints)
#endif
{
for (size_t i=0; i<testPoints.size(); i++)
for (size_t j=0; j<testPoints.size(); j++)
......@@ -76,11 +72,7 @@ void testConvexity(const Functional& functional,
*/
template <class Functional>
void testHomogeneity(const Functional& functional,
#ifdef USE_OLD_TNNMG
const std::vector<typename Functional::VectorType>& testDirections)
#else
const std::vector<typename Functional::Vector>& testDirections)
#endif
{
for (auto&& testDirection : testDirections)
{
......@@ -109,20 +101,12 @@ void testHomogeneity(const Functional& functional,
*/
template <class Functional>
void testGradient(Functional& functional,
#ifdef USE_OLD_TNNMG
const std::vector<typename Functional::VectorType>& testPoints)
#else
const std::vector<typename Functional::Vector>& testPoints)
#endif
{
for (auto&& testPoint : testPoints)
{
// Get the gradient at the current test point as computed by 'functional'
#ifdef USE_OLD_TNNMG
typename Functional::VectorType gradient(testPoint.size());
#else
typename Functional::Vector gradient(testPoint.size());
#endif
gradient = 0;
functional.addGradient(testPoint, gradient);
......@@ -170,11 +154,7 @@ void testGradient(Functional& functional,
*/
template <class Functional>
void testHessian(Functional& functional,
#ifdef USE_OLD_TNNMG
const std::vector<typename Functional::VectorType>& testPoints)
#else
const std::vector<typename Functional::Vector>& testPoints)
#endif
{
for (auto&& testPoint : testPoints)
{
......@@ -267,11 +247,7 @@ void testHessian(Functional& functional,
*/
template <class Functional>
void testDirectionalSubdifferential(const Functional& functional,
#ifdef USE_OLD_TNNMG
const std::vector<typename Functional::VectorType>& testPoints)
#else
const std::vector<typename Functional::Vector>& testPoints)
#endif
{
// Step size. Best value: square root of the machine precision
const double eps = std::sqrt(std::numeric_limits<double>::epsilon());
......@@ -320,11 +296,7 @@ void testDirectionalSubdifferential(const Functional& functional,
*/
template <class Functional>
void testSubDiff(Functional& functional,
#ifdef USE_OLD_TNNMG
const std::vector<typename Functional::VectorType>& testPoints)
#else
const std::vector<typename Functional::Vector>& testPoints)
#endif
{
for (auto&& testPoint : testPoints)
{
......
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