Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::CachedLog Class Reference

#include <cached_log.h>

Public Member Functions

 CachedLog ()
 
 CachedLog (const CachedLog &)=delete
 This type is neither copyable nor movable.
 
CachedLogoperator= (const CachedLog &)=delete
 
 ~CachedLog ()
 
void Init (int cache_size)
 This method can only be called once, and with a cache_size > 0.
 
double Log2 (int64_t input) const
 Returns the log2 of 'input'.
 

Detailed Description

This class is used when manipulating search space estimations. It provides fast access to log of a domain size. Future Extensions:

  • Sum of log on an array.
  • Sum of log on an array with callback.

Definition at line 27 of file cached_log.h.

Constructor & Destructor Documentation

◆ CachedLog() [1/2]

operations_research::CachedLog::CachedLog ( )

Definition at line 20 of file cached_log.cc.

◆ CachedLog() [2/2]

operations_research::CachedLog::CachedLog ( const CachedLog & )
delete

This type is neither copyable nor movable.

◆ ~CachedLog()

operations_research::CachedLog::~CachedLog ( )

Definition at line 22 of file cached_log.cc.

Member Function Documentation

◆ Init()

void operations_research::CachedLog::Init ( int cache_size)

This method can only be called once, and with a cache_size > 0.

Definition at line 34 of file cached_log.cc.

◆ Log2()

double operations_research::CachedLog::Log2 ( int64_t input) const

Returns the log2 of 'input'.

Definition at line 43 of file cached_log.cc.

◆ operator=()

CachedLog & operations_research::CachedLog::operator= ( const CachedLog & )
delete

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