2016-04-12 19:43:25 +00:00
|
|
|
<?php
|
|
|
|
|
2016-11-20 21:53:17 +00:00
|
|
|
declare(strict_types=1);
|
2016-04-12 19:43:25 +00:00
|
|
|
|
2016-04-20 21:56:33 +00:00
|
|
|
namespace Phpml\Math\Distance;
|
2016-04-12 19:43:25 +00:00
|
|
|
|
2019-02-06 07:00:17 +00:00
|
|
|
/**
|
|
|
|
* Class Manhattan
|
|
|
|
*
|
|
|
|
* L^1 Metric.
|
|
|
|
*/
|
|
|
|
class Manhattan extends Distance
|
2016-04-12 19:43:25 +00:00
|
|
|
{
|
|
|
|
/**
|
2019-02-06 07:00:17 +00:00
|
|
|
* Manhattan constructor.
|
2016-04-12 19:43:25 +00:00
|
|
|
*/
|
2019-02-06 07:00:17 +00:00
|
|
|
public function __construct()
|
2016-04-12 19:43:25 +00:00
|
|
|
{
|
2019-02-06 07:00:17 +00:00
|
|
|
parent::__construct(1.0);
|
2016-04-12 19:43:25 +00:00
|
|
|
}
|
|
|
|
}
|