TBTK
ParametrizedLine.h
Go to the documentation of this file.
1 /* Copyright 2017 Kristofer Bj√∂rnson
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
23 #ifndef COM_DAFER45_TBTK_PARAMETRIZED_LINE
24 #define COM_DAFER45_TBTK_PARAMETRIZED_LINE
25 
26 #include "TBTK/Field.h"
27 
28 #include <initializer_list>
29 #include <vector>
30 
31 namespace TBTK{
32 
37 class ParametrizedLine : public Field<std::vector<double>, double>{
38 public:
41  std::initializer_list<double> start,
42  std::initializer_list<double> direction
43  );
44 
47  const std::vector<double> &start,
48  const std::vector<double> &direction
49  );
50 
52  virtual std::vector<double> operator()(
53  std::initializer_list<double> lambda
54  ) const;
55 
57  const std::vector<double> operator()(double lambda) const;
58 private:
60  std::vector<double> start;
61 
63  std::vector<double> direction;
64 };
65 
66 inline const std::vector<double> ParametrizedLine::operator()(
67  double lambda
68 ) const{
69  return ParametrizedLine::operator()({lambda});
70 }
71 
72 }; //End namespace TBTK
73 
74 #endif
virtual std::vector< double > operator()(std::initializer_list< double > lambda) const
Definition: ParametrizedLine.h:37
Definition: Field.h:34
Definition: ModelFactory.h:35
ParametrizedLine(std::initializer_list< double > start, std::initializer_list< double > direction)
Abstract base class for fields.