Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/split-splice.hpp"
Implementation of »SplitSplice« algorithm.
Descriptor and working context to split/splice in a new Interval. The »Split-Splice« algorithm works on a seamless segmentation of an ordered working axis, represented as sequence of intervals. The purpose is to integrate a new Segment / interval, thereby truncating / splitting / filling adjacent intervals to fit
Definition at line 115 of file split-splice.hpp.
Public Member Functions | |
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. More... | |
void | determineRelations () |
Stage-3 of the algorithm works out the precise relation of the predecessor and successor segments to determine necessary adjustments. More... | |
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 end point of the new segment. More... | |
std::array< POS, 3 > | performSplitSplice () |
Stage-4 of the algorithm performs the actual insert and deleting of segments. More... | |
Classes | |
struct | SegBounds |
Private Types | |
using | OptORD = std::optional< ORD > |
enum | Verb { NIL, DROP, TRUNC, INS_NOP, SEAMLESS } |
Private Attributes | |
const ORD | AXIS_END |
struct lib::splitsplice::Algo::SegBounds | b_ |
CLONE | cloneSeg |
CREATE | createSeg |
DELETE | discard |
EMPTY | emptySeg |
AFTER | getAfter |
START | getStart |
Verb | opPred_ = NIL |
Verb | opSucc_ = NIL |
POS | pred_ |
POS | succ_ |
Additional Inherited Members | |
Private Member Functions inherited from NonCopyable | |
NonCopyable (NonCopyable const &)=delete | |
NonCopyable & | operator= (NonCopyable const &)=delete |
struct lib::splitsplice::Algo::SegBounds |
|
inline |
Setup for a single SplitSplice-operation to insert a new segment start to after.
startAll | (forward) iterator pointing at the overall Segmentation begin |
afterAll | (forward) iterator indicating point-after-end of Segmentation |
start | (optional) specification of new segment's start point |
after | (optional) specification of new segment's end point |
Definition at line 166 of file split-splice.hpp.
References Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::establishSplitPoint().
|
inline |
Stage-1 and Stage-2 of the algorithm determine the insert point and establish the actual start and end point of the new segment.
Definition at line 200 of file split-splice.hpp.
Referenced by Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::Algo().
|
inline |
Stage-3 of the algorithm works out the precise relation of the predecessor and successor segments to determine necessary adjustments.
Definition at line 240 of file split-splice.hpp.
|
inline |
Stage-4 of the algorithm performs the actual insert and deleting of segments.
(s,n,e)
to indicate where changes happenedend()
) Definition at line 300 of file split-splice.hpp.