TBTK
Need a break? Support the development by playing Polarity Puzzles
ParametrizedLine.h
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 
17 
24 #ifndef COM_DAFER45_TBTK_PARAMETRIZED_LINE
25 #define COM_DAFER45_TBTK_PARAMETRIZED_LINE
26 
27 #include "TBTK/Field.h"
28 
29 #include <initializer_list>
30 #include <vector>
31 
32 namespace TBTK{
33 
38 class ParametrizedLine : public Field<std::vector<double>, double>{
39 public:
41  ParametrizedLine(
42  std::initializer_list<double> start,
43  std::initializer_list<double> direction
44  );
45 
47  ParametrizedLine(
48  const std::vector<double> &start,
49  const std::vector<double> &direction
50  );
51 
53  virtual std::vector<double> operator()(
54  std::initializer_list<double> lambda
55  ) const;
56 
58  const std::vector<double> operator()(double lambda) const;
59 private:
61  std::vector<double> start;
62 
64  std::vector<double> direction;
65 };
66 
67 inline const std::vector<double> ParametrizedLine::operator()(
68  double lambda
69 ) const{
70  return ParametrizedLine::operator()({lambda});
71 }
72 
73 }; //End namespace TBTK
74 
75 #endif
76 
Definition: Boolean.h:32