packages feed

pseudo-boolean 0.1.2.0 → 0.1.3.0

raw patch · 7 files changed

+23/−3 lines, 7 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Data.PseudoBoolean: pbConstraints :: Formula -> [Constraint]
- Data.PseudoBoolean: pbNumConstraints :: Formula -> !Int
- Data.PseudoBoolean: pbNumVars :: Formula -> !Int
- Data.PseudoBoolean: pbObjectiveFunction :: Formula -> Maybe Sum
- Data.PseudoBoolean: wboConstraints :: SoftFormula -> [SoftConstraint]
- Data.PseudoBoolean: wboNumConstraints :: SoftFormula -> !Int
- Data.PseudoBoolean: wboNumVars :: SoftFormula -> !Int
- Data.PseudoBoolean: wboTopCost :: SoftFormula -> Maybe Integer
+ Data.PseudoBoolean: [pbConstraints] :: Formula -> [Constraint]
+ Data.PseudoBoolean: [pbNumConstraints] :: Formula -> !Int
+ Data.PseudoBoolean: [pbNumVars] :: Formula -> !Int
+ Data.PseudoBoolean: [pbObjectiveFunction] :: Formula -> Maybe Sum
+ Data.PseudoBoolean: [wboConstraints] :: SoftFormula -> [SoftConstraint]
+ Data.PseudoBoolean: [wboNumConstraints] :: SoftFormula -> !Int
+ Data.PseudoBoolean: [wboNumVars] :: SoftFormula -> !Int
+ Data.PseudoBoolean: [wboTopCost] :: SoftFormula -> Maybe Integer

Files

CHANGELOG.markdown view
@@ -1,3 +1,7 @@+0.1.3.0+-------+* relax the grammer of OPB/WBO files to allow ommitng spaces at the end of weighted terms.+ 0.1.2.0 ------- * relax the grammer of OPB/WBO files to allow various use of space characters.
pseudo-boolean.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                pseudo-boolean-version:             0.1.2.0+version:             0.1.3.0 synopsis:            Reading/Writing OPB/WBO files used in pseudo boolean competition description:         Reading\/Writing OPB\/WBO files used in pseudo boolean competition homepage:            https://github.com/msakai/pseudo-boolean
src/Data/PseudoBoolean/Attoparsec.hs view
@@ -134,7 +134,7 @@   w <- integer   oneOrMoreSpace   t <- term-  oneOrMoreSpace+  zeroOrMoreSpace -- we relax the grammar to allow omitting spaces at the end of <sum>.   return (w,t)  -- <integer>::= <unsigned_integer> | "+" <unsigned_integer> | "-" <unsigned_integer>
src/Data/PseudoBoolean/Parsec.hs view
@@ -134,7 +134,7 @@   w <- integer   oneOrMoreSpace   t <- term-  oneOrMoreSpace+  zeroOrMoreSpace -- we relax the grammar to allow omitting spaces at the end of <sum>.   return (w,t)  -- <integer>::= <unsigned_integer> | "+" <unsigned_integer> | "-" <unsigned_integer>
test/TestPBFile.hs view
@@ -30,8 +30,10 @@  case_exampleLIN_PBS_file = checkOPBFile "test/samples/example-lin-pbs.opb" case_exampleLIN_nohint_file = checkOPBFile "test/samples/example-lin-nohint.opb"+case_exampleLIN_nospaces_file = checkOPBFile "test/samples/example-lin-nospaces.opb" case_exampleWBO1_nohint_file = checkWBOFile "test/samples/example1-nohint.wbo" case_exampleWBO1_notop_file = checkWBOFile "test/samples/example1-notop.wbo"+case_exampleWBO1_nospaces_file = checkWBOFile "test/samples/example1-nospaces.wbo"  case_normalized_1096_cudf_paranoid  = checkOPBFile "test/samples/normalized-1096.cudf.paranoid.opb" case_normalized_mds_50_10_4 = checkOPBFile "test/samples/normalized-mds_50_10_4.opb"
+ test/samples/example-lin-nospaces.opb view
@@ -0,0 +1,10 @@+* #variable= 5 #constraint= 4+*+* this is a dummy instance+*+min:1 x2 -1 x3;+1 x1 +4 x2 -2 x5>=2;+-1 x1 +4 x2 -2 x5>=+3;+12345678901234567890 x4 +4 x3>=10;+* an equality constraint+2 x2 +3 x4 +2 x1 +3 x5=5;
+ test/samples/example1-nospaces.wbo view
@@ -0,0 +1,4 @@+* #variable= 1 #constraint= 2 #soft= 2 mincost= 2 maxcost= 3 sumcost= 5+soft:6;+[2]+1 x1>=1;+[3]-1 x1>=0;