Copyright | (c) Masahiro Sakai 2012 |
---|---|
License | BSD-style |
Maintainer | masahiro.sakai@gmail.com |
Stability | provisional |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
References:
- SDPA (Semidefinite Programming Algorithm) User's Manual http://sdpa.indsys.chuo-u.ac.jp/~fujisawa/sdpa_doc.pdf
- http://euler.nmt.edu/~brian/sdplib/FORMAT
- data Problem = Problem {}
- type Matrix = [Block]
- type Block = Map (Int, Int) Rational
- mDim :: Problem -> Int
- nBlock :: Problem -> Int
- blockElem :: Int -> Int -> Block -> Rational
- type DenseMatrix = [DenseBlock]
- type DenseBlock = [[Rational]]
- denseMatrix :: DenseMatrix -> Matrix
- denseBlock :: DenseBlock -> Block
- diagBlock :: [Rational] -> Block
- render :: Problem -> ShowS
- renderSparse :: Problem -> ShowS
- parseDataString :: SourceName -> String -> Either ParseError Problem
- parseDataFile :: FilePath -> IO (Either ParseError Problem)
- parseSparseDataString :: SourceName -> String -> Either ParseError Problem
- parseSparseDataFile :: FilePath -> IO (Either ParseError Problem)
The problem type
Construction
type DenseMatrix = [DenseBlock] Source
type DenseBlock = [[Rational]] Source
denseMatrix :: DenseMatrix -> Matrix Source
denseBlock :: DenseBlock -> Block Source
Rendering
renderSparse :: Problem -> ShowS Source
Parsing
parseDataString :: SourceName -> String -> Either ParseError Problem Source
Parse a SDPA format (.dat) string.
parseDataFile :: FilePath -> IO (Either ParseError Problem) Source
Parse a SDPA format file (.dat).
parseSparseDataString :: SourceName -> String -> Either ParseError Problem Source
Parse a SDPA sparse format (.dat-s) string.
parseSparseDataFile :: FilePath -> IO (Either ParseError Problem) Source
Parse a SDPA sparse format file (.dat-s).