Phpml\Clustering\KMeans\Point::__construct PHP Метод

__construct() публичный Метод

public __construct ( array $coordinates )
$coordinates array
    public function __construct(array $coordinates)
    {
        $this->dimension = count($coordinates);
        $this->coordinates = $coordinates;
    }

Usage Example

Пример #1
0
 /**
  * @param Space $space
  * @param array $coordinates
  */
 public function __construct(Space $space, array $coordinates)
 {
     parent::__construct($coordinates);
     $this->space = $space;
     $this->points = new SplObjectStorage();
 }