version  0.0.1
Defines the C++ API for MsPASS
Loading...
Searching...
No Matches
SlownessVector.h
1#ifndef _SLOWNESS_H_
2#define _SLOWNESS_H_
3#include <boost/archive/text_iarchive.hpp>
4#include <boost/archive/text_oarchive.hpp>
5#include <string>
6
7namespace mspass::seismic {
17public:
21 double ux;
25 double uy;
44 SlownessVector(const double ux0, const double uy0, const double az0 = 0.0);
53 double mag() const noexcept;
59 double azimuth() const noexcept;
66 double baz() const noexcept;
68 SlownessVector &operator=(const SlownessVector &parent);
69 /* \brief Standard accumulation operator. */
70 SlownessVector &operator+=(const SlownessVector &other);
71 /* \brief Standard subtract from operator. */
72 SlownessVector &operator-=(const SlownessVector &other);
73 /* \brief Standard addition operator. */
74 const SlownessVector operator+(const SlownessVector &other) const;
75 /* \brief Standard subraction operator. */
76 const SlownessVector operator-(const SlownessVector &other) const;
77
78private:
79 double azimuth0;
80 friend class boost::serialization::access;
81 template <class Archive>
82 void serialize(Archive &ar, const unsigned int version) {
83 ar & ux;
84 ar & uy;
85 ar & azimuth0;
86 };
87};
88
89} // namespace mspass::seismic
90#endif
Slowness vector object.
Definition SlownessVector.h:16
double uy
Definition SlownessVector.h:25
double mag() const noexcept
Definition SlownessVector.cc:58
SlownessVector()
Definition SlownessVector.cc:9
double azimuth() const noexcept
Definition SlownessVector.cc:59
double baz() const noexcept
Definition SlownessVector.cc:71
double ux
Definition SlownessVector.h:21
Define metadata keys.
Definition BasicSpectrum.h:6