PHP Class Phpml\Clustering\KMeans\Point

Inheritance: implements ArrayAcces\ArrayAccess
Show file Open project: php-ai/php-ml Class Usage Examples

Protected Properties

Property Type Description
$coordinates array
$dimension integer

Public Methods

Method Description
__construct ( array $coordinates )
getClosest ( $points ) : mixed
getCoordinates ( ) : array
getDistanceWith ( self $point, boolean $precise = true ) : integer | mixed
offsetExists ( mixed $offset ) : boolean
offsetGet ( mixed $offset ) : mixed
offsetSet ( mixed $offset, mixed $value )
offsetUnset ( mixed $offset )
toArray ( ) : array

Method Details

__construct() public method

public __construct ( array $coordinates )
$coordinates array

getClosest() public method

public getClosest ( $points ) : mixed
$points
return mixed

getCoordinates() public method

public getCoordinates ( ) : array
return array

getDistanceWith() public method

public getDistanceWith ( self $point, boolean $precise = true ) : integer | mixed
$point self
$precise boolean
return integer | mixed

offsetExists() public method

public offsetExists ( mixed $offset ) : boolean
$offset mixed
return boolean

offsetGet() public method

public offsetGet ( mixed $offset ) : mixed
$offset mixed
return mixed

offsetSet() public method

public offsetSet ( mixed $offset, mixed $value )
$offset mixed
$value mixed

offsetUnset() public method

public offsetUnset ( mixed $offset )
$offset mixed

toArray() public method

public toArray ( ) : array
return array

Property Details

$coordinates protected property

protected array $coordinates
return array

$dimension protected property

protected int $dimension
return integer