MathPHP\SetTheory\Set::clear PHP 메소드

clear() 공개 메소드

Results in an empty set.
public clear ( ) : Set
리턴 Set (this set)
    public function clear() : Set
    {
        $this->A = [];
        return $this;
    }

Usage Example

예제 #1
0
 /**
  * @dataProvider dataProviderForSingleSet
  */
 public function testClear(array $members)
 {
     $set = new Set($members);
     $set->clear();
     $this->assertTrue($set->isEmpty());
     $this->assertEmpty($set->asArray());
     $this->assertEquals($set, new Set());
 }