/** * This class counts the number of variables appearing in the given formula. * */ LitCounter { {{ Float apply(Weight w) { System.out.println(" weight ====================" + w.get_v()); return new Float(w.get_v());} Float combine(ConcreteClause c, Float w, Float lit_count) { return lit_count*w; } }} }