From 73f5493cfb54e76ced87a0ef32d71af136d35ede Mon Sep 17 00:00:00 2001 From: jeffinsam Date: Tue, 2 Apr 2019 19:37:16 -0400 Subject: [PATCH 1/3] documentation fixup --- src/mlpack/core/tree/ballbound.hpp | 16 ++++++++++++++++ src/mlpack/core/tree/cellbound.hpp | 5 +++++ src/mlpack/core/tree/hollow_ball_bound.hpp | 20 +++++++++++++++++++- 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/src/mlpack/core/tree/ballbound.hpp b/src/mlpack/core/tree/ballbound.hpp index 0e33bb63ef..4e03b5c215 100644 --- a/src/mlpack/core/tree/ballbound.hpp +++ b/src/mlpack/core/tree/ballbound.hpp @@ -108,6 +108,8 @@ class BallBound /** * Determines if a point is within this bound. + * + * @param point Point to check the codition. */ bool Contains(const VecType& point) const; @@ -120,6 +122,8 @@ class BallBound /** * Calculates minimum bound-to-point squared distance. + * + * @param point Point to which the minimum distance is requested. */ template ElemType MinDistance( @@ -128,11 +132,15 @@ class BallBound /** * Calculates minimum bound-to-bound squared distance. + * + * @param other Bound to which the minimum distance is requested. */ ElemType MinDistance(const BallBound& other) const; /** * Computes maximum distance. + * + * @param point Point to which the maximum distance is requested. */ template ElemType MaxDistance( @@ -141,11 +149,16 @@ class BallBound /** * Computes maximum distance. + * + * @param other Bound to which the maximum distance is requested. */ ElemType MaxDistance(const BallBound& other) const; /** * Calculates minimum and maximum bound-to-point distance. + * + * @param point Point to which the minimum and maximum distances are + * requested. */ template math::RangeType RangeDistance( @@ -156,6 +169,9 @@ class BallBound * Calculates minimum and maximum bound-to-bound distance. * * Example: bound1.MinDistanceSq(other) for minimum distance. + * + * @param other Bound to which the minimum and maximum distances are + * requested. */ math::RangeType RangeDistance(const BallBound& other) const; diff --git a/src/mlpack/core/tree/cellbound.hpp b/src/mlpack/core/tree/cellbound.hpp index ec9eeeead2..0d3ffd896e 100644 --- a/src/mlpack/core/tree/cellbound.hpp +++ b/src/mlpack/core/tree/cellbound.hpp @@ -89,6 +89,7 @@ class CellBound /** * Initializes to specified dimensionality with each dimension the empty * set. + * @param dimension Dimensionality of bound. */ CellBound(const size_t dimension); @@ -219,11 +220,15 @@ class CellBound /** * Expands this region to encompass another bound. + * + * @param other Bound which needs to be encompassed. */ CellBound& operator|=(const CellBound& other); /** * Determines if a point is within this bound. + * + * @param point Point to check the codition. */ template bool Contains(const VecType& point) const; diff --git a/src/mlpack/core/tree/hollow_ball_bound.hpp b/src/mlpack/core/tree/hollow_ball_bound.hpp index 9c6e210e22..3fee4aa183 100644 --- a/src/mlpack/core/tree/hollow_ball_bound.hpp +++ b/src/mlpack/core/tree/hollow_ball_bound.hpp @@ -123,12 +123,16 @@ class HollowBallBound /** * Determines if a point is within this bound. + * + * @param point Point to check the codition. */ template bool Contains(const VecType& point) const; /** * Determines if another bound is within this bound. + * + * @param other Bound to check the condition. */ bool Contains(const HollowBallBound& other) const; @@ -141,7 +145,9 @@ class HollowBallBound void Center(VecType& center) const { center = this->center; } /** - * Calculates minimum bound-to-point squared distance. + * Calculates minimum bound-to-point squared distance + *. + * @param point Point to which the minimum distance is requested. */ template ElemType MinDistance(const VecType& point, @@ -150,11 +156,15 @@ class HollowBallBound /** * Calculates minimum bound-to-bound squared distance. + * + * @param other Bound to which the minimum distance is requested. */ ElemType MinDistance(const HollowBallBound& other) const; /** * Computes maximum distance. + * + * @param point Point to which the maximum distance is requested. */ template ElemType MaxDistance(const VecType& point, @@ -163,11 +173,16 @@ class HollowBallBound /** * Computes maximum distance. + * + * @param other Bound to which the maximum distance is requested. */ ElemType MaxDistance(const HollowBallBound& other) const; /** * Calculates minimum and maximum bound-to-point distance. + * + * @param point Point to which the minimum and maximum distances are + * requested. */ template math::RangeType RangeDistance( @@ -178,6 +193,9 @@ class HollowBallBound * Calculates minimum and maximum bound-to-bound distance. * * Example: bound1.MinDistanceSq(other) for minimum distance. + * + * @param other Bound to which the minimum and maximum distances are + * requested. */ math::RangeType RangeDistance(const HollowBallBound& other) const; From f4b7bda4a17ad45f3cd5af98dc955249ac53abd3 Mon Sep 17 00:00:00 2001 From: jeffinsam Date: Tue, 2 Apr 2019 19:41:50 -0400 Subject: [PATCH 2/3] spelling error --- src/mlpack/core/tree/ballbound.hpp | 2 +- src/mlpack/core/tree/cellbound.hpp | 2 +- src/mlpack/core/tree/hollow_ball_bound.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mlpack/core/tree/ballbound.hpp b/src/mlpack/core/tree/ballbound.hpp index 4e03b5c215..ee03f7a6ae 100644 --- a/src/mlpack/core/tree/ballbound.hpp +++ b/src/mlpack/core/tree/ballbound.hpp @@ -109,7 +109,7 @@ class BallBound /** * Determines if a point is within this bound. * - * @param point Point to check the codition. + * @param point Point to check the condition. */ bool Contains(const VecType& point) const; diff --git a/src/mlpack/core/tree/cellbound.hpp b/src/mlpack/core/tree/cellbound.hpp index 0d3ffd896e..49f08cd3e1 100644 --- a/src/mlpack/core/tree/cellbound.hpp +++ b/src/mlpack/core/tree/cellbound.hpp @@ -228,7 +228,7 @@ class CellBound /** * Determines if a point is within this bound. * - * @param point Point to check the codition. + * @param point Point to check the condition. */ template bool Contains(const VecType& point) const; diff --git a/src/mlpack/core/tree/hollow_ball_bound.hpp b/src/mlpack/core/tree/hollow_ball_bound.hpp index 3fee4aa183..72834fbff3 100644 --- a/src/mlpack/core/tree/hollow_ball_bound.hpp +++ b/src/mlpack/core/tree/hollow_ball_bound.hpp @@ -124,7 +124,7 @@ class HollowBallBound /** * Determines if a point is within this bound. * - * @param point Point to check the codition. + * @param point Point to check the condition. */ template bool Contains(const VecType& point) const; From 0379f651dfbb47e4dbb7cae904c997a2f0108d16 Mon Sep 17 00:00:00 2001 From: jeffinsam Date: Wed, 3 Apr 2019 03:19:13 -0400 Subject: [PATCH 3/3] added info about parameters --- src/mlpack/core/tree/cellbound.hpp | 1 + src/mlpack/core/tree/hrectbound.hpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/mlpack/core/tree/cellbound.hpp b/src/mlpack/core/tree/cellbound.hpp index 49f08cd3e1..af633bd2fe 100644 --- a/src/mlpack/core/tree/cellbound.hpp +++ b/src/mlpack/core/tree/cellbound.hpp @@ -89,6 +89,7 @@ class CellBound /** * Initializes to specified dimensionality with each dimension the empty * set. + * * @param dimension Dimensionality of bound. */ CellBound(const size_t dimension); diff --git a/src/mlpack/core/tree/hrectbound.hpp b/src/mlpack/core/tree/hrectbound.hpp index b5bafa5bc4..4f96ca5888 100644 --- a/src/mlpack/core/tree/hrectbound.hpp +++ b/src/mlpack/core/tree/hrectbound.hpp @@ -66,6 +66,8 @@ class HRectBound /** * Initializes to specified dimensionality with each dimension the empty * set. + * + * @param dimension Dimensionality of bound. */ HRectBound(const size_t dimension); @@ -190,12 +192,16 @@ class HRectBound /** * Determines if a point is within this bound. + * + * @param point Point to check the condition. */ template bool Contains(const VecType& point) const; /** * Determines if this bound partially contains a bound. + * + * @param other Bound to check the condition. */ bool Contains(const HRectBound& bound) const;