Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Andrew Childs
reversal-sort
Commits
306a710e
Commit
306a710e
authored
Feb 23, 2021
by
Hrishee Shastri
Browse files
rename tbs_v1 to GDC_TBS
parent
65b853dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
TripartiteBinarySort.py
View file @
306a710e
...
...
@@ -9,9 +9,10 @@ TripartiteBinarySort.py -- Implementation of the TBS algorithm for sorting bitst
along with a couple testing/analysis functions
"""
def
tbs_v1
(
perm
):
def
GDC_TBS
(
perm
):
"""
Returns the cost to sort perm using TBS
Returns the cost to sort perm using TBS as the binary sorting sequence.
(GenericDivideConquer_TripartiteBinarySort)
"""
revlist
=
permutationsort_divideconquer_tbs
(
perm
,
0
,
len
(
perm
)
-
1
)
cost
=
SBR
.
compress_reversals
(
revlist
,
len
(
perm
))
/
3
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment