[mlpack-svn] [MLPACK] #167: Different solution for HRectBound::MinDistance(..., std::vector<>)
MLPACK Trac
trac at coffeetalk-1.cc.gatech.edu
Tue Nov 29 21:59:55 EST 2011
#167: Different solution for HRectBound::MinDistance(..., std::vector<>)
---------------------+------------------------------------------------------
Reporter: rcurtin | Owner: nslagle
Type: defect | Status: new
Priority: major | Milestone: MLPACK 1.0
Component: MLPACK | Keywords: bound tree policy template methods
Blocking: | Blocked By:
---------------------+------------------------------------------------------
So I was looking at r10459 (actually, just trying to merge it into my own
changes... SVN is so wonderful!) when I noticed it adds four calls to
HRectBound:
{{{
double MinDistance(const HRectBound& other,
const std::vector<size_t>& indices);
double MinDistance(const arma::vec& point,
const std::vector<size_t>& indices);
double MaxDistance(const HRectBound& other,
const std::vector<size_t>& indices);
double MaxDistance(const arma::vec& point,
const std::vector<size_t>& indices);
}}}
To me this seems to be application-specific (for KCDE, I guess?). The
HRectBound class (or any of the Bound classes) implements a pretty strict
range of methods, in order to reduce the load of someone who would like to
implement a new type of bound and know that it works with our code okay.
I'm really hesitant to modify the generic Bound policy class for that
reason and I think we should pursue an alternate solution for this
problem.
Could we design something like an HRectConditionalBound, where the list of
allowed indices is given at constructor time and can be modified by the
user? Then, the regular MinDistance() and MaxDistance() would only work
on the "good" indices by default.
I don't know if that solution is applicable to the situation; maybe we can
get the situation here in more detail and come up with a solution through
that means? My only goal is to avoid increasing the footprint of a
generic template class though, so as to reduce the load on someone making
a custom bound. We split out HRectPeriodicBound from HRectBound for that
reason (they used to be the same class).
--
Ticket URL: <http://trac.research.cc.gatech.edu/fastlab/ticket/167>
MLPACK <www.fast-lab.org>
MLPACK is an intuitive, fast, and scalable C++ machine learning library developed by the FASTLAB at Georgia Tech under Dr. Alex Gray.
More information about the mlpack-svn
mailing list