GeoModel - GeoModelCore
KVector.h
1 //==========================================================================//
2 // Imported from the QAT library (qat.pitt.edu) by the copyright holder //
3 // Joe Boudreau. Software licensed under the terms and conditions of the //
4 // GNU Lesser Public License v3. //
5 //==========================================================================//
6 
7 //----------------------------------- --------------------------------------//
8 // //
9 // Class KVector for internal use //
10 // //
11 //--------------------------------------------------------------------------//
12 #ifndef KVector_h
13 #define KVector_h 1
14 #include "GeoGenericFunctions/AbsFunction.h"
15 namespace GeoGenfun {
16 
17  class KVector : public AbsFunction {
18 
19  FUNCTION_OBJECT_DEF(KVector)
20 
21  public:
22 
23  // Constructor
24  KVector(unsigned int dimensionality=1,
25  double value=1);
26 
27  // Copy constructor
28  KVector(const KVector &right);
29 
30  // Destructor
31  virtual ~KVector();
32 
33  // Retrieve function value
34  virtual double operator ()(double argument) const override;
35  virtual double operator ()(const Argument & a) const override;
36 
37  // Get the dimensionality, as specified in the constructor:
38  virtual unsigned int dimensionality() const override;
39 
40  // Derivative.
41  virtual Derivative partial (unsigned int) const override;
42 
43  // Does this function have an analytic derivative?
44  virtual bool hasAnalyticDerivative() const override {return true;}
45 
46  private:
47 
48  // It is illegal to assign a fixed constant
49  const KVector & operator=(const KVector &right);
50 
51 
52  // The dimensionality, length of the argument list:
53  unsigned int _dimensionality;
54 
55  // The value of the index() component...
56  double _value;
57  };
58 
59 } // namespace Genfun
60 #endif
Definition: Abs.h:15