Find the common columns between a list of domains
static function Columns(self ...$lines): self- See
demo/columns.php
Do an arithmetic operation on the start and end of all the intervals using the value at the start of the computing ($value * $this)
function computeLeft(callable $operator, MMO\math\interfaces\iSimpleDomain|int|float $value): staticDo an arithmetic operation on the start and end of oll the intervals using the value at the end of the computing ($this * $value)
function computeRight(callable $operator, MMO\math\interfaces\iSimpleDomain|int|float $value): staticTell if every value of $value is in this domain.
function contains(MMO\math\interfaces\iSimpleDomain|float $value): boolOpen and closed bounds count on both sides, and a value may span touching intervals ([1,2[u[2,3]).| $value | iSimpleDomain | float | a single value, or intervals sorted like a Domain's |
| returns | bool | false for an empty value, like Interval::contains() |
$d = new Domain([1, 2], [3, 4, false]); //[1,2]u]3,4]
$d->contains(1.5); //true
$d->contains(3.0); //false: ]3,4] excludes 3
$d->contains(new Interval(3, 4, false)); //true
$d->contains(new Domain([1, 2], [3.5, 4])); //true
Create a new Domain from this one and remove the given values
function exclude(MMO\math\interfaces\iSimpleDomain|float $value): staticCreate a new Domain of the intersection of this one and the given values
function intersect(MMO\math\interfaces\iSimpleDomain|float $value): staticCreate a new Domain of the inverse of this one
function inverse(bool $limit = false): static| $limit = false | bool | if true, will preserve the domain's limit |
| returns | static | |
Match the given value with the current domains.
function match(MMO\math\interfaces\iSimpleDomain $value, int $flags = self::ALLOW_ALL): ?array| $value | iSimpleDomain | |
| $flags = self::ALLOW_ALL | int | combination of binary flags ALLOW_* |
| returns | null | array | an array where the index is the domain index and the value is a list of value's Interval |
0
this [--] [--] [-----]
[A] [B] [C] MATCH [[A] , [B] , [C]]
[-] [-] NO MATCH
[-] [-] [-] NO MATCH
[-][-] [-] [-] NO MATCH
[---] [-] [-] NO MATCH
[--------] [-] NO MATCH
[-] [-] [-][-] NO MATCH
[---] [-] [-] [-] NO MATCHALLOW_VALUE_SPAN
this [--] [----] [---]
[-A-] [B] MATCH [[A] , [A] , [B]]
[---] [-] [-] NO MATCHALLOW_THIS_SPAN
this [------] [---]
[A] [B] [C] MATCH [[A,B] , [C]]
[----] NO MATCHALLOW_SPAN
this [------] [---]
[A] [B] [C] MATCH [[A,B] , [C]]
[A] [-B--] MATCH [[A,B] , [B]]
[-] NO MATCHALLOW_EMPTY
this [------] [---]
[A] MATCH [[A] , []]
[--] [-] NO MATCHALLOW_OVERFLOW
this [--] [---] [---]
[-A-] [B] [C] MATCH [[A] , [B] , [C]]
[------][-] [-] NO MATCHALLOW_SPAN_OVERFLOW
this [--] [---] [---]
[-A-] [B] [C] MATCH [[A] , [B] , [C]]
[-A----][B] [C] MATCH [[A], [A,B], [C]]
[---] [-] NO MATCH
[-] [-] [-] NO MATCHALLOW_ALL
this [--] [---] [---]
[-A-] [B] [C] MATCH [[A] , [B] , [C]]
[-A----][B] [C] MATCH [[A] , [A,B], [C]]
[-A-] [C] MATCH [[A] , [] , [C]]
[-] [-] [-] NO MATCH
\ArrayAccess::offsetExists
function offsetExists(mixed $offset): bool\ArrayAccess::offsetUnset
function offsetUnset(mixed $offset): voidCreate a new Domain of the union of this one and the given values
function union(MMO\math\interfaces\iSimpleDomain|float $value): static