OGS
WeightedPoint.cpp
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2
// SPDX-License-Identifier: BSD-3-Clause
3
4
#include "
WeightedPoint.h
"
5
6
#include <ostream>
7
8
namespace
MathLib
9
{
10
// Used to output helpful information if the unit tests fail.
11
std::ostream&
operator<<
(std::ostream& os,
MathLib::WeightedPoint
const
& wp)
12
{
13
auto
const
dim = wp.
getDimension
();
14
os <<
"WP["
<< dim <<
"D]{{"
;
15
for
(std::size_t comp = 0; comp < 3; ++comp)
16
{
17
if
(comp != 0)
18
{
19
os <<
", "
;
20
}
21
os << wp[comp];
22
}
23
os <<
"}, weight="
<< wp.
getWeight
() <<
'}'
;
24
return
os;
25
}
26
}
// namespace MathLib
WeightedPoint.h
MathLib::WeightedPoint
Definition
WeightedPoint.h:16
MathLib::WeightedPoint::getWeight
constexpr double getWeight() const
Definition
WeightedPoint.h:76
MathLib::WeightedPoint::getDimension
constexpr std::size_t getDimension() const
The point dimension, i.e., the number of its coordinates.
Definition
WeightedPoint.h:79
MathLib
Definition
CreateComponent.h:23
MathLib::operator<<
std::ostream & operator<<(std::ostream &os, const Point3d &p)
Definition
Point3d.h:83
MathLib
WeightedPoint.cpp
Generated by
1.14.0