Skip to content

Commit

Permalink
Per #1575, some cleanup, moving check_fo_thresh() utility function fr…
Browse files Browse the repository at this point in the history
…om vx_config to vx_statistics library.
  • Loading branch information
JohnHalleyGotway committed Mar 30, 2021
1 parent cb00ea4 commit 5fc8996
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 44 deletions.
40 changes: 0 additions & 40 deletions met/src/basic/vx_config/config_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2285,46 +2285,6 @@ void check_mctc_thresh(const ThreshArray &ta) {

///////////////////////////////////////////////////////////////////////////////

bool check_fo_thresh(const double f, const double o,
const double cmn, const double csd,
const SingleThresh &ft, const SingleThresh &ot,
const SetLogic type) {
bool status = true;
bool fcheck = ft.check(f, cmn, csd);
bool ocheck = ot.check(o, cmn, csd);
SetLogic t = type;

// If either of the thresholds is NA, reset the logic to intersection
// because an NA threshold is always true.
if(ft.get_type() == thresh_na || ot.get_type() == thresh_na) {
t = SetLogic_Intersection;
}

switch(t) {
case(SetLogic_Union):
if(!fcheck && !ocheck) status = false;
break;

case(SetLogic_Intersection):
if(!fcheck || !ocheck) status = false;
break;

case(SetLogic_SymDiff):
if(fcheck == ocheck) status = false;
break;

default:
mlog << Error << "\ncheck_fo_thresh() -> "
<< "Unexpected SetLogic value of " << type << ".\n\n";
exit(1);
break;
}

return(status);
}

///////////////////////////////////////////////////////////////////////////////

const char * statlinetype_to_string(const STATLineType t) {
const char *s = (const char *) 0;

Expand Down
4 changes: 0 additions & 4 deletions met/src/basic/vx_config/config_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,6 @@ extern void check_climo_n_vx(Dictionary *dict, const int);
extern InterpMthd int_to_interpmthd(int);
extern void check_mctc_thresh(const ThreshArray &);

extern bool check_fo_thresh(const double, const double, const double, const double,
const SingleThresh &, const SingleThresh &,
const SetLogic);

extern const char * statlinetype_to_string(const STATLineType);
extern void statlinetype_to_string(const STATLineType, char *);
extern STATLineType string_to_statlinetype(const char *);
Expand Down

0 comments on commit 5fc8996

Please sign in to comment.