Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
util::math::ConstantDivisor< uint32_t > Class Reference

Detailed Description

Definition at line 137 of file constant_divisor.h.

#include <constant_divisor.h>

Inheritance diagram for util::math::ConstantDivisor< uint32_t >:
util::math::internal::ConstantDivisorBase< uint32_t, uint64_t, ConstantDivisor< uint32_t > >

Public Types

using value_type = uint32_t
Public Types inherited from util::math::internal::ConstantDivisorBase< uint32_t, uint64_t, ConstantDivisor< uint32_t > >
using value_type

Public Member Functions

 ConstantDivisor (value_type denominator)
value_type div (value_type numerator) const
value_type mod (value_type n) const
Public Member Functions inherited from util::math::internal::ConstantDivisorBase< uint32_t, uint64_t, ConstantDivisor< uint32_t > >
 ConstantDivisorBase (uint64_t magic, value_type denominator)
value_type mod (value_type numerator) const
value_type denominator () const

Friends

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

Additional Inherited Members

Protected Types inherited from util::math::internal::ConstantDivisorBase< uint32_t, uint64_t, ConstantDivisor< uint32_t > >
using MagicValueType
Protected Attributes inherited from util::math::internal::ConstantDivisorBase< uint32_t, uint64_t, ConstantDivisor< uint32_t > >
uint64_t magic_

Member Typedef Documentation

◆ value_type

using util::math::ConstantDivisor< uint32_t >::value_type = uint32_t

Definition at line 141 of file constant_divisor.h.

Constructor & Destructor Documentation

◆ ConstantDivisor()

util::math::ConstantDivisor< uint32_t >::ConstantDivisor ( value_type denominator)
explicit

Definition at line 39 of file constant_divisor.cc.

Member Function Documentation

◆ div()

value_type util::math::ConstantDivisor< uint32_t >::div ( value_type numerator) const
inline

Definition at line 146 of file constant_divisor.h.

◆ mod()

value_type util::math::ConstantDivisor< uint32_t >::mod ( value_type n) const
inline

Definition at line 66 of file constant_divisor.h.

◆ operator%

value_type operator% ( value_type a,
const ConstantDivisor< uint32_t > & b )
friend

Definition at line 72 of file constant_divisor.h.

◆ operator/

value_type operator/ ( value_type a,
const ConstantDivisor< uint32_t > & b )
friend

Definition at line 68 of file constant_divisor.h.


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