Commit fbbef6e4 authored by Florent Jacquemard's avatar Florent Jacquemard
Browse files

Distance: type rtu_t

parent 53b145c6
......@@ -15,6 +15,7 @@
#include <stdio.h>
#include "trace.hpp"
#include "RTU.hpp"
#include "AlignedInterval.hpp"
#include "Weight.hpp"
#include "TropicalWeight.hpp"
......@@ -31,7 +32,7 @@ class Distance: public TropicalWeight
{
public:
/// defaut = null distance - not unknown
Distance(double d=0.0):TropicalWeight(d) { }
Distance(rtu_t d=0.0):TropicalWeight(d) { }
/// weight which is the distance defined by alignment for input segment
/// not unknown.
......@@ -45,7 +46,7 @@ public:
virtual Distance* clone() const;
inline virtual Weight make(double v) const
inline virtual Weight make(rtu_t v) const
{ assert (v > 0); return Weight(new Distance(v)); }
inline static Weight make_zero()
......@@ -80,17 +81,17 @@ protected:
// vector length
//int _dim;
//vector<double> _dist;
//vector<rtu_t> _dist;
private:
/// distance to the closest point before j not at the same rdate as j.
double dist_prev(const InputSegment* s, size_t j);
rtu_t dist_prev(const InputSegment* s, size_t j);
/// distance to the closest point after j not at the same rdate as j.
double dist_next(const InputSegment* s, size_t j);
rtu_t dist_next(const InputSegment* s, size_t j);
/// sum of the 2 above or 1 if sum is null.
double distcoeff(const InputSegment* s, size_t j);
rtu_t distcoeff(const InputSegment* s, size_t j);
};
......
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