deps/kb_meme/meme-5.0.1/src/momo-input.c
/**
 * Returns whether the given value in the filter field passes
 * the filter threshold specified by the user
 */
Returns whether the given value in the filter field passes
the filter threshold specified by the user
Returns whether the given value in the filter field passes the filter threshold specified by the user
bool check_filter_threshold(char* value_str,
                                 MOMO_OPTIONS_T* options) {
  if (!options->filter) {
    return true;
  } else {
    FILTERTYPE_T filter_type = options->filter_type;
    double filter_threshold = options->filter_threshold;
    double value = atof(value_str);
    if (filter_type == Le) {
      return (value <= filter_threshold);
    } else if (filter_type == Lt) {
      return (value < filter_threshold);
    } else if (filter_type == Eq) {
      return (value == filter_threshold);
    } else if (filter_type == Gt) {
      return (value > filter_threshold);
    } else { 
      return (value >= filter_threshold);
    }
  }
}
bool check_filter_threshold ( char * value_str , MOMO_OPTIONS_T * options ) { if ( ! options -> filter ) { return true ; } else { FILTERTYPE_T filter_type = options -> filter_type ; double filter_threshold = options -> filter_threshold ; double value = atof ( value_str ) ; if ( filter_type == Le ) { return ( value <= filter_threshold ) ; } else if ( filter_type == Lt ) { return ( value < filter_threshold ) ; } else if ( filter_type == Eq ) { return ( value == filter_threshold ) ; } else if ( filter_type == Gt ) { return ( value > filter_threshold ) ; } else { return ( value >= filter_threshold ) ; } } }
Returns whether the given value in the filter field passes
 the filter threshold specified by the user
Returns whether the given value in the filter field passes the filter threshold specified by the user
// filter_type = ge