@@ -58,7 +58,7 @@ class PointT
5858 bool operator ==(const PointT& rhs) const { return x == rhs.x && y == rhs.y ; }
5959 bool operator !=(const PointT& rhs) const { return !(*this == rhs); }
6060
61- friend inline std::ostream& operator <<(std::ostream& os, const PointT& pt)
61+ friend std::ostream& operator <<(std::ostream& os, const PointT& pt)
6262 {
6363 os << " (" << pt.x << " , " << pt.y << " )" ;
6464 return os;
@@ -67,21 +67,21 @@ class PointT
6767
6868// L-1 (Manhattan) distance between points
6969template <typename T>
70- inline T Dist (const PointT<T>& pt1, const PointT<T>& pt2)
70+ T Dist (const PointT<T>& pt1, const PointT<T>& pt2)
7171{
7272 return std::abs (pt1.x - pt2.x ) + std::abs (pt1.y - pt2.y );
7373}
7474
7575// L-2 (Euclidean) distance between points
7676template <typename T>
77- inline double L2Dist (const PointT<T>& pt1, const PointT<T>& pt2)
77+ double L2Dist (const PointT<T>& pt1, const PointT<T>& pt2)
7878{
7979 return std::sqrt (std::pow (pt1.x - pt2.x , 2 ) + std::pow (pt1.y - pt2.y , 2 ));
8080}
8181
8282// L-inf distance between points
8383template <typename T>
84- inline T LInfDist (const PointT<T>& pt1, const PointT<T>& pt2)
84+ T LInfDist (const PointT<T>& pt1, const PointT<T>& pt2)
8585{
8686 return std::max (std::abs (pt1.x - pt2.x ), std::abs (pt1.y - pt2.y ));
8787}
@@ -226,8 +226,8 @@ class IntervalT
226226 }
227227 bool operator !=(const IntervalT& rhs) const { return !(*this == rhs); }
228228
229- friend inline std::ostream& operator <<(std::ostream& os,
230- const IntervalT<T>& interval)
229+ friend std::ostream& operator <<(std::ostream& os,
230+ const IntervalT<T>& interval)
231231 {
232232 os << " (" << interval.low << " , " << interval.high << " )" ;
233233 return os;
@@ -236,13 +236,13 @@ class IntervalT
236236
237237// Distance between intervals/points (assume valid intervals)
238238template <typename T>
239- inline T Dist (const IntervalT<T>& intvl, const T val)
239+ T Dist (const IntervalT<T>& intvl, const T val)
240240{
241241 return std::abs (intvl.GetNearestPointTo (val) - val);
242242}
243243
244244template <typename T>
245- inline T Dist (const IntervalT<T>& int1, const IntervalT<T>& int2)
245+ T Dist (const IntervalT<T>& int1, const IntervalT<T>& int2)
246246{
247247 if (int1.high <= int2.low ) {
248248 return int2.low - int1.high ;
@@ -391,7 +391,7 @@ class BoxT
391391 }
392392 bool operator !=(const BoxT& rhs) const { return !(*this == rhs); }
393393
394- friend inline std::ostream& operator <<(std::ostream& os, const BoxT<T>& box)
394+ friend std::ostream& operator <<(std::ostream& os, const BoxT<T>& box)
395395 {
396396 os << " [x: " << box.x << " , y: " << box.y << " ]" ;
397397 return os;
@@ -400,34 +400,34 @@ class BoxT
400400
401401// L-1 (Manhattan) distance between boxes/points (assume valid boxes)
402402template <typename T>
403- inline T Dist (const BoxT<T>& box, const PointT<T>& point)
403+ T Dist (const BoxT<T>& box, const PointT<T>& point)
404404{
405405 return Dist (box.x , point.x ) + Dist (box.y , point.y );
406406}
407407template <typename T>
408- inline T Dist (const BoxT<T>& box1, const BoxT<T>& box2)
408+ T Dist (const BoxT<T>& box1, const BoxT<T>& box2)
409409{
410410 return Dist (box1.x , box2.x ) + Dist (box1.y , box2.y );
411411}
412412
413413// L-2 (Euclidean) distance between boxes
414414template <typename T>
415- inline double L2Dist (const BoxT<T>& box1, const BoxT<T>& box2)
415+ double L2Dist (const BoxT<T>& box1, const BoxT<T>& box2)
416416{
417417 return std::sqrt (std::pow (Dist (box1.x , box2.x ), 2 )
418418 + std::pow (Dist (box1.y , box2.y ), 2 ));
419419}
420420
421421// L-Inf (max) distance between boxes
422422template <typename T>
423- inline T LInfDist (const BoxT<T>& box1, const BoxT<T>& box2)
423+ T LInfDist (const BoxT<T>& box1, const BoxT<T>& box2)
424424{
425425 return std::max (Dist (box1.x , box2.x ), Dist (box1.y , box2.y ));
426426}
427427
428428// Parallel run length between boxes
429429template <typename T>
430- inline T ParaRunLength (const BoxT<T>& box1, const BoxT<T>& box2)
430+ T ParaRunLength (const BoxT<T>& box1, const BoxT<T>& box2)
431431{
432432 return std::max (box1.x .ParaRunLength (box2.x ), box1.y .ParaRunLength (box2.y ));
433433}
0 commit comments