OGS
WeightedPoint.cpp
Go to the documentation of this file.
1
10
#include "
WeightedPoint.h
"
11
12
#include <ostream>
13
14
namespace
MathLib
15
{
16
// Used to output helpful information if the unit tests fail.
17
std::ostream&
operator<<
(std::ostream& os,
MathLib::WeightedPoint
const
& wp)
18
{
19
auto
const
dim = wp.
getDimension
();
20
os <<
"WP["
<< dim <<
"D]{{"
;
21
for
(std::size_t comp = 0; comp < 3; ++comp)
22
{
23
if
(comp != 0)
24
{
25
os <<
", "
;
26
}
27
os << wp[comp];
28
}
29
os <<
"}, weight="
<< wp.
getWeight
() <<
'}'
;
30
return
os;
31
}
32
}
// namespace MathLib
WeightedPoint.h
MathLib::WeightedPoint
Definition
WeightedPoint.h:22
MathLib::WeightedPoint::getDimension
std::size_t getDimension() const
The point dimension, i.e., the number of its coordinates.
Definition
WeightedPoint.h:83
MathLib::WeightedPoint::getWeight
double getWeight() const
Definition
WeightedPoint.h:80
MathLib
Definition
CreateComponent.h:32
MathLib::operator<<
std::ostream & operator<<(std::ostream &os, const Point3d &p)
Definition
Point3d.h:92
MathLib
WeightedPoint.cpp
Generated by
1.12.0