Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/muellan/sequence
Header-only sequence generators for C++14
https://github.com/muellan/sequence
cpp cpp14 generator header-only sequence
Last synced: 15 days ago
JSON representation
Header-only sequence generators for C++14
- Host: GitHub
- URL: https://github.com/muellan/sequence
- Owner: muellan
- License: mit
- Created: 2017-11-10T16:44:57.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-10T16:45:16.000Z (over 7 years ago)
- Last Synced: 2024-11-28T22:33:10.265Z (2 months ago)
- Topics: cpp, cpp14, generator, header-only, sequence
- Language: C++
- Size: 39.1 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
AM sequence
==========Header-only collection of sequence generators for C++14.
## Quick Overview
### Sequences
- ```linear_sequence```
- ```ascending_sequence```
- ```descending_sequence```
- ```geometric_sequence```
- ```fibonacci_sequence```- ```replica_sequence```
sequence of n times the same element- ```interleaved_bit_sequence```
interleaved 1s/true values with an initial offset
e.g. {.........1....1....1....1....1....1}### Sequence Decorators
- ```repeated``` repeats an underlying sequence several times
- ```combined``` concatenates two sequences
## Interfaces
A sequence generator acts similar to ```InputIterator``` and ```InputRange```.
Minimum common interface:
```cpp
//current value
value_type Sequence::operator * ();//forward to next value
Sequence& Sequence::operator ++ ();//range adaption
auto Sequence::begin(); //at current value
auto Sequence::end(); //one after the last value
```## Requirements
Requires C++14 conforming compiler.
Tested with g++ 6.1