00001 /* 00002 * Created on Aug 10, 2009 00003 * 00004 * TODO To change the template for this generated file go to 00005 * Window - Preferences - Java - Code Style - Code Templates 00006 */ 00007 package edu.tum.cs.logic.sat.weighted; 00008 00009 import edu.tum.cs.logic.Formula; 00010 00011 public class WeightedFormula { 00012 public Formula formula; 00013 public double weight; 00014 public boolean isHard; 00015 00016 public WeightedFormula(Formula f, double weight, boolean isHard) { 00017 this.formula = f; 00018 this.weight = weight; 00019 this.isHard = isHard; 00020 } 00021 00022 public String toString() { 00023 if(isHard) 00024 return formula.toString() + "."; 00025 else 00026 return weight + " " + formula.toString(); 00027 } 00028 }