Skip to content

Commit

Permalink
Added the SHOW-STRUCTURE function for simplicial sets from the Handbo…
Browse files Browse the repository at this point in the history
…ok p. 143.
  • Loading branch information
gheber committed Aug 3, 2015
1 parent eba4e41 commit c89b005
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@
NDGNR
NFACE
REMOVE-BIT
SHOW-STRUCTURE
SMST

;; smith.lisp
Expand Down
22 changes: 22 additions & 0 deletions src/simplicial-sets.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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)))))))))

0 comments on commit c89b005

Please sign in to comment.