souffle  2.0.2-371-g6315b36
Public Member Functions | Data Fields
souffle::range< Iter > Struct Template Reference

A utility class enabling representation of ranges by pairing two iterator instances marking lower and upper boundaries. More...

#include <ContainerUtil.h>

Collaboration diagram for souffle::range< Iter >:
Collaboration graph

Public Member Functions

Iter & begin ()
 
const Iter & begin () const
 
bool empty () const
 
Iter & end ()
 
const Iter & end () const
 
rangeoperator= (const range &)=default
 
std::vector< rangepartition (int np=100)
 
 range (const range &)=default
 
 range (Iter a, Iter b)
 
 range (range &&)=default
 

Data Fields

Iter a
 
Iter b
 

Detailed Description

template<typename Iter>
struct souffle::range< Iter >

A utility class enabling representation of ranges by pairing two iterator instances marking lower and upper boundaries.

Definition at line 313 of file ContainerUtil.h.

Constructor & Destructor Documentation

◆ range() [1/3]

template<typename Iter >
souffle::range< Iter >::range ( Iter  a,
Iter  b 
)
inline

Definition at line 318 of file ContainerUtil.h.

320 {

Referenced by souffle::SingleValueIterator< T >::operator++().

◆ range() [2/3]

template<typename Iter >
souffle::range< Iter >::range ( const range< Iter > &  )
default

◆ range() [3/3]

template<typename Iter >
souffle::range< Iter >::range ( range< Iter > &&  )
default

Member Function Documentation

◆ begin() [1/2]

template<typename Iter >
Iter& souffle::range< Iter >::begin ( )
inline

Definition at line 326 of file ContainerUtil.h.

328  {

◆ begin() [2/2]

template<typename Iter >
const Iter& souffle::range< Iter >::begin ( ) const
inline

Definition at line 329 of file ContainerUtil.h.

331  {

◆ empty()

template<typename Iter >
bool souffle::range< Iter >::empty ( ) const
inline

Definition at line 342 of file ContainerUtil.h.

344  {

◆ end() [1/2]

template<typename Iter >
Iter& souffle::range< Iter >::end ( )
inline

Definition at line 334 of file ContainerUtil.h.

336  {

◆ end() [2/2]

template<typename Iter >
const Iter& souffle::range< Iter >::end ( ) const
inline

Definition at line 337 of file ContainerUtil.h.

◆ operator=()

template<typename Iter >
range& souffle::range< Iter >::operator= ( const range< Iter > &  )
default

◆ partition()

template<typename Iter >
std::vector<range> souffle::range< Iter >::partition ( int  np = 100)
inline

Definition at line 347 of file ContainerUtil.h.

357  {
358  ++cur;
359  i++;
360  if (i >= (s + (p < r ? 1 : 0))) {
361  res.push_back({last, cur});
362  last = cur;
363  p++;
364  i = 0;
365  }
366  }
367  if (cur != last) {
368  res.push_back({last, cur});
369  }
370  return res;
371  }
372 };
373 
374 /**
375  * A utility function enabling the construction of ranges
376  * without explicitly specifying the iterator type.
377  *

Referenced by TEST().

Field Documentation

◆ a

template<typename Iter >
Iter souffle::range< Iter >::a

◆ b

template<typename Iter >
Iter souffle::range< Iter >::b

Definition at line 315 of file ContainerUtil.h.

Referenced by souffle::SingleValueIterator< T >::operator++().


The documentation for this struct was generated from the following file:
i
size_t i
Definition: json11.h:663
p
a horizontalBars(j=m=void 0===a.axisX.type?new c.AutoScaleAxis(c.Axis.units.x, b.normalized.series, o, c.extend({}, a.axisX,{highLow:d, referenceValue:0})):a.axisX.type.call(c, c.Axis.units.x, b.normalized.series, o, c.extend({}, a.axisX,{highLow:d, referenceValue:0})), l=n=void 0===a.axisY.type?new c.StepAxis(c.Axis.units.y, b.normalized.series, o,{ticks:k}):a.axisY.type.call(c, c.Axis.units.y, b.normalized.series, o, a.axisY)) var p
Definition: htmlJsChartistMin.h:15