#ifndef __DP_QPE_CLASSIFIER_H
#define __DP_QPE_CLASSIFIER_H

#ifdef __cplusplus
extern "C" {
#endif
#if 0
}
#endif

struct dp_qpe_class_data;

enum qpe_classifier {
    QPECL_NONE,     /**< No classification, all the same      */
    QPECL_NSSL2005, /**< R(Z) intensity based classification. */
    QPECL_COUNT
};

enum mask_pos {
    MSK_Z = 0,
    MSK_KDP,
    MSK_ZDR,
    MSK_HCLASS,
    MSK_MAX
};

/** Initialize QPE context. */
struct dp_qpe_class_data * dp_qpe_class_init(struct conf_par * hdl,
                                             const char * section);

/** Free/release QPE context */
void dp_qpe_class_uninit(struct dp_qpe_class_data * qpe);

/** Get req. data mask[MSK_MAX].
    If mask[i] is 1, then corresponding moment from the
    list {z, kdp, zdr, hclass} is needed */
void dp_qpe_class_get_input_mask(const struct dp_qpe_class_data * qpe,
                                 int * mask); 

/** Compute discrete precipitation type */
int dp_qpe_class_get_type(const struct dp_qpe_class_data * qpe,
                          float z, float kdp, float zdr, int hclass);

/** Compute discrete precipitation type */
void dp_qpe_class_get_strength(const struct dp_qpe_class_data * qpe,
                               float * types, size_t types_dim,
                               float z, float kdp, float zdr, void * opt_classifier);

#if 0
{
#endif
#ifdef __cplusplus
}
#endif
#endif /* __DP_QPE_CLASSIFIER_H */
