Spec Splitter
Splits an interval into equal-sized subintervals.

Extends Splitter
All Extended Splitter
Defined in <seqan/parallel.h>
Signature template <typename TValue> class Splitter<TValue, Equidistant>;

Template Parameters

TValue Type of the interval boundaries.

Member Function Overview

Member Functions Inherited From Splitter

Interface Function Overview

Interface Functions Inherited From Splitter

Interface Metafunction Overview

Interface Metafunctions Inherited From Splitter

Detailed Description

This Splitter specialization divides an interval into subintervals of (almost) equal length, i.e. two subintervals differ by at most 1 in size.


Simple example for equidistant splitting.

#include <iostream>
#include <seqan/parallel.h>

using namespace seqan;

int main ()
    // instantiate a Splitter to divide the interval [10,20) in 3 subintervals
    Splitter<unsigned> splitter(10, 20, 3);

    // output all subintervals
    for (unsigned i = 0; i < length(splitter); ++i)
        std::cout << '[' << splitter[i] << ',' << splitter[i + 1] << ')' << std::endl;

    return 0;