Numeric interval implementation and accompanying utility methods. More...
Public Member Functions | |
__construct ($min=null, $max=null) | |
getMin () | |
setMin ($min=null) | |
getMax () | |
setMax ($max=null) | |
toString ($from= 'от', $to= 'до') | |
atavism wrt BC | |
divide ($factor, $precision=null) | |
multiply ($multiplier) | |
equals (BaseRange $range) | |
intersects (BaseRange $range) | |
isEmpty () | |
Static Public Member Functions | |
static | lazyCreate ($min=null, $max=null) |
static | swap (&$a, &$b) |
Protected Attributes | |
$min = null | |
$max = null |
Numeric interval implementation and accompanying utility methods.
Definition at line 17 of file BaseRange.class.php.
BaseRange::__construct | ( | $ | min = null , |
|
$ | max = null | |||
) |
Reimplemented in FloatRange, and Range.
Definition at line 22 of file BaseRange.class.php.
BaseRange::divide | ( | $ | factor, | |
$ | precision = null | |||
) |
Definition at line 98 of file BaseRange.class.php.
BaseRange::equals | ( | BaseRange $ | range | ) |
Definition at line 123 of file BaseRange.class.php.
References getMax(), and getMin().
BaseRange::getMax | ( | ) |
Definition at line 60 of file BaseRange.class.php.
Referenced by PrimitiveRange::checkLimits(), IntegerSet::contains(), equals(), and intersects().
BaseRange::getMin | ( | ) |
Definition at line 39 of file BaseRange.class.php.
Referenced by PrimitiveRange::checkLimits(), IntegerSet::contains(), equals(), and intersects().
BaseRange::intersects | ( | BaseRange $ | range | ) |
Definition at line 129 of file BaseRange.class.php.
References getMax(), and getMin().
BaseRange::isEmpty | ( | ) |
Definition at line 135 of file BaseRange.class.php.
static BaseRange::lazyCreate | ( | $ | min = null , |
|
$ | max = null | |||
) | [static] |
Definition at line 31 of file BaseRange.class.php.
References $max, $min, and swap().
Referenced by PrimitiveRange::importMarried(), and PrimitiveRange::importSingle().
BaseRange::multiply | ( | $ | multiplier | ) |
Definition at line 112 of file BaseRange.class.php.
BaseRange::setMax | ( | $ | max = null |
) |
WrongArgumentException |
Reimplemented in FloatRange, and Range.
Definition at line 69 of file BaseRange.class.php.
References $max.
BaseRange::setMin | ( | $ | min = null |
) |
WrongArgumentException |
Reimplemented in FloatRange, and Range.
Definition at line 48 of file BaseRange.class.php.
References $min.
static BaseRange::swap | ( | &$ | a, | |
&$ | b | |||
) | [static] |
Definition at line 142 of file BaseRange.class.php.
Referenced by lazyCreate().
BaseRange::toString | ( | $ | from = 'от' , |
|
$ | to = 'до' | |||
) |
atavism wrt BC
Definition at line 82 of file BaseRange.class.php.
BaseRange::$max = null [protected] |
Definition at line 20 of file BaseRange.class.php.
Referenced by Range::__construct(), FloatRange::__construct(), __construct(), Range::create(), IntegerSet::create(), FloatRange::create(), lazyCreate(), Range::setMax(), FloatRange::setMax(), and setMax().
BaseRange::$min = null [protected] |
Definition at line 19 of file BaseRange.class.php.
Referenced by Range::__construct(), FloatRange::__construct(), __construct(), Range::create(), IntegerSet::create(), FloatRange::create(), lazyCreate(), Range::setMin(), FloatRange::setMin(), and setMin().