Clingo
Loading...
Searching...
No Matches
CppClingo::Util::index_sequence< T > Class Template Reference

Container to store integer sequences. More...

#include <index_sequence.hh>

Classes

class  iterator
 Const iterator for index sequence. More...
 

Public Member Functions

void add (T value)
 Add an integer to the sequence.
 
void assign (T s, T e)
 Set the sequence to the interval [s, e).
 
auto operator[] (size_t index) const -> T
 Get the i-th integer in the sequence.
 
auto find (T x) const -> size_t
 Get the index of the value in the sequence.
 
auto size () const -> size_t
 Get the number of indices in the sequence.
 
auto empty () const -> bool
 Check whether the sequence is empty.
 
auto begin () const -> iterator
 Get an iterator to the beginning of the sequence.
 
auto end () const -> iterator
 Get an iterator to the end of the sequence.
 

Detailed Description

template<class T>
class CppClingo::Util::index_sequence< T >

Container to store integer sequences.

Consecutive integers are stored in an interval.

Member Function Documentation

◆ find()

template<class T >
auto CppClingo::Util::index_sequence< T >::find ( T  x) const -> size_t
inline

Get the index of the value in the sequence.

Returns size() if the value is not found.


The documentation for this class was generated from the following file: