Added the SHOW-STRUCTURE function for simplicial sets from the Handbook p. 143.

This commit is contained in:
Gerd Heber 2015-08-03 17:40:37 -05:00
parent eba4e41e1f
commit c89b0054ab
2 changed files with 23 additions and 0 deletions

View File

@ -479,6 +479,7 @@
NDGNR
NFACE
REMOVE-BIT
SHOW-STRUCTURE
SMST
;; smith.lisp

View File

@ -490,3 +490,25 @@
(declare (type gmsm gmsm))
(unless (check-faces cmpr face dmns gmsm)
(setf rslt nil))))))
(DEFUN SHOW-STRUCTURE (smst dmns)
(declare
(type simplicial-set smst)
(fixnum dmns))
"--------------------------------------------------------------[function-doc]
SHOW-STRUCTURE
Args: (smst dmns)
Shows the structure of the simplicial set SMST (i.e., generators and faces)
from dimension 0 up to and including dimension DMNS.
------------------------------------------------------------------------------"
(when (<= 0 dmns)
(dotimes (i (1+ dmns))
(format t "~2%Dimension = ~D:" i)
(case i
(0 (format t "~2%~8TVertices : ~8T~A" (basis smst 0)))
(otherwise
(dolist (s (basis smst i))
(format t "~2%~8TSimplex : ~A~2%~16TFaces : ~A"
s (mapcar #'(lambda (j) (face smst j i s))
(<a-b> 0 i)))))))))