This file is indexed.

/usr/include/vtk-6.3/vtkIncrementalForceLayout.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
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkScatterPlotMatrix.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 vtkIncrementalForceLayout - incremental force-directed layout.
//
// .SECTION Description
// Performs an incremental force-directed layout of a graph. Set the graph
// then iteratively execute UpdatePositions() to update the vertex positions.
// Note that this directly modifies the vertex locations in the graph.
//
// This layout is modeled after D3's force layout described at
// https://github.com/mbostock/d3/wiki/Force-Layout

#ifndef vtkIncrementalForceLayout_h
#define vtkIncrementalForceLayout_h

#include "vtkInfovisLayoutModule.h" // For export macro
#include "vtkObject.h"

#include "vtkVector.h" // For vector ivars

class vtkGraph;

class VTKINFOVISLAYOUT_EXPORT vtkIncrementalForceLayout : public vtkObject
{
public:
  vtkTypeMacro(vtkIncrementalForceLayout, vtkObject);
  virtual void PrintSelf(ostream &os, vtkIndent indent);
  static vtkIncrementalForceLayout* New();

  // Description:
  // Set the graph to be positioned.
  virtual void SetGraph(vtkGraph* g);
  vtkGetObjectMacro(Graph, vtkGraph);

  // Description:
  // Set the id of the vertex that will not move during the simulation.
  // Set to -1 to allow all the vertices to move.
  virtual void SetFixed(vtkIdType fixed);
  vtkGetMacro(Fixed, vtkIdType);

  // Description:
  // Set the level of activity in the simulation. Default is 0.1.
  vtkSetMacro(Alpha, float);
  vtkGetMacro(Alpha, float);

  // Description:
  // Set the Barnes-Hut threshold for the simulation. Higher values
  // will speed the simulation at the expense of some accuracy.
  // Default is 0.8.
  vtkSetMacro(Theta, float);
  vtkGetMacro(Theta, float);

  // Description:
  // Set the charge of each vertex. Higher negative values will repel vertices
  // from each other more strongly. Default is -30.
  vtkSetMacro(Charge, float);
  vtkGetMacro(Charge, float);

  // Description:
  // Set the rigitity of links in the simulation. Default is 2.
  vtkSetMacro(Strength, float);
  vtkGetMacro(Strength, float);

  // Description:
  // Set the resting distance of each link in scene units, which is equal to
  // pixels when there is no scene scaling. Default is 20.
  vtkSetMacro(Distance, float);
  vtkGetMacro(Distance, float);

  // Description:
  // Set the amount of gravitational pull toward the gravity point.
  // Default is 0.01.
  vtkSetMacro(Gravity, float);
  vtkGetMacro(Gravity, float);

  // Description:
  // Set the multiplier for scaling down velocity in the simulation, where values closer to 1
  // are more frictionless. Default is 0.95.
  vtkSetMacro(Friction, float);
  vtkGetMacro(Friction, float);

//BTX
  // Description:
  // Set the gravity point where all vertices will migrate. Generally this
  // should be set to the location in the center of the scene.
  // Default location is (200, 200).
  virtual void SetGravityPoint(const vtkVector2f &point)
    { this->GravityPoint = point; }
  virtual vtkVector2f GetGravityPoint()
    { return this->GravityPoint; }
//ETX

  // Description:
  // Perform one iteration of the force-directed layout.
  void UpdatePositions();

protected:
  vtkIncrementalForceLayout();
  ~vtkIncrementalForceLayout();

  vtkGraph* Graph;
  class Implementation;
  Implementation* Impl;
  vtkIdType Fixed;
  vtkVector2f GravityPoint;
  float Alpha;
  float Theta;
  float Charge;
  float Strength;
  float Distance;
  float Gravity;
  float Friction;

private:
  vtkIncrementalForceLayout(const vtkIncrementalForceLayout &); // Not implemented.
  void operator=(const vtkIncrementalForceLayout &); // Not implemented.
};
#endif