47 double halfYneg,
double halfYpos) noexcept(
false)
48 :
m_values({halfXnegY, halfXzeroY, halfXposY, halfYneg, halfYpos}),
76 std::vector<double>
values()
const final;
96 std::vector<Vector2D>
vertices(
unsigned int lseg = 1)
const final;
104 std::ostream&
toStream(std::ostream& sl)
const final;
120 std::vector<double> valvector;
121 valvector.insert(valvector.begin(), m_values.begin(), m_values.end());
126 if (std::any_of(m_values.begin(), m_values.end(),
127 [](
auto v) {
return v <= 0.; })) {
128 throw std::invalid_argument(
"DiamondBounds: negative half length.");
132 throw std::invalid_argument(
"DiamondBounds: not a diamond shape.");