+
+void metrics_precalc(struct metrics *m);
+
+void metrics_calc(struct metrics *m, const union value *f, double weight,
+ int case_no);
+
+void metrics_postcalc(struct metrics *m);
+
+
+/* Linked list of case nos */
+struct case_node
+{
+ int num;
+ struct case_node *next;
+};
+
+struct weighted_value
+{
+ union value v;
+
+ /* The weight */
+ double w;
+
+ /* The cumulative weight */
+ double cc;
+
+ /* The rank */
+ double rank;
+
+ /* Linked list of cases nos which have this value */
+ struct case_node *case_nos;
+
+};
+
+
+struct weighted_value *weighted_value_create(void);
+
+void weighted_value_free(struct weighted_value *wv);
+
+
+