From 865e54a5e3762825503e24d950c67f458a8b8630 Mon Sep 17 00:00:00 2001 From: Andrew DalPino Date: Sun, 14 Jan 2024 17:30:57 -0600 Subject: [PATCH] Fix coding style --- benchmarks/Graph/Trees/VantageTreeBench.php | 2 +- src/Datasets/Generators/Blob.php | 4 ++-- src/Graph/Nodes/VantagePoint.php | 6 +++--- src/Graph/Trees/VantageTree.php | 12 ++++++------ tests/Graph/Nodes/VantagePointTest.php | 2 +- tests/Graph/Trees/VantageTreeTest.php | 4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/benchmarks/Graph/Trees/VantageTreeBench.php b/benchmarks/Graph/Trees/VantageTreeBench.php index 59564d7a5..b2e878256 100644 --- a/benchmarks/Graph/Trees/VantageTreeBench.php +++ b/benchmarks/Graph/Trees/VantageTreeBench.php @@ -20,7 +20,7 @@ class VantageTreeBench protected $dataset; /** - * @var \Rubix\ML\Graph\Trees\VantageTree + * @var VantageTree */ protected $tree; diff --git a/src/Datasets/Generators/Blob.php b/src/Datasets/Generators/Blob.php index 6b41359b6..994d6fa52 100644 --- a/src/Datasets/Generators/Blob.php +++ b/src/Datasets/Generators/Blob.php @@ -44,8 +44,8 @@ class Blob implements Generator /** * Fit a Blob generator to the samples in a dataset. * - * @param \Rubix\ML\Datasets\Dataset $dataset - * @throws \Rubix\ML\Exceptions\InvalidArgumentException + * @param Dataset $dataset + * @throws InvalidArgumentException * @return self */ public static function simulate(Dataset $dataset) : self diff --git a/src/Graph/Nodes/VantagePoint.php b/src/Graph/Nodes/VantagePoint.php index f063278b7..595108452 100644 --- a/src/Graph/Nodes/VantagePoint.php +++ b/src/Graph/Nodes/VantagePoint.php @@ -46,8 +46,8 @@ class VantagePoint implements Hypersphere, HasBinaryChildren /** * Factory method to build a hypersphere by splitting the dataset into left and right clusters. * - * @param \Rubix\ML\Datasets\Labeled $dataset - * @param \Rubix\ML\Kernels\Distance\Distance $kernel + * @param Labeled $dataset + * @param Distance $kernel * @return self */ public static function split(Labeled $dataset, Distance $kernel) : self @@ -128,7 +128,7 @@ public function radius() : float /** * Return the left and right subsets of the training data. * - * @throws \Rubix\ML\Exceptions\RuntimeException + * @throws RuntimeException * @return array{\Rubix\ML\Datasets\Labeled,\Rubix\ML\Datasets\Labeled} */ public function subsets() : array diff --git a/src/Graph/Trees/VantageTree.php b/src/Graph/Trees/VantageTree.php index 88cc267b6..8cc3c5fd9 100644 --- a/src/Graph/Trees/VantageTree.php +++ b/src/Graph/Trees/VantageTree.php @@ -44,7 +44,7 @@ class VantageTree implements BinaryTree, Spatial /** * The distance function to use when computing the distances. * - * @var \Rubix\ML\Kernels\Distance\Distance + * @var Distance */ protected $kernel; @@ -106,7 +106,7 @@ public function bare() : bool /** * Return the distance kernel used to compute distances. * - * @return \Rubix\ML\Kernels\Distance\Distance + * @return Distance */ public function kernel() : Distance { @@ -119,8 +119,8 @@ public function kernel() : Distance * * @internal * - * @param \Rubix\ML\Datasets\Labeled $dataset - * @throws \Rubix\ML\Exceptions\InvalidArgumentException + * @param Labeled $dataset + * @throws InvalidArgumentException */ public function grow(Labeled $dataset) : void { @@ -169,7 +169,7 @@ public function grow(Labeled $dataset) : void * * @param (string|int|float)[] $sample * @param int $k - * @throws \Rubix\ML\Exceptions\InvalidArgumentException + * @throws InvalidArgumentException * @return array> */ public function nearest(array $sample, int $k = 1) : array @@ -240,7 +240,7 @@ public function nearest(array $sample, int $k = 1) : array * * @param (string|int|float)[] $sample * @param float $radius - * @throws \Rubix\ML\Exceptions\InvalidArgumentException + * @throws InvalidArgumentException * @return array> */ public function range(array $sample, float $radius) : array diff --git a/tests/Graph/Nodes/VantagePointTest.php b/tests/Graph/Nodes/VantagePointTest.php index 10b701f70..64d9a20a2 100644 --- a/tests/Graph/Nodes/VantagePointTest.php +++ b/tests/Graph/Nodes/VantagePointTest.php @@ -28,7 +28,7 @@ class VantagePointTest extends TestCase protected const RADIUS = 1.5; /** - * @var \Rubix\ML\Graph\Nodes\VantagePoint + * @var VantagePoint */ protected $node; diff --git a/tests/Graph/Trees/VantageTreeTest.php b/tests/Graph/Trees/VantageTreeTest.php index acf4a8acb..06c1d75af 100644 --- a/tests/Graph/Trees/VantageTreeTest.php +++ b/tests/Graph/Trees/VantageTreeTest.php @@ -22,12 +22,12 @@ class VantageTreeTest extends TestCase protected const RANDOM_SEED = 0; /** - * @var \Rubix\ML\Datasets\Generators\Agglomerate + * @var Agglomerate */ protected $generator; /** - * @var \Rubix\ML\Graph\Trees\VantageTree + * @var VantageTree */ protected $tree;