21 template<
typename Head,
typename... Tail>
class MergePath<Head, Tail...> {
27 return mHead.generate();
28 return mTail.generate() + mHeadVertexCount;
31 [[nodiscard]]
bool done() const noexcept {
return mAllDone; }
39 mAllDone = mTail.done() && mHead.done();
51 : mHead{path.mHead.triangles()},
52 mTail(path.mTail.triangles()), mHeadVertexCount{
count(path.mHead.vertices())}, mAllDone{mTail.done() && mHead.done()} {}
61 return mHead.generate();
62 return mTail.generate();
65 [[nodiscard]]
bool done() const noexcept {
return mAllDone; }
73 mAllDone = mTail.done() && mHead.done();
81 Vertices(
const MergePath& path) : mHead{path.mHead.vertices()}, mTail(path.mTail.vertices()), mAllDone{mTail.done() && mHead.done()} {}
86 MergePath(Head head, Tail... tail) : mHead{head}, mTail{tail...} {}
Will have a type named "Type" that has same type as value returned by method edges() for type Primiti...
Definition Utility.hpp:23
Empty path with zero vertices and edges.
Definition EmptyPath.hpp:17
EdgeGeneratorType< MergePath< Tail... > >::type mTail
Definition MergePath.hpp:44
int mHeadVertexCount
Definition MergePath.hpp:46
void next()
Definition MergePath.hpp:33
Edges(const MergePath &path)
Definition MergePath.hpp:50
EdgeGeneratorType< Head >::type mHead
Definition MergePath.hpp:43
Edge generate() const
Definition MergePath.hpp:25
bool mAllDone
Definition MergePath.hpp:48
bool done() const noexcept
Definition MergePath.hpp:31
void next()
Definition MergePath.hpp:67
bool done() const noexcept
Definition MergePath.hpp:65
PathVertex generate() const
Definition MergePath.hpp:59
VertexGeneratorType< Head >::type mHead
Definition MergePath.hpp:77
VertexGeneratorType< MergePath< Tail... > >::type mTail
Definition MergePath.hpp:78
bool mAllDone
Definition MergePath.hpp:79
MergePath(Head head, Tail... tail)
Definition MergePath.hpp:86
Vertices vertices() const noexcept
Definition MergePath.hpp:90
Head mHead
Definition MergePath.hpp:93
Edges edges() const noexcept
Definition MergePath.hpp:88
MergePath< Tail... > mTail
Definition MergePath.hpp:94
Merges (concatenates) multiple paths together.
Definition MergePath.hpp:17
Definition PathVertex.hpp:14
Will have a type named "Type" that has same type as value returned by method vertices() for type Prim...
Definition Utility.hpp:37
Definition AnyGenerator.hpp:12
MergePath< Path... > mergePath(Path... paths)
Definition MergePath.hpp:97
constexpr CountAlgorithmFunctor count
Returns the number of elements matching an element.
Definition Count.hpp:82
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25