createVectors() public method

public createVectors ( ObjectSet $tfSource, ObjectSet $tfDestination )
$tfSource GraphAware\Reco4PHP\Common\ObjectSet
$tfDestination GraphAware\Reco4PHP\Common\ObjectSet
 public function testCreateVectors()
 {
     $instance = new KNNModelBuilder();
     $source = new ObjectSet(Rating::class);
     $destination = new ObjectSet(Rating::class);
     $node1 = new FakeNode(1);
     $node2 = new FakeNode(2);
     $node3 = new FakeNode(3);
     $node4 = new FakeNode(4);
     $source->add(new Rating(1, $node1->identity()));
     $source->add(new Rating(1, $node3->identity()));
     $destination->add(new Rating(1, $node2->identity()));
     $destination->add(new Rating(1, $node4->identity()));
     $vectors = $instance->createVectors($source, $destination);
     $xVector = $vectors[0];
     $yVector = $vectors[1];
     $this->assertEquals(array(1, 0, 1, 0), $xVector);
     $this->assertEquals(array(0, 1, 0, 1), $yVector);
 }