diff --git a/CHANGELOG.md b/CHANGELOG.md index 189162f..eb90c9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -88,3 +88,7 @@ ## X.X.X.X -- XXXX.XX.XX * Adjust README formatting + +* Add Hype section to README + +* Some code cleanup diff --git a/assets/images/ackley_deps.png b/assets/images/ackley_deps.png index 8347a5f..39d4a57 100644 Binary files a/assets/images/ackley_deps.png and b/assets/images/ackley_deps.png differ diff --git a/src/Data/Tensort/Tensort.hs b/src/Data/Tensort/Tensort.hs index a997884..0970872 100644 --- a/src/Data/Tensort/Tensort.hs +++ b/src/Data/Tensort/Tensort.hs @@ -39,21 +39,21 @@ tensort :: TensortProps -> Sortable -> Sortable tensort _ (SortBit []) = SortBit [] tensort _ (SortBit [x]) = SortBit [x] tensort tsProps (SortBit [x, y]) = subAlgorithm tsProps (SortBit [x, y]) -tensort tsProps (SortBit xs) = do +tensort tsProps (SortBit xs) = let bits = randomizeList 143 (SortBit xs) - let bytes = rawToBytes tsProps bits - let tensorStacks = createInitialTensors tsProps bytes - let topTensor = reduceTensorStacks tsProps tensorStacks - fromSBitBits (getSortedBitsFromTensor (subAlgorithm tsProps) topTensor) + bytes = rawToBytes tsProps bits + tensorStacks = createInitialTensors tsProps bytes + topTensor = reduceTensorStacks tsProps tensorStacks + in fromSBitBits (getSortedBitsFromTensor (subAlgorithm tsProps) topTensor) tensort _ (SortRec []) = SortRec [] tensort _ (SortRec [x]) = SortRec [x] tensort tsProps (SortRec [x, y]) = subAlgorithm tsProps (SortRec [x, y]) -tensort tsProps (SortRec xs) = do +tensort tsProps (SortRec xs) = let recs = randomizeList 143 (SortRec xs) - let bytes = rawToBytes tsProps recs - let tensorStacks = createInitialTensors tsProps bytes - let topTensor = reduceTensorStacks tsProps tensorStacks - fromSBitRecs (getSortedBitsFromTensor (subAlgorithm tsProps) topTensor) + bytes = rawToBytes tsProps recs + tensorStacks = createInitialTensors tsProps bytes + topTensor = reduceTensorStacks tsProps tensorStacks + in fromSBitRecs (getSortedBitsFromTensor (subAlgorithm tsProps) topTensor) -- | Sort a Sortable list using a Standard Tensort algorithm with a 4-Bit -- Bytesize