Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
antik
gsll
Commits
cc83456a
Commit
cc83456a
authored
Dec 10, 2014
by
Liam M. Healy
Browse files
Rewrite permutation test without using reader macro
parent
dfbc9750
Changes
1
Hide whitespace changes
Inline
Side-by-side
data/permutation.lisp
View file @
cc83456a
;; Permutations
;; Liam Healy, Sun Mar 26 2006 - 11:51
;; Time-stamp: <201
2-01-13 12:01:35
EST permutation.lisp>
;; Time-stamp: <201
4-12-08 23:19:56
EST permutation.lisp>
;;
;; Copyright 2006, 2007, 2008, 2009, 2010, 2011 Liam M. Healy
;; Copyright 2006, 2007, 2008, 2009, 2010, 2011
, 2012, 2014
Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
...
...
@@ -357,7 +357,7 @@
(
swap-elements
perm-1
1
3
)
(
grid:contents
perm-1
))
(
let
((
perm-1
(
make-permutation
4
t
))
;permute-vector
(
intvec
#
31m
(
11
22
33
44
)))
(
intvec
(
grid:make-foreign-array
'
(
signed-byte
32
)
:initial-contents
'
(
11
22
33
44
)))
)
(
set-identity
perm-1
)
(
swap-elements
perm-1
1
3
)
(
swap-elements
perm-1
0
2
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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