MathPHP\SetTheory\Set::removeMulti PHP Method

removeMulti() public method

Remove elements from the set Does nothing if the element does not exist in the set.
public removeMulti ( array $x ) : Set
$x array
return Set (this set)
    public function removeMulti(array $x) : Set
    {
        foreach ($x as $member) {
            unset($this->A[$this->getKey($member)]);
        }
        return $this;
    }

Usage Example

 /**
  * @dataProvider dataProviderForRemoveMulti
  */
 public function testRemoveMulti(array $A, array $x, array $R)
 {
     $setA = new Set($A);
     $setR = new Set($R);
     $setA->removeMulti($x);
     $this->assertEquals($setR, $setA);
 }