node = new Neighborhood($dataset, self::MIN, self::MAX); } /** * @test */ public function build() : void { $this->assertInstanceOf(Neighborhood::class, $this->node); $this->assertInstanceOf(Hypercube::class, $this->node); $this->assertInstanceOf(Node::class, $this->node); } /** * @test */ public function terminate() : void { $node = Neighborhood::terminate(Labeled::quick(self::SAMPLES, self::LABELS)); $this->assertInstanceOf(Neighborhood::class, $node); $this->assertInstanceOf(Labeled::class, $node->dataset()); $this->assertEquals(self::BOX, iterator_to_array($node->sides())); } /** * @test */ public function dataset() : void { $this->assertInstanceOf(Labeled::class, $this->node->dataset()); $this->assertEquals(self::SAMPLES, $this->node->dataset()->samples()); $this->assertEquals(self::LABELS, $this->node->dataset()->labels()); } /** * @test */ public function sides() : void { $this->assertEquals(self::BOX, iterator_to_array($this->node->sides())); } }