chiark
/
gitweb
/
~mdw
/
catacomb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
70f0901
)
utils/permute.lisp (demonstrate-permutation-network): Use keyword args.
author
Mark Wooding
<mdw@distorted.org.uk>
Sat, 3 Feb 2024 23:31:09 +0000
(23:31 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sat, 3 Feb 2024 23:35:55 +0000
(23:35 +0000)
utils/permute.lisp
patch
|
blob
|
blame
|
history
diff --git
a/utils/permute.lisp
b/utils/permute.lisp
index 7d7cb563fcde2a6985801e34fd30dd25ce398a13..b41b4d46a74f82187ec1dca178e6dfe15423ccdb 100644
(file)
--- a/
utils/permute.lisp
+++ b/
utils/permute.lisp
@@
-205,7
+205,9
@@
(defun print-permutation-network (steps &optional (stream *standard-output*))
(terpri stream)))
(defun demonstrate-permutation-network
(terpri stream)))
(defun demonstrate-permutation-network
- (n steps &optional reference (stream *standard-output*))
+ (n steps
+ &key reference
+ (stream *standard-output*))
"Print, on STREAM, a demonstration of the permutation STEPS.
Begin, on the left, with the integers from 0 up to N - 1. For each
"Print, on STREAM, a demonstration of the permutation STEPS.
Begin, on the left, with the integers from 0 up to N - 1. For each
@@
-769,13
+771,13
@@
(let* ((ip #(58 50 42 34 26 18 10 2
(let ((benes-network (benes-search fixed-ip)))
(print-permutation-network benes-network)
(let ((benes-network (benes-search fixed-ip)))
(print-permutation-network benes-network)
- (demonstrate-permutation-network 64 benes-network fixed-ip))
+ (demonstrate-permutation-network 64 benes-network
:reference
fixed-ip))
(terpri)
(print-permutation-network trad-network)
(terpri)
(print-permutation-network trad-network)
- (demonstrate-permutation-network 64 trad-network fixed-ip)
+ (demonstrate-permutation-network 64 trad-network
:reference
fixed-ip)
(terpri)
(print-permutation-network new-network)
(terpri)
(print-permutation-network new-network)
- (demonstrate-permutation-network 64 new-network fixed-ip))
+ (demonstrate-permutation-network 64 new-network
:reference
fixed-ip))
#+example
(benes-search-des #( 0 0 0 0
#+example
(benes-search-des #( 0 0 0 0