Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
util::math::internal::ConstantDivisorBase< T, MagicT, Impl > Class Template Reference

Common code for all specializations. More...

#include <constant_divisor.h>

Public Types

using value_type = T
 

Public Member Functions

 ConstantDivisorBase (MagicT magic, value_type denominator)
 
value_type mod (value_type numerator) const
 
value_type denominator () const
 

Protected Types

using MagicValueType = MagicT
 

Protected Attributes

MagicT magic_
 

Friends

value_type operator/ (value_type a, const Impl &b)
 
value_type operator% (value_type a, const Impl &b)
 

Detailed Description

template<typename T, typename MagicT, typename Impl>
class util::math::internal::ConstantDivisorBase< T, MagicT, Impl >

Common code for all specializations.

Definition at line 84 of file constant_divisor.h.

Member Typedef Documentation

◆ MagicValueType

template<typename T, typename MagicT, typename Impl>
using util::math::internal::ConstantDivisorBase< T, MagicT, Impl >::MagicValueType = MagicT
protected

Definition at line 103 of file constant_divisor.h.

◆ value_type

template<typename T, typename MagicT, typename Impl>
using util::math::internal::ConstantDivisorBase< T, MagicT, Impl >::value_type = T

Definition at line 86 of file constant_divisor.h.

Constructor & Destructor Documentation

◆ ConstantDivisorBase()

template<typename T, typename MagicT, typename Impl>
util::math::internal::ConstantDivisorBase< T, MagicT, Impl >::ConstantDivisorBase ( MagicT magic,
value_type denominator )
inlineexplicit

Definition at line 88 of file constant_divisor.h.

Member Function Documentation

◆ denominator()

template<typename T, typename MagicT, typename Impl>
value_type util::math::internal::ConstantDivisorBase< T, MagicT, Impl >::denominator ( ) const
inline

Definition at line 100 of file constant_divisor.h.

◆ mod()

template<typename T, typename MagicT, typename Impl>
value_type util::math::internal::ConstantDivisorBase< T, MagicT, Impl >::mod ( value_type numerator) const
inline

Definition at line 91 of file constant_divisor.h.

Friends And Related Symbol Documentation

◆ operator%

template<typename T, typename MagicT, typename Impl>
value_type operator% ( value_type a,
const Impl & b )
friend

Definition at line 98 of file constant_divisor.h.

◆ operator/

template<typename T, typename MagicT, typename Impl>
value_type operator/ ( value_type a,
const Impl & b )
friend

Definition at line 96 of file constant_divisor.h.

Member Data Documentation

◆ magic_

template<typename T, typename MagicT, typename Impl>
MagicT util::math::internal::ConstantDivisorBase< T, MagicT, Impl >::magic_
protected

Definition at line 105 of file constant_divisor.h.


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