Lumiera  0.pre.03
»edit your freedom«
lib::test::anonymous_namespace{split-splice-test.cpp} Namespace Reference

Typedefs

using Iter = typename SegL::iterator
 
using OptInt = std::optional< int >
 

Classes

struct  Seg
 Test Dummy: a "segment" representing an integer interval. More...
 
struct  SegL
 Test-Segmentation comprised of a sequence of Seg entries. More...
 

Functions

auto invokeSplitSplice (SegL &segs, OptInt startNew, OptInt afterNew)
 Perform the »SplitSplice« Algorithm to splice a new Segment into the given segmentation of the integer-axis. More...
 

Variables

const int SMAX = +100
 
const int SMIN = -100
 

Function Documentation

◆ invokeSplitSplice()

auto lib::test::anonymous_namespace{split-splice-test.cpp}::invokeSplitSplice ( SegL segs,
OptInt  startNew,
OptInt  afterNew 
)

Perform the »SplitSplice« Algorithm to splice a new Segment into the given segmentation of the integer-axis.

A local λ-binding is setup to define the basic operations required by the algorithm implementation to work with this specific kind of data.

Returns
Tuple (s,n,e) to indicate where changes happened
  • s the first changed element
  • n the new main segment (may be identical to s)
  • e the first unaltered element after the changed range (may be end())
See also
lib::splitsplice::Algo
setup for the Fixture-Segmentation

Definition at line 240 of file split-splice-test.cpp.