Safe Haskell | None |
---|---|
Language | Haskell2010 |
Cycles.Reap
- trimAllResults :: String -> IO ()
- trimResult :: FilePath -> IO ()
- trimBS :: ByteString -> ByteString
- justThat :: Maybe t -> t
- trimSpaces :: ByteString -> ByteString
- trimNulls :: ByteString -> ByteString
- cutAfterComma :: ByteString -> ByteString
- parseSolution :: ByteString -> Int
- trimByteStringResult :: ByteString -> ByteString
- cutUntilChar :: Char -> String -> String
- cutAfterChar :: Char -> String -> String
- splitAt :: Char -> String -> [String]
- collectBy :: (a -> Bool) -> [a] -> ([a], [a])
- onlyJustFst :: Maybe (a, b) -> a
- collectMatchingGraphs :: FilePath -> [FilePath] -> ([FilePath], [FilePath])
- groupMatchingGraphs :: [FilePath] -> [[FilePath]]
- checkAllFinished :: [FilePath] -> IO Bool
- allEq :: Eq a => [a] -> Bool
- checkAllMatching :: [FilePath] -> IO Bool
- xyMap :: (a -> b) -> [a] -> [(a, b)]
- reapResult :: [FilePath] -> IO [ByteString]
- readBinList :: ByteString -> [Int]
- onlyJust :: Maybe (a, b) -> a
- processResult :: ByteString -> ([Int], Int)
- processGraph :: ByteString -> [[Int]]
- sluiceByteStrings :: Bool -> [ByteString] -> IO [ByteString]
- sluiceByteString :: Bool -> ByteString -> IO ByteString
- polishResult :: [ByteString] -> IO ByteString
- reapAndPolishResult :: [FilePath] -> IO ByteString
- reapAllResults :: FilePath -> FilePath -> IO ()
- gList :: [(String, [[Int]])]
Documentation
trimAllResults :: String -> IO ()
trimResult :: FilePath -> IO ()
This function trims a single result (removes all non-optimal values and saves the file)
trimBS :: ByteString -> ByteString
trimSpaces :: ByteString -> ByteString
trimNulls :: ByteString -> ByteString
parseSolution :: ByteString -> Int
cutUntilChar :: Char -> String -> String
cutAfterChar :: Char -> String -> String
collectBy :: (a -> Bool) -> [a] -> ([a], [a])
collectBy
takes a checking function and a list and returns ([x | f x], [x | not f x])
onlyJustFst :: Maybe (a, b) -> a
collectMatchingGraphs :: FilePath -> [FilePath] -> ([FilePath], [FilePath])
This function takes a maxcy filename and a list of files and outputs (matching graphs, non-matching graphs) Note: This function throws out files that are part of an incomplete series. For example, if we input graphNum_..._0_2_out.txt but don't have graphNum_..._1_2_out.txt, the output will be of the form: ([], [leftovers])
groupMatchingGraphs :: [FilePath] -> [[FilePath]]
This will group results into a lists of matching results
checkAllFinished :: [FilePath] -> IO Bool
checkAllMatching :: [FilePath] -> IO Bool
xyMap :: (a -> b) -> [a] -> [(a, b)]
"xyMap f list" is equivalent to "zip (map f list) list". Example: "xyMap (*2) [1,2,3] = [(1,2),(2,4),(3,6)]"
reapResult :: [FilePath] -> IO [ByteString]
readBinList :: ByteString -> [Int]
processResult :: ByteString -> ([Int], Int)
processGraph :: ByteString -> [[Int]]
sluiceByteStrings :: Bool -> [ByteString] -> IO [ByteString]
sluiceByteString :: Bool -> ByteString -> IO ByteString
polishResult :: [ByteString] -> IO ByteString
reapAndPolishResult :: [FilePath] -> IO ByteString
reapAllResults :: FilePath -> FilePath -> IO ()