Auxiliary functions added to /src/sage-interface.lisp
This commit is contained in:
parent
10ec7deeaa
commit
7cff3960f0
@ -8,11 +8,18 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;;;; Chain complexes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(DEFVAR *ASCII-NUM-START* 48)
|
(DEFVAR *ASCII-NUM-START* 48)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(DEFVAR *ASCII-NUM-END* 57)
|
(DEFVAR *ASCII-NUM-END* 57)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(DEFUN ITOA (value)
|
(DEFUN ITOA (value)
|
||||||
(if (not (integerp value)) (error "Wrong type"))
|
(if (not (integerp value)) (error "Wrong type"))
|
||||||
(if (zerop value)
|
(if (zerop value)
|
||||||
@ -37,6 +44,7 @@
|
|||||||
(DEFUN STRCAT (&rest strings) (apply 'concatenate 'string strings))
|
(DEFUN STRCAT (&rest strings) (apply 'concatenate 'string strings))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(DEFMACRO GEN (num1 num2)
|
(DEFMACRO GEN (num1 num2)
|
||||||
`(read-from-string (strcat "G" (itoa ,num1) "G" (itoa ,num2))))
|
`(read-from-string (strcat "G" (itoa ,num1) "G" (itoa ,num2))))
|
||||||
|
|
||||||
@ -146,6 +154,39 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(DEFUN MAKE-ARRAY-TO-LISTS (array)
|
||||||
|
(loop for i below (array-dimension array 0)
|
||||||
|
collect (loop for j below (array-dimension array 1)
|
||||||
|
collect (aref array i j))))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(DEFUN MAKE-ARRAY-FROM-LISTS (nrows ncols list)
|
||||||
|
(make-array (list nrows ncols) :initial-contents list))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(DEFUN BASIS_AUX1 (kchcm dim)
|
||||||
|
(basis kchcm dim))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(DEFUN ORGN_AUX1 (kchcm)
|
||||||
|
(orgn kchcm))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(DEFUN DFFR_AUX1(kchcm dim cmbn_list)
|
||||||
|
(let ((comb (cmbn dim)))
|
||||||
|
(setf (cmbn-list comb) cmbn_list)
|
||||||
|
(dffr kchcm comb)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;;;; Simplicial sets
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(DEFUN BUILD-FINITE-SS2 (list)
|
(DEFUN BUILD-FINITE-SS2 (list)
|
||||||
(declare (list list))
|
(declare (list list))
|
||||||
(let ((bspn (first list))
|
(let ((bspn (first list))
|
||||||
@ -166,5 +207,6 @@
|
|||||||
(setf (symbol-value ind-smst) rslt)
|
(setf (symbol-value ind-smst) rslt)
|
||||||
rslt)))
|
rslt)))
|
||||||
|
|
||||||
(DEFUN MAKE-ARRAY-FROM-LISTS (list)
|
|
||||||
(make-array (list (length list) (length (first list))) :initial-contents list))
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user