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
34
using
WeightedPoint1D
=
TemplateWeightedPoint<double, double, 1>
;
35
using
WeightedPoint2D
=
TemplateWeightedPoint<double, double, 2>
;
36
using
WeightedPoint3D
=
TemplateWeightedPoint<double, double, 3>
;
37
38
}
// end namespace MathLib
TemplatePoint.h
Definition of the TemplatePoint class.
MathLib::TemplatePoint
class-template for points can be instantiated by a numeric type.
Definition:
TemplatePoint.h:37
MathLib::TemplateWeightedPoint
Definition:
TemplateWeightedPoint.h:22
MathLib::TemplateWeightedPoint::TemplateWeightedPoint
TemplateWeightedPoint(std::array< FP_T, DIM > const &x, W_T weight)
Definition:
TemplateWeightedPoint.h:24
MathLib::TemplateWeightedPoint::weight_
W_T const weight_
Definition:
TemplateWeightedPoint.h:31
MathLib::TemplateWeightedPoint::getWeight
W_T getWeight() const
Definition:
TemplateWeightedPoint.h:28
MathLib
MathLib
TemplateWeightedPoint.h
Generated by
1.9.1