How many unused parameters does one library need...

Just commenting out the unused variable names so that the code
is still readable and sensible. I'm not sure if having several
methods that don't do anything at all is a completely sensible
approach, though...
This commit is contained in:
James Cline
2012-01-17 21:11:47 +00:00
parent d74e64947f
commit edce15b877
8 changed files with 28 additions and 30 deletions
@@ -57,7 +57,7 @@ double AugLagrangianTestFunction::EvaluateConstraint(size_t index,
}
void AugLagrangianTestFunction::GradientConstraint(size_t index,
const arma::mat& coordinates, arma::mat& gradient)
arma::mat& gradient)
{
// If the user passed an invalid index (not 0), we will return a zero
// gradient.
@@ -32,9 +32,7 @@ class AugLagrangianTestFunction
size_t NumConstraints() const { return 1; }
double EvaluateConstraint(size_t index, const arma::mat& coordinates);
void GradientConstraint(size_t index,
const arma::mat& coordinates,
arma::mat& gradient);
void GradientConstraint(size_t index, arma::mat& gradient);
const arma::mat& GetInitialPoint() { return initialPoint; }
+8 -8
View File
@@ -30,9 +30,9 @@ class EmptyStatistic
* @param count Number of points held in this leaf.
*/
template<typename MatType>
EmptyStatistic(const MatType& dataset,
const size_t begin,
const size_t count)
EmptyStatistic(const MatType& /* dataset */,
const size_t /* begin */,
const size_t /* count */)
{ }
/**
@@ -46,11 +46,11 @@ class EmptyStatistic
* @param rightStat EmptyStatistic object of the right child node.
*/
template<typename MatType>
EmptyStatistic(const MatType& dataset,
const size_t start,
const size_t count,
const EmptyStatistic& leftStat,
const EmptyStatistic& rightStat)
EmptyStatistic(const MatType& /* dataset */,
const size_t /* start */,
const size_t /* count */,
const EmptyStatistic& /* leftStat */,
const EmptyStatistic& /* rightStat */)
{ }
};
+4 -4
View File
@@ -27,7 +27,7 @@ DTBStat::DTBStat() : maxNeighborDistance(DBL_MAX), componentMembership(-1)
* An initializer for leaves.
*/
template<typename MatType>
DTBStat::DTBStat(const MatType& dataset,
DTBStat::DTBStat(const MatType& /* dataset */,
const size_t start,
const size_t count) :
maxNeighborDistance(DBL_MAX),
@@ -40,11 +40,11 @@ DTBStat::DTBStat(const MatType& dataset,
* An initializer for non-leaves.
*/
template<typename MatType>
DTBStat::DTBStat(const MatType& dataset,
DTBStat::DTBStat(const MatType& /* dataset */,
const size_t start,
const size_t count,
const DTBStat& leftStat,
const DTBStat& right_stat) :
const DTBStat& /* leftStat */,
const DTBStat& /* rightStat */) :
maxNeighborDistance(DBL_MAX),
componentMembership((count == 1) ? start : -1)
{
@@ -14,7 +14,7 @@ using namespace mlpack::kpca;
using namespace std;
using namespace arma;
int main(int argc, char** argv)
int main(int /* argc */, char** /* argv */)
{
mat data("1 0 2 3 9;"
@@ -37,11 +37,11 @@ class AllowEmptyClusters
* @return Number of points changed (0).
*/
template<typename MatType>
static size_t EmptyCluster(const MatType& data,
const size_t emptyCluster,
const MatType& centroids,
arma::Col<size_t>& clusterCounts,
arma::Col<size_t>& assignments)
static size_t EmptyCluster(const MatType& /* data */,
const size_t /* emptyCluster */,
const MatType& /* centroids */,
arma::Col<size_t>& /* clusterCounts */,
arma::Col<size_t>& /* assignments */)
{
// Empty clusters are okay! Do nothing.
return 0;
@@ -44,18 +44,18 @@ class QueryStat
* Initialization for a leaf, required by the StatisticType policy.
*/
template<typename MatType>
QueryStat(const MatType& dataset, const size_t begin, const size_t count)
QueryStat(const MatType& /* dataset */, const size_t /* begin */, const size_t /* count */)
: bound(SortPolicy::WorstDistance()) { }
/**
* Initialization for a node, required by the StatisticType policy.
*/
template<typename MatType>
QueryStat(const MatType& dataset,
const size_t begin,
const size_t count,
const QueryStat& leftStat,
const QueryStat& rightStat)
QueryStat(const MatType& /* dataset */,
const size_t /* begin */,
const size_t /* count */,
const QueryStat& /* leftStat */,
const QueryStat& /* rightStat */)
: bound(SortPolicy::WorstDistance()) { }
//! Get the bound.
+2 -2
View File
@@ -1308,8 +1308,8 @@ bool CheckPointBounds(TreeType* node, const arma::mat& data)
template<int t_pow>
bool DoBoundsIntersect(HRectBound<t_pow>& a,
HRectBound<t_pow>& b,
size_t ia,
size_t ib)
size_t /* ia */,
size_t /* ib */)
{
size_t dimensionality = a.Dim();