Math_Integer
[ class tree: Math_Integer ] [ index: Math_Integer ] [ all elements ]

Source for file common.php

Documentation is available at common.php

  1. <?php
  2.  
  3. include_once 'PEAR.php';
  4.  
  5. class Math_Integer_Common {/*{{{*/
  6.  
  7.     var $_value;
  8.     
  9.     function Math_Integer_Common($value{/*{{{*/
  10.         $this->setValue($value);
  11.     }/*}}}*/
  12.  
  13.     function toString({/*{{{*/
  14.         return strval($this->_value);
  15.     }/*}}}*/
  16.  
  17.     function makeClone({/*{{{*/
  18.         return new Math_Integer_Common($this->toString());
  19.     }/*}}}*/
  20.  
  21.     function setValue($value{/*{{{*/
  22.         $this->_value $value;
  23.     }/*}}}*/
  24.  
  25.     function getValue({/*{{{*/
  26.         return $this->_value;
  27.     }/*}}}*/
  28.  
  29.     function negate({/*{{{*/
  30.         return $this->_noImplemented('negate');
  31.     }/*}}}*/
  32.  
  33.     function abs({/*{{{*/
  34.         return $this->_noImplemented('abs');
  35.     }/*}}}*/
  36.  
  37.     function fact({/*{{{*/
  38.         return $this->_noImplemented('fact');
  39.     }/*}}}*/
  40.  
  41.     function add(&$int{/*{{{*/
  42.         return $this->_noImplemented('add');
  43.     }/*}}}*/
  44.  
  45.     function inc({/*{{{*/
  46.         return $this->_noImplemented('inc');
  47.     }/*}}}*/
  48.  
  49.     function sub(&$int{/*{{{*/
  50.         return $this->_noImplemented('sub');
  51.     }/*}}}*/
  52.  
  53.     function dec({/*{{{*/
  54.         return $this->_noImplemented('dec');
  55.     }/*}}}*/
  56.  
  57.     function mul(&$int{/*{{{*/
  58.         return $this->_noImplemented('mul');
  59.     }/*}}}*/
  60.  
  61.     function div(&$int{/*{{{*/
  62.         return $this->_noImplemented('div');
  63.     }/*}}}*/
  64.  
  65.     function pow(&$int{/*{{{*/
  66.         return $this->_noImplemented('pow');
  67.     }/*}}}*/
  68.  
  69.     function powmod(&$int{/*{{{*/
  70.         return $this->_noImplemented('pow');
  71.     }/*}}}*/
  72.  
  73.     function sqrt({/*{{{*/
  74.         return $this->_noImplemented('sqrt');
  75.     }/*}}}*/
  76.  
  77.     function mod(&$int{/*{{{*/
  78.         return $this->_noImplemented('mod');
  79.     }/*}}}*/
  80.  
  81.     function compare(&$int{/*{{{*/
  82.         return $this->_noImplemented('compare');
  83.     }/*}}}*/
  84.  
  85.     function sign(&$int{/*{{{*/
  86.         return $this->_noImplemented('sign');
  87.     }/*}}}*/
  88.  
  89.     function &gcd(&$int{/*{{{*/
  90.         return $this->_noImplemented('gcd');
  91.     }/*}}}*/
  92.  
  93.     function isOdd({/*{{{*/
  94.         return $this->_noImplemented('isOdd');
  95.     }/*}}}*/
  96.  
  97.     function isEven({/*{{{*/
  98.         return $this->_noImplemented('isEven');
  99.     }/*}}}*/
  100.  
  101.     function isPositive({/*{{{*/
  102.         return $this->_noImplemented('isPositive');
  103.     }/*}}}*/
  104.  
  105.     function isNegative({/*{{{*/
  106.         return $this->_noImplemented('isNegative');
  107.     }/*}}}*/
  108.  
  109.     function isZero({/*{{{*/
  110.         return $this->_noImplemented('isZero');
  111.     }/*}}}*/
  112.  
  113.     function isPrime($reps{/*{{{*/
  114.         return $this->_noImplemented('probPrime');
  115.     }/*}}}*/
  116.  
  117.     function _is(&$obj$classname{/*{{{*/
  118.         if (!is_object($obj)) {
  119.             return false;
  120.         }
  121.         if (function_exists('is_a')) {
  122.             return is_a($obj$classname);
  123.         else {
  124.             return strtolower(get_class($obj)) == strtolower($classname);
  125.         }
  126.     }/*}}}*/
  127.  
  128.     function _notImplemented($func{/*{{{*/
  129.         return PEAR::raiseError("Method $func not implemented");
  130.     }/*}}}*/
  131. }/*}}}*/
  132.  
  133. ?>

Documentation generated on Mon, 11 Mar 2019 15:39:15 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.