Generated on Sat Feb 7 2015 02:01:45 for Gecode by doxygen 1.8.9.1
Gecode::Int::Arithmetic::SqrOps Class Reference

Operations for square and square-root propagators. More...

#include <arithmetic.hh>

Public Member Functions

bool even (void) const
 Return whether exponent is even. More...
 
int exp (void) const
 Return exponent. More...
 
void exp (int m)
 Set exponent to m. More...
 
template<class IntType >
IntType pow (IntType x) const
 Return $x^2$. More...
 
int tpow (int x) const
 Return $x^2$ truncated to integer limits. More...
 
int fnroot (int x) const
 Return $\lfloor \sqrt{x}\rfloor$ where x must be non-negative and $n>0$. More...
 
int cnroot (int x) const
 Return $\lceil \sqrt{x}\rceil$ where x must be non-negative and $n>0$. More...
 

Detailed Description

Operations for square and square-root propagators.

Requires

Definition at line 304 of file arithmetic.hh.

Member Function Documentation

bool Gecode::Int::Arithmetic::SqrOps::even ( void  ) const
inline

Return whether exponent is even.

Definition at line 176 of file pow-ops.hpp.

int Gecode::Int::Arithmetic::SqrOps::exp ( void  ) const
inline

Return exponent.

Definition at line 181 of file pow-ops.hpp.

void Gecode::Int::Arithmetic::SqrOps::exp ( int  m)
inline

Set exponent to m.

Definition at line 186 of file pow-ops.hpp.

template<class IntType >
IntType Gecode::Int::Arithmetic::SqrOps::pow ( IntType  x) const
inline

Return $x^2$.

Definition at line 192 of file pow-ops.hpp.

int Gecode::Int::Arithmetic::SqrOps::tpow ( int  x) const
inline

Return $x^2$ truncated to integer limits.

Definition at line 197 of file pow-ops.hpp.

int Gecode::Int::Arithmetic::SqrOps::fnroot ( int  x) const
inline

Return $\lfloor \sqrt{x}\rfloor$ where x must be non-negative and $n>0$.

Definition at line 207 of file pow-ops.hpp.

int Gecode::Int::Arithmetic::SqrOps::cnroot ( int  x) const
inline

Return $\lceil \sqrt{x}\rceil$ where x must be non-negative and $n>0$.

Definition at line 224 of file pow-ops.hpp.


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