Skip to content

Commit 533a8bf

Browse files
committed
core: add infinite_bound helper
1 parent a65d0ea commit 533a8bf

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
//
2+
// Copyright (c) 2022 INRIA
3+
//
4+
/**
5+
* @file common.hpp
6+
*/
7+
8+
#ifndef PROXSUITE_HELPERS_COMMON_HPP
9+
#define PROXSUITE_HELPERS_COMMON_HPP
10+
11+
#include "proxsuite/config.hpp"
12+
#include <limits>
13+
14+
namespace proxsuite {
15+
namespace helpers {
16+
17+
template<typename Scalar>
18+
struct infinite_bound
19+
{
20+
static Scalar value()
21+
{
22+
using namespace std;
23+
return sqrt(std::numeric_limits<Scalar>::max());
24+
}
25+
};
26+
27+
} // helpers
28+
} // proxsuite
29+
30+
#endif // ifndef PROXSUITE_HELPERS_COMMON_HPP

0 commit comments

Comments
 (0)