71#ifndef LIB_SPLIT_SPLICE_H
72#define LIB_SPLIT_SPLICE_H
88 namespace splitsplice {
160 ,CREATE fun_createSeg
165 ,POS startAll, POS afterAll
179 ENSURE (
pred_ != afterAll);
180 ENSURE (
succ_ != afterAll);
195 ORD sep = start? *start
206 REQUIRE (
pred_ !=
succ_,
"non-empty segmentation required");
212 ORD startSeg = start? *start
215 ORD afterSeg = after? *after
218 ENSURE (startSeg != afterSeg);
219 if (startSeg < afterSeg)
220 return {startSeg,afterSeg};
222 return {afterSeg,startSeg};
254 REQUIRE (startPred ==
b_.
start,
"predecessor does not precede start point");
270 ,
"seamless segmentation");
Implementation of »SplitSplice« algorithm.
std::array< POS, 3 > performSplitSplice()
Stage-4 of the algorithm performs the actual insert and deleting of segments.
SegBounds establishSplitPoint(POS startAll, POS afterAll, OptORD start, OptORD after)
Stage-1 and Stage-2 of the algorithm determine the insert point and establish the actual start and en...
void determineRelations()
Stage-3 of the algorithm works out the precise relation of the predecessor and successor segments to ...
std::optional< ORD > OptORD
struct lib::splitsplice::Algo::SegBounds b_
Algo(START fun_getStart, AFTER fun_getAfter, CREATE fun_createSeg, EMPTY fun_emptySeg, CLONE fun_cloneSeg, DELETE fun_discard, const ORD axisEnd, POS startAll, POS afterAll, OptORD start, OptORD after)
Setup for a single SplitSplice-operation to insert a new segment start to after.
Any copy and copy construction prohibited.
Lumiera error handling (C++ interface).
Metaprogramming tools for detecting and transforming function types.
#define ASSERT_VALID_SIGNATURE(_FUN_, _SIG_)
Macro for a compile-time check to verify the given generic functors or lambdas expose some expected s...
Implementation namespace for support and library code.
Mix-Ins to allow or prohibit various degrees of copying and cloning.
a family of time value like entities and their relationships.