Skip to content

Commit

Permalink
Merge pull request #115 from kaBeech/small-edits
Browse files Browse the repository at this point in the history
Small edits
  • Loading branch information
kaBeech authored Sep 8, 2024
2 parents c84bf08 + a201b31 commit 977c5eb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,7 @@
## X.X.X.X -- XXXX.XX.XX

* Adjust README formatting

* Add Hype section to README

* Some code cleanup
Binary file modified assets/images/ackley_deps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 10 additions & 10 deletions src/Data/Tensort/Tensort.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 977c5eb

Please sign in to comment.