This file is indexed.

/usr/include/mlpack/core/tree/mrkd_statistic.hpp is in libmlpack-dev 1.0.10-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
/**
 * @file mrkd_statistic.hpp
 * @author James Cline
 *
 * Definition of the statistic for multi-resolution kd-trees.
 *
 * This file is part of MLPACK 1.0.10.
 *
 * MLPACK is free software: you can redistribute it and/or modify it under the
 * terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation, either version 3 of the License, or (at your option) any
 * later version.
 *
 * MLPACK is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
 * details (LICENSE.txt).
 *
 * You should have received a copy of the GNU General Public License along with
 * MLPACK.  If not, see <http://www.gnu.org/licenses/>.
 */
#ifndef __MLPACK_CORE_TREE_MRKD_STATISTIC_HPP
#define __MLPACK_CORE_TREE_MRKD_STATISTIC_HPP

#include <mlpack/core.hpp>

namespace mlpack {
namespace tree {

/**
 * Statistic for multi-resolution kd-trees.
 */
class MRKDStatistic
{
 public:
  //! Initialize an empty statistic.
  MRKDStatistic();

  /**
   * This constructor is called when a node is finished initializing.
   *
   * @param node The node that has been finished.
   */
  template<typename TreeType>
  MRKDStatistic(const TreeType& /* node */);

  /**
   * Returns a string representation of this object.
   */
  std::string ToString() const;

  //! Get the index of the initial item in the dataset.
  size_t Begin() const { return begin; }
  //! Modify the index of the initial item in the dataset.
  size_t& Begin() { return begin; }

  //! Get the number of items in the dataset.
  size_t Count() const { return count; }
  //! Modify the number of items in the dataset.
  size_t& Count() { return count; }

  //! Get the center of mass.
  const arma::colvec& CenterOfMass() const { return centerOfMass; }
  //! Modify the center of mass.
  arma::colvec& CenterOfMass() { return centerOfMass; }

  //! Get the index of the dominating centroid.
  size_t DominatingCentroid() const { return dominatingCentroid; }
  //! Modify the index of the dominating centroid.
  size_t& DominatingCentroid() { return dominatingCentroid; }

  //! Access the whitelist.
  const std::vector<size_t>& Whitelist() const { return whitelist; }
  //! Modify the whitelist.
  std::vector<size_t>& Whitelist() { return whitelist; }

 private:
  //! The data points this object contains.
  const arma::mat* dataset;
  //! The initial item in the dataset, so we don't have to make a copy.
  size_t begin;
  //! The number of items in the dataset.
  size_t count;
  //! The left child.
  const MRKDStatistic* leftStat;
  //! The right child.
  const MRKDStatistic* rightStat;
  //! A link to the parent node; NULL if this is the root.
  const MRKDStatistic* parentStat;

  // Computed statistics.
  //! The center of mass for this dataset.
  arma::colvec centerOfMass;
  //! The sum of the squared Euclidean norms for this dataset.
  double sumOfSquaredNorms;

  // There may be a better place to store this -- HRectBound?
  //! The index of the dominating centroid of the associated hyperrectangle.
  size_t dominatingCentroid;

  //! The list of centroids that cannot own this hyperrectangle.
  std::vector<size_t> whitelist;
  //! Whether or not the whitelist is valid.
  bool isWhitelistValid;
};

}; // namespace tree
}; // namespace mlpack

// Include implementation.
#include "mrkd_statistic_impl.hpp"

#endif // __MLPACK_CORE_TREE_MRKD_STATISTIC_HPP