VTK  9.1.0
vtkGraphWeightFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGraphWeightFilter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
31 #ifndef vtkGraphWeightFilter_h
32 #define vtkGraphWeightFilter_h
33 
34 #include "vtkFiltersGeneralModule.h" // For export macro
35 #include "vtkGraphAlgorithm.h"
36 
37 class vtkGraph;
38 
39 class VTKFILTERSGENERAL_EXPORT vtkGraphWeightFilter : public vtkGraphAlgorithm
40 {
41 public:
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
45 protected:
46  vtkGraphWeightFilter() = default;
47  ~vtkGraphWeightFilter() override = default;
48 
50 
55  virtual float ComputeWeight(vtkGraph* const graph, const vtkEdgeType& edge) const = 0;
56 
63  virtual bool CheckRequirements(vtkGraph* const graph) const;
64 
65 private:
67  void operator=(const vtkGraphWeightFilter&) = delete;
68 };
69 
70 #endif
Superclass for algorithms that produce only graph as output.
Base class for filters that weight graph edges.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
~vtkGraphWeightFilter() override=default
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual bool CheckRequirements(vtkGraph *const graph) const
Ensure that the 'graph' is has all properties that are needed to compute the weights.
vtkGraphWeightFilter()=default
virtual float ComputeWeight(vtkGraph *const graph, const vtkEdgeType &edge) const =0
Compute the weight on the 'graph' for a particular 'edge'.
Base class for graph data types.
Definition: vtkGraph.h:290
a simple class to control print indentation
Definition: vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.