TTK
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
ttk::RangeMinimumQuery< DataType > Class Template Reference

Class to answer range minimum queries in an array in constant time after a linearithmic time preprocess. More...

#include <RangeMinimumQuery.h>

Inheritance diagram for ttk::RangeMinimumQuery< DataType >:
ttk::Debug ttk::BaseClass

Public Member Functions

 RangeMinimumQuery ()
 
 RangeMinimumQuery (std::vector< DataType > &input)
 
void setVector (std::vector< DataType > &input)
 
int preprocess (const bool silent=false)
 
int query (int i, int j) const
 
- Public Member Functions inherited from ttk::Debug
 Debug ()
 
 ~Debug () override
 
virtual int setDebugLevel (const int &debugLevel)
 
int setWrapper (const Wrapper *wrapper) override
 
int printMsg (const std::string &msg, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::vector< std::string > &msgs, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printErr (const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
 
int printWrn (const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const int &threads, const double &memory, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const int &threads, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const debug::Priority &priority, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::vector< std::vector< std::string > > &rows, const debug::Priority &priority=debug::Priority::INFO, const bool hasHeader=true, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const debug::Separator &separator, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::INFO, std::ostream &stream=std::cout) const
 
int printMsg (const debug::Separator &separator, const debug::Priority &priority, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const debug::Separator &separator, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::INFO, std::ostream &stream=std::cout) const
 
void setDebugMsgPrefix (const std::string &prefix)
 
- Public Member Functions inherited from ttk::BaseClass
 BaseClass ()
 
virtual ~BaseClass ()=default
 
int getThreadNumber () const
 
virtual int setThreadNumber (const int threadNumber)
 

Protected Attributes

DataType * input_ {}
 
DataType * input_end_ {}
 
std::vector< std::vector< int > > table_ {}
 
- Protected Attributes inherited from ttk::Debug
int debugLevel_
 
std::string debugMsgPrefix_
 
std::string debugMsgNamePrefix_
 
- Protected Attributes inherited from ttk::BaseClass
bool lastObject_
 
int threadNumber_
 
Wrapperwrapper_
 

Additional Inherited Members

- Protected Member Functions inherited from ttk::Debug
int printMsgInternal (const std::string &msg, const std::string &right, const std::string &filler, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsgInternal (const std::string &msg, const debug::Priority &priority, const debug::LineMode &lineMode, std::ostream &stream=std::cout) const
 
int welcomeMsg (std::ostream &stream)
 
- Static Protected Attributes inherited from ttk::Debug
static COMMON_EXPORTS debug::LineMode lastLineMode = ttk::debug::LineMode::NEW
 

Detailed Description

template<class DataType>
class ttk::RangeMinimumQuery< DataType >

Class to answer range minimum queries in an array in constant time after a linearithmic time preprocess.

Author
Michael Michaux micha.nosp@m.uxmi.nosp@m.chael.nosp@m.89@g.nosp@m.mail..nosp@m.com
Date
August 2016.

Definition at line 22 of file RangeMinimumQuery.h.

Constructor & Destructor Documentation

◆ RangeMinimumQuery() [1/2]

template<class DataType >
ttk::RangeMinimumQuery< DataType >::RangeMinimumQuery ( )

Definition at line 50 of file RangeMinimumQuery.h.

◆ RangeMinimumQuery() [2/2]

template<class DataType >
ttk::RangeMinimumQuery< DataType >::RangeMinimumQuery ( std::vector< DataType > &  input)

Definition at line 54 of file RangeMinimumQuery.h.

Member Function Documentation

◆ preprocess()

template<class DataType >
int ttk::RangeMinimumQuery< DataType >::preprocess ( const bool  silent = false)

Definition at line 61 of file RangeMinimumQuery.h.

◆ query()

template<class DataType >
int ttk::RangeMinimumQuery< DataType >::query ( int  i,
int  j 
) const

Definition at line 100 of file RangeMinimumQuery.h.

◆ setVector()

template<class DataType >
void ttk::RangeMinimumQuery< DataType >::setVector ( std::vector< DataType > &  input)
inline

Definition at line 27 of file RangeMinimumQuery.h.

Member Data Documentation

◆ input_

template<class DataType >
DataType* ttk::RangeMinimumQuery< DataType >::input_ {}
protected

Definition at line 37 of file RangeMinimumQuery.h.

◆ input_end_

template<class DataType >
DataType* ttk::RangeMinimumQuery< DataType >::input_end_ {}
protected

Definition at line 38 of file RangeMinimumQuery.h.

◆ table_

template<class DataType >
std::vector<std::vector<int> > ttk::RangeMinimumQuery< DataType >::table_ {}
protected

Definition at line 41 of file RangeMinimumQuery.h.


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