Copyright | (c) Masahiro Sakai 2011-2015 |
---|---|
License | BSD-style |
Maintainer | masahiro.sakai@gmail.com |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
- opbBuilder :: Formula -> Builder
- wboBuilder :: SoftFormula -> Builder
- toOPBByteString :: Formula -> ByteString
- toWBOByteString :: SoftFormula -> ByteString
- writeOPBFile :: FilePath -> Formula -> IO ()
- writeWBOFile :: FilePath -> SoftFormula -> IO ()
- hPutOPB :: Handle -> Formula -> IO ()
- hPutWBO :: Handle -> SoftFormula -> IO ()
Builder for (Lazy) ByteString generation
opbBuilder :: Formula -> Builder Source
A ByteString Builder which renders a OPB format byte-string containing pseudo boolean problem.
wboBuilder :: SoftFormula -> Builder Source
A ByteString Builder which renders a WBO format byte-string containing weighted boolean optimization problem.
Lazy ByteString generation
toOPBByteString :: Formula -> ByteString Source
Generate a OPB format byte-string containing pseudo boolean problem.
toWBOByteString :: SoftFormula -> ByteString Source
Generate a WBO format byte-string containing weighted boolean optimization problem.
File I/O
writeOPBFile :: FilePath -> Formula -> IO () Source
Output a OPB file containing pseudo boolean problem.
writeWBOFile :: FilePath -> SoftFormula -> IO () Source
Output a WBO file containing weighted boolean optimization problem.
hPutOPB :: Handle -> Formula -> IO () Source
Output a OPB file to a Handle
using hPutBuilder
.
It is recommended that the Handle
is set to binary and
BlockBuffering
mode. See hSetBinaryMode
and hSetBuffering
.
This function is more efficient than hPut
. toOPBByteString
because in many cases no buffer allocation has to be done.
hPutWBO :: Handle -> SoftFormula -> IO () Source
Output a WBO file to a Handle
using hPutBuilder
.
It is recommended that the Handle
is set to binary and
BlockBuffering
mode. See hSetBinaryMode
and hSetBuffering
.
This function is more efficient than hPut
. toWBOByteString
because in many cases no buffer allocation has to be done.