version  0.0.1
Defines the C++ API for MsPASS
SlownessVector.h
1 #ifndef _SLOWNESS_H_
2 #define _SLOWNESS_H_
3 #include <string>
4 #include <boost/archive/text_iarchive.hpp>
5 #include <boost/archive/text_oarchive.hpp>
6 
7 namespace mspass::seismic
8 {
18 {
19 public:
23  double ux;
27  double uy;
46  SlownessVector(const double ux0, const double uy0, const double az0=0.0);
55  double mag() const noexcept;
61  double azimuth() const noexcept;
68  double baz() const noexcept;
70  SlownessVector& operator=(const SlownessVector& parent);
71 /* \brief Standard accumulation operator. */
72  SlownessVector& operator+=(const SlownessVector& other);
73 /* \brief Standard subtract from operator. */
74  SlownessVector& operator-=(const SlownessVector& other);
75 /* \brief Standard addition operator. */
76  const SlownessVector operator+(const SlownessVector& other) const;
77 /* \brief Standard subraction operator. */
78  const SlownessVector operator-(const SlownessVector& other) const;
79 private:
80  double azimuth0;
81  friend class boost::serialization::access;
82  template<class Archive>
83  void serialize(Archive& ar,const unsigned int version)
84  {
85  ar & ux;
86  ar & uy;
87  ar & azimuth0;
88  };
89 };
90 
91 } // End mspass::seismic namespace declaration
92 #endif
Slowness vector object.
Definition: SlownessVector.h:18
double uy
Definition: SlownessVector.h:27
double mag() const noexcept
Definition: SlownessVector.cc:63
SlownessVector()
Definition: SlownessVector.cc:10
double azimuth() const noexcept
Definition: SlownessVector.cc:67
double baz() const noexcept
Definition: SlownessVector.cc:79
double ux
Definition: SlownessVector.h:23
Define metadata keys.
Definition: BasicSpectrum.h:6