public function testClear()
 {
     $d = [1, 1];
     $data = new BiPolarNeuralData(2);
     $data->setDataFromArray($d);
     $data->clear();
     $this->assertEquals(-1, $data->getData(0), 0.5);
     $data->setData(0, true);
     $this->assertEquals(true, $data->getBoolean(0));
 }
 /**
  *
  * @return MLData A cloned copy of this object.
  */
 public function __clone()
 {
     $result = new BiPolarNeuralData($this->size());
     $result->setDataFromArray($this->data);
     return $result;
 }