Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small edits #115

Merged
merged 4 commits into from
Sep 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading