OGS
TemplateWeightedPoint.h
Go to the documentation of this file.
1 
13 #pragma once
14 
15 #include "TemplatePoint.h"
16 
17 namespace MathLib
18 {
19 
20 template <typename FP_T, typename W_T, std::size_t DIM>
21 class TemplateWeightedPoint : public TemplatePoint<FP_T, DIM>
22 {
23 public:
24  TemplateWeightedPoint(std::array<FP_T, DIM> const& x, W_T weight)
25  : TemplatePoint<FP_T, DIM>(x), weight_(weight)
26  {}
27 
28  W_T getWeight() const { return weight_; }
29 
30 private:
31  W_T const weight_;
32 };
33 
37 
38 } // end namespace MathLib
Definition of the TemplatePoint class.
class-template for points can be instantiated by a numeric type.
Definition: TemplatePoint.h:37
TemplateWeightedPoint(std::array< FP_T, DIM > const &x, W_T weight)