refactor and migrate root directory
This commit is contained in:
parent
c924b2067c
commit
881a57bf8d
11
typedefs.h
11
typedefs.h
@ -36,18 +36,15 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#define M_PI 3.14159265358979323846
|
#define M_PI 3.14159265358979323846
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template<typename digitT>
|
template <typename digitT> digitT round(digitT x) { return std::floor(x + 0.5); }
|
||||||
digitT round(digitT x) {
|
|
||||||
return std::floor(x + 0.5);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef unsigned int NodeID;
|
typedef unsigned int NodeID;
|
||||||
typedef unsigned int EdgeID;
|
typedef unsigned int EdgeID;
|
||||||
typedef int EdgeWeight;
|
typedef int EdgeWeight;
|
||||||
|
|
||||||
static const NodeID SPECIAL_NODEID = std::numeric_limits<unsigned>::max();
|
constexpr NodeID SPECIAL_NODEID = std::numeric_limits<unsigned>::max();
|
||||||
static const EdgeID SPECIAL_EDGEID = std::numeric_limits<unsigned>::max();
|
constexpr EdgeID SPECIAL_EDGEID = std::numeric_limits<unsigned>::max();
|
||||||
static const EdgeWeight INVALID_EDGE_WEIGHT = std::numeric_limits<int>::max();
|
constexpr EdgeWeight INVALID_EDGE_WEIGHT = std::numeric_limits<int>::max();
|
||||||
|
|
||||||
#endif /* TYPEDEFS_H_ */
|
#endif /* TYPEDEFS_H_ */
|
||||||
|
Loading…
Reference in New Issue
Block a user