This file is indexed.

/usr/include/vtk-6.3/vtkReduceTable.h is in libvtk6-dev 6.3.0+dfsg1-11build1.

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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkReduceTable.h

  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
  All rights reserved.
  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notice for more information.

=========================================================================*/
// .NAME vtkReduceTable - combine some of the rows of a table
//
// .SECTION Description
// Collapses the rows of the input table so that one particular
// column (the IndexColumn) does not contain any duplicate values.
// Thus the output table will have the same columns as the input
// table, but potentially fewer rows.  One example use of this
// class would be to generate a summary table from a table of
// observations.
// When two or more rows of the input table share a value in the
// IndexColumn, the values from these rows will be combined on a
// column-by-column basis.  By default, such numerical values will be
// reduced to their mean, and non-numerical values will be reduced to
// their mode.  This default behavior can be changed by calling
// SetNumericalReductionMethod() or SetNonNumericalReductionMethod().
// You can also specify the reduction method to use for a particular
// column by calling SetReductionMethodForColumn().

#ifndef vtkReduceTable_h
#define vtkReduceTable_h

#include "vtkInfovisCoreModule.h" // For export macro
#include "vtkTableAlgorithm.h"

#include <map>                   // For ivar
#include <set>                   // For ivar
#include <vector>                // For ivar

class vtkVariant;

class VTKINFOVISCORE_EXPORT vtkReduceTable : public vtkTableAlgorithm
{
public:
  static vtkReduceTable* New();
  vtkTypeMacro(vtkReduceTable,vtkTableAlgorithm);
  void PrintSelf(ostream& os, vtkIndent indent);

  // Description:
  // Get/Set the column that will be used to reduce the input table.
  // Any rows sharing a value in this column will be collapsed into
  // a single row in the output table.
  vtkGetMacro(IndexColumn, vtkIdType);
  vtkSetMacro(IndexColumn, vtkIdType);

  // Description:
  // Get/Set the method that should be used to combine numerical
  // values.
  vtkGetMacro(NumericalReductionMethod, int);
  vtkSetMacro(NumericalReductionMethod, int);

  // Description:
  // Get/Set the method that should be used to combine non-numerical
  // values.
  vtkGetMacro(NonNumericalReductionMethod, int);
  vtkSetMacro(NonNumericalReductionMethod, int);

  // Description:
  // Get the method that should be used to combine the values within
  // the specified column.  Returns -1 if no method has been set for
  // this particular column.
  int GetReductionMethodForColumn(vtkIdType col);

  // Description:
  // Set the method that should be used to combine the values within
  // the specified column.
  void SetReductionMethodForColumn(vtkIdType col, int method);

  //BTX
  // Description:
  // Enum for methods of reduction
  enum
    {
    MEAN,
    MEDIAN,
    MODE
    };
  //ETX

protected:
  vtkReduceTable();
  ~vtkReduceTable();

  int RequestData(
    vtkInformation*,
    vtkInformationVector**,
    vtkInformationVector*);

  // Description:
  // Initialize the output table to have the same types of columns as
  // the input table, but no rows.
  void InitializeOutputTable(vtkTable *input, vtkTable *output);

  // Description:
  // Find the distinct values in the input table's index column.
  // This function also populates the mapping of new row IDs to old row IDs.
  void AccumulateIndexValues(vtkTable *input);

  // Description:
  // Populate the index column of the output table.
  void PopulateIndexColumn(vtkTable *output);

  // Description:
  // Populate a non-index column of the output table.  This involves
  // potentially combining multiple values from the input table into
  // a single value for the output table.
  void PopulateDataColumn(vtkTable *input, vtkTable *output, vtkIdType col);

  // Description:
  // Find the mean of a series of values from the input table
  // and store it in the output table.
  void ReduceValuesToMean(vtkTable *input, vtkTable *output,
                          vtkIdType row, vtkIdType col,
                          std::vector<vtkIdType> oldRows);

  // Description:
  // Find the median of a series of values from the input table
  // and store it in the output table.
  void ReduceValuesToMedian(vtkTable *input, vtkTable *output,
                            vtkIdType row, vtkIdType col,
                            std::vector<vtkIdType> oldRows);

  // Description:
  // Find the mode of a series of values from the input table
  // and store it in the output table.
  void ReduceValuesToMode(vtkTable *input, vtkTable *output,
                          vtkIdType row, vtkIdType col,
                          std::vector<vtkIdType> oldRows);

  vtkIdType IndexColumn;
  std::set<vtkVariant> IndexValues;
  std::map<vtkVariant, std::vector<vtkIdType> > NewRowToOldRowsMap;
  std::map<vtkIdType, int> ColumnReductionMethods;

  int NumericalReductionMethod;
  int NonNumericalReductionMethod;

private:
  vtkReduceTable(const vtkReduceTable&); // Not implemented
  void operator=(const vtkReduceTable&);   // Not implemented
};

#endif