Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::RangeMinimumIndexQuery< T, Compare > Class Template Reference

#include <range_minimum_query.h>

Public Member Functions

 RangeMinimumIndexQuery (std::vector< T > array)
 RangeMinimumIndexQuery implementation.
 
 RangeMinimumIndexQuery (std::vector< T > array, Compare cmp)
 
 RangeMinimumIndexQuery (const RangeMinimumIndexQuery &)=delete
 This type is neither copyable nor movable.
 
RangeMinimumIndexQueryoperator= (const RangeMinimumIndexQuery &)=delete
 
int GetMinimumIndexFromRange (int from, int to) const
 
const std::vector< T > & array () const
 Returns the original array.
 

Detailed Description

template<typename T, typename Compare = std::less<T>>
class operations_research::RangeMinimumIndexQuery< T, Compare >

RangeMinimumIndexQuery is similar to RangeMinimumQuery, but GetMinimumIndexFromRange returns the index for which the minimum is attained.

Definition at line 70 of file range_minimum_query.h.

Constructor & Destructor Documentation

◆ RangeMinimumIndexQuery() [1/3]

template<typename T , typename Compare >
operations_research::RangeMinimumIndexQuery< T, Compare >::RangeMinimumIndexQuery ( std::vector< T > array)
inlineexplicit

RangeMinimumIndexQuery implementation.

Definition at line 144 of file range_minimum_query.h.

◆ RangeMinimumIndexQuery() [2/3]

template<typename T , typename Compare >
operations_research::RangeMinimumIndexQuery< T, Compare >::RangeMinimumIndexQuery ( std::vector< T > array,
Compare cmp )

Definition at line 149 of file range_minimum_query.h.

◆ RangeMinimumIndexQuery() [3/3]

template<typename T , typename Compare = std::less<T>>
operations_research::RangeMinimumIndexQuery< T, Compare >::RangeMinimumIndexQuery ( const RangeMinimumIndexQuery< T, Compare > & )
delete

This type is neither copyable nor movable.

Member Function Documentation

◆ array()

template<typename T , typename Compare >
const std::vector< T > & operations_research::RangeMinimumIndexQuery< T, Compare >::array ( ) const
inline

Returns the original array.

Definition at line 174 of file range_minimum_query.h.

◆ GetMinimumIndexFromRange()

template<typename T , typename Compare >
int operations_research::RangeMinimumIndexQuery< T, Compare >::GetMinimumIndexFromRange ( int from,
int to ) const
inline

Returns an index idx from [from, to) such that arr[idx] is the minimum value of arr over the interval [from, to).

Definition at line 155 of file range_minimum_query.h.

◆ operator=()

template<typename T , typename Compare = std::less<T>>
RangeMinimumIndexQuery & operations_research::RangeMinimumIndexQuery< T, Compare >::operator= ( const RangeMinimumIndexQuery< T, Compare > & )
delete

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