VTK  9.3.20240328
vtkFunctionSet.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
17 #ifndef vtkFunctionSet_h
18 #define vtkFunctionSet_h
19 
20 #include "vtkCommonMathModule.h" // For export macro
21 #include "vtkObject.h"
22 
23 VTK_ABI_NAMESPACE_BEGIN
24 class VTKCOMMONMATH_EXPORT vtkFunctionSet : public vtkObject
25 {
26 public:
27  vtkTypeMacro(vtkFunctionSet, vtkObject);
28  void PrintSelf(ostream& os, vtkIndent indent) override;
29 
38  virtual int FunctionValues(double* x, double* f) { return this->FunctionValues(x, f, nullptr); }
39  virtual int FunctionValues(double* x, double* f, void* vtkNotUsed(userData))
40  {
41  return this->FunctionValues(x, f);
42  }
43 
49  virtual int GetNumberOfFunctions() { return this->NumFuncs; }
50 
56  virtual int GetNumberOfIndependentVariables() { return this->NumIndepVars; }
57 
58 protected:
60  ~vtkFunctionSet() override = default;
61 
62  int NumFuncs;
64 
65 private:
66  vtkFunctionSet(const vtkFunctionSet&) = delete;
67  void operator=(const vtkFunctionSet&) = delete;
68 };
69 
70 VTK_ABI_NAMESPACE_END
71 #endif
Abstract interface for sets of functions.
virtual int GetNumberOfFunctions()
Return the number of functions.
virtual int GetNumberOfIndependentVariables()
Return the number of independent variables.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int FunctionValues(double *x, double *f)
Evaluate functions at x_j.
virtual int FunctionValues(double *x, double *f, void *vtkNotUsed(userData))
~vtkFunctionSet() override=default
a simple class to control print indentation
Definition: vtkIndent.h:108
abstract base class for most VTK objects
Definition: vtkObject.h:161