MsPASS C++ API  2.4.1.dev4+g92330b7a
Defines the C++ API for MsPASS
Loading...
Searching...
No Matches
Public Member Functions | List of all members
mspass::algorithms::greater_seedorder Struct Reference

Sort TimeSeries objects into descending SEED channel order. More...

Public Member Functions

bool operator() (TimeSeries x, TimeSeries y)
 

Detailed Description

Sort TimeSeries objects into descending SEED channel order.

Member Function Documentation

◆ operator()()

bool mspass::algorithms::greater_seedorder::operator() ( TimeSeries  x,
TimeSeries  y 
)
inline

Return true when x should sort after y in SEED net/sta/loc/chan order.

50 {
51 int retnet, retsta, retloc, retchan;
52 retnet = cautious_compare(x, y, SEISMICMD_net);
53 switch (retnet) {
54 case -1:
55 return false;
56 case +1:
57 return true;
58 case 0:
59 default:
60 retsta = cautious_compare(x, y, SEISMICMD_sta);
61 switch (retsta) {
62 case -1:
63 return false;
64 case +1:
65 return true;
66 case 0:
67 default:
68 retloc = cautious_compare(x, y, SEISMICMD_loc);
69 switch (retloc) {
70 case -1:
71 return false;
72 case +1:
73 return true;
74 case 0:
75 default:
76 retchan = cautious_compare(x, y, SEISMICMD_chan);
77 switch (retchan) {
78 case +1:
79 return true;
80 default:
81 /* Weak order as the final condition is strictly > so
82 equal case only here returns false */
83 return false;
84 };
85 };
86 };
87 };
88 };
const std::string SEISMICMD_net("net")
const std::string SEISMICMD_loc("loc")
const std::string SEISMICMD_sta("sta")
const std::string SEISMICMD_chan("chan")

References mspass::seismic::SEISMICMD_chan(), mspass::seismic::SEISMICMD_loc(), mspass::seismic::SEISMICMD_net(), and mspass::seismic::SEISMICMD_sta().


The documentation for this struct was generated from the following file: