ATLAS Offline Software
Loading...
Searching...
No Matches
ArrayFunction.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRT_GEOMODEL_ARRAYFUNCTION_H
6#define TRT_GEOMODEL_ARRAYFUNCTION_H
7//-------------------------------------------------------//
8// This one dimensional function takes its values from //
9// an array..which it copies in. //
10//-------------------------------------------------------//
11
12
13#include "GeoGenericFunctions/AbsFunction.h"
14#include <vector>
15namespace GeoGenfun {
16class ArrayFunction : public AbsFunction {
17
18 // cppcheck-suppress unknownMacro
19 FUNCTION_OBJECT_DEF(ArrayFunction)
20
21 public:
22
23 // Constructor
24 ArrayFunction(const double *begin, const double *end);
25
26 // Destructor
27 virtual ~ArrayFunction();
28
29 // Copy constructor
30 ArrayFunction(const ArrayFunction &right);
31
32 // Retreive function value
33 virtual double operator ()(double argument) const override;
34 virtual double operator ()(const Argument & a) const override {return operator() (a[0]);}
35
36 private:
37
38 // It is illegal to assign a ArrayFunction
39 const ArrayFunction & operator=(const ArrayFunction &right);
40
41 std::vector<double> m_values;
42};
43}
44#endif
static Double_t a
virtual double operator()(double argument) const override
ArrayFunction(const double *begin, const double *end)
std::vector< double > m_values
const ArrayFunction & operator=(const ArrayFunction &right)