![]() |
Lumiera 0.pre.04
»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 107 of file split-splice.hpp.
Classes | |
| struct | SegBounds |
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. | |
| 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. | |
| void | determineRelations () |
| Stage-3 of the algorithm works out the precise relation of the predecessor and successor segments to determine necessary adjustments. | |
| std::array< POS, 3 > | performSplitSplice () |
| Stage-4 of the algorithm performs the actual insert and deleting of segments. | |
Private Types | |
| enum | Verb { NIL , DROP , TRUNC , INS_NOP , SEAMLESS } |
| using | OptORD = std::optional< ORD > |
Private Attributes | |
| START | getStart |
| AFTER | getAfter |
| CREATE | createSeg |
| EMPTY | emptySeg |
| CLONE | cloneSeg |
| DELETE | discard |
| const ORD | AXIS_END |
| POS | pred_ |
| POS | succ_ |
| struct lib::splitsplice::Algo::SegBounds | b_ |
| Verb | opPred_ = NIL |
| Verb | opSucc_ = NIL |
Additional Inherited Members | |
Private Member Functions inherited from NonCopyable | |
| ~NonCopyable ()=default | |
| NonCopyable ()=default | |
| NonCopyable (NonCopyable const &)=delete | |
| NonCopyable & | operator= (NonCopyable const &)=delete |
|
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 158 of file split-splice.hpp.
References Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::SegBounds::after, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::b_, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::getStart, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::pred_, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::SegBounds::start, and Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::succ_.
| struct lib::splitsplice::Algo::SegBounds |
|
private |
Definition at line 126 of file split-splice.hpp.
|
private |
| Enumerator | |
|---|---|
| NIL | |
| DROP | |
| TRUNC | |
| INS_NOP | |
| SEAMLESS | |
Definition at line 140 of file split-splice.hpp.
|
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 192 of file split-splice.hpp.
References Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::AXIS_END, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::getAfter, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::getStart, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::pred_, and Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::succ_.
|
inline |
Stage-3 of the algorithm works out the precise relation of the predecessor and successor segments to determine necessary adjustments.
Definition at line 232 of file split-splice.hpp.
References Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::SegBounds::after, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::b_, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::DROP, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::getAfter, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::getStart, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::INS_NOP, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::opPred_, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::opSucc_, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::pred_, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::SEAMLESS, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::SegBounds::start, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::succ_, and Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::TRUNC.
|
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 292 of file split-splice.hpp.
References Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::SegBounds::after, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::b_, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::cloneSeg, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::createSeg, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::discard, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::DROP, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::emptySeg, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::getAfter, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::getStart, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::INS_NOP, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::NIL, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::opPred_, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::opSucc_, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::pred_, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::SEAMLESS, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::SegBounds::start, Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::succ_, and Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::TRUNC.
|
private |
Definition at line 119 of file split-splice.hpp.
Referenced by Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::Algo(), Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::determineRelations(), Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::establishSplitPoint(), and Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::performSplitSplice().
|
private |
Definition at line 120 of file split-splice.hpp.
Referenced by Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::determineRelations(), Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::establishSplitPoint(), and Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::performSplitSplice().
|
private |
Definition at line 121 of file split-splice.hpp.
Referenced by Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::performSplitSplice().
|
private |
Definition at line 122 of file split-splice.hpp.
Referenced by Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::performSplitSplice().
|
private |
Definition at line 123 of file split-splice.hpp.
Referenced by Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::performSplitSplice().
|
private |
Definition at line 124 of file split-splice.hpp.
Referenced by Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::performSplitSplice().
|
private |
Definition at line 127 of file split-splice.hpp.
Referenced by Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::establishSplitPoint().
|
private |
Definition at line 132 of file split-splice.hpp.
Referenced by Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::Algo(), Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::determineRelations(), Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::establishSplitPoint(), and Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::performSplitSplice().
|
private |
Definition at line 132 of file split-splice.hpp.
Referenced by Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::Algo(), Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::determineRelations(), Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::establishSplitPoint(), and Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::performSplitSplice().
|
private |
|
private |
Definition at line 147 of file split-splice.hpp.
Referenced by Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::determineRelations(), and Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::performSplitSplice().
|
private |
Definition at line 148 of file split-splice.hpp.
Referenced by Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::determineRelations(), and Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >::performSplitSplice().
Inheritance diagram for Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >:
Collaboration diagram for Algo< ORD, POS, START, AFTER, CREATE, EMPTY, CLONE, DELETE >: