92#ifndef __ADS_WordRangeMinimum
93 #define __ADS_WordRangeMinimum
124template<
class T ,
class Compare = std::less< T > >
179 [[nodiscard]] std::size_t
query( std::size_t i , std::size_t j )
const;
182 [[nodiscard]] std::size_t
size(
void )
const {
return( f_A.size() ); }
234 [[nodiscard]] Min better(
const Min & a ,
const Min & b )
const {
235 const bool t = f_less( b.v , a.v );
236 return( Min{ t ? b.v : a.v , t ? b.i : a.i } );
240 void stacks( std::size_t b , std::size_t n );
242 std::vector< T > f_A;
243 std::vector< std::uint64_t , HugePageAllocator< std::uint64_t > > f_M;
245 std::vector< Place , HugePageAllocator< Place > > f_P;
246 std::vector< Min , HugePageAllocator< Min > > f_S;
247 std::size_t f_blocks = 0;
260#include "ADS/search/impl/WordRangeMinimum.tpp"
The contracts of ADS: the preconditions, the postconditions and the invariants of the operations,...
The count of the items of a short array smaller than a key, the search in a node of the B-trees in ma...
An allocator for the large blocks of a structure, beyond the book: a request of at least one huge pag...
The primitives of the processor that the compilers spell each in their own way, in one form for all: ...
The range minimum query, beyond the book: given an array of items of an ordered universe,...
const_iterator iterator
the same, constant
Definition WordRangeMinimum.h:199
std::size_t query(std::size_t i, std::size_t j) const
the place of the leftmost minimum of ,
std::size_t size_type
the type of the sizes
Definition WordRangeMinimum.h:193
std::size_t size(void) const
the number of the items
Definition WordRangeMinimum.h:182
const T & operator[](std::size_t i) const
the item of place
const T & const_reference
a reference to an item
Definition WordRangeMinimum.h:195
const_iterator begin(void) const
the first item
Definition WordRangeMinimum.h:202
std::ptrdiff_t difference_type
the type of the distances
Definition WordRangeMinimum.h:194
WordRangeMinimum(std::vector< T > A, Compare less={})
the structure on , in
const_iterator end(void) const
past the last item
Definition WordRangeMinimum.h:204
const_reference reference
the same, constant
Definition WordRangeMinimum.h:196
typename std::vector< T >::const_iterator const_iterator
an iterator on the items
Definition WordRangeMinimum.h:197
WordRangeMinimum(void)=default
an empty structure
const_iterator cend(void) const
past the last item
Definition WordRangeMinimum.h:208
T value_type
the type of the items
Definition WordRangeMinimum.h:192
const_iterator cbegin(void) const
the first item
Definition WordRangeMinimum.h:206
#define ADS_NO_UNIQUE_ADDRESS
an empty member that takes no storage, by the attribute that does so (the standard one is accepted bu...
Definition Portable.h:81