UnitTangent.h
1 //-*-C++-*-
2 
3 /***************************************************************************
4  *
5  * Copyright (C) 2011 by Willem van Straten
6  * Licensed under the Academic Free License version 2.1
7  *
8  ***************************************************************************/
9 
10 // psrchive/More/MEAL/MEAL/UnitTangent.h
11 
12 #ifndef __MEAL_UnitTangent_H
13 #define __MEAL_UnitTangent_H
14 
15 #include "MEAL/Evaluable.h"
16 #include "Vector.h"
17 
18 namespace MEAL {
19 
21 
41  class UnitTangent : public Evaluable< Vector<3,double> >
42  {
43 
44  public:
45 
47 
49  std::string get_name () const;
50 
52  void set_vector (Vector<3,double> direction);
53 
55  void set_vector (const Vector<3,Estimate<double> >& direction);
56 
58  Vector<3,double> get_basis (unsigned i) { return basis[i]; }
59 
60  protected:
61 
63  void calculate (Vector<3,double>& result, std::vector<Vector<3,double> >*);
64 
66  Vector<3,double> basis [3];
67 
68  };
69 
70 }
71 
72 #endif
Vector< 3, double > basis[3]
The current basis.
Definition: UnitTangent.h:76
void set_vector(Vector< 3, double > direction)
Set the direction of the unit vector.
Definition: UnitTangent.C:30
const ScalarMath sqrt(const ScalarMath &x)
Return a ScalarMath instance representing x^.5.
Definition: ScalarMath.C:151
Namespace in which all modeling and calibration related code is declared.
Definition: ExampleComplex2.h:16
void calculate(Vector< 3, double > &result, std::vector< Vector< 3, double > > *)
Calculate the Vector and its gradient.
Definition: UnitTangent.C:95
std::string get_name() const
Return the name of the class.
Definition: UnitTangent.C:25
Represents a unit vector in three-dimensional space.
Definition: UnitTangent.h:46
Vector< 3, double > get_basis(unsigned i)
Get the basis vector.
Definition: UnitTangent.h:68

Generated using doxygen 1.8.17