Matrix Processing in Scheme

Althought matrix is just multi-list in scheme, the methods for processing matrics is highly distinguished from that for normal lists.

Transpose

To transpose a given matrix

Help functions codereveal hidden content

;;transpose : matrix -> matrix
;;to generate the transpose of matrix
;;example : (transpose (list (list 1) (list 2) (list 3))) => (list (list 1 2 3))
(define (transpose mat)
  (transpose-core
   mat
   (length (first mat))
   1))
 
sci/cs/scheme/matrics.txt · Last modified: 2006/06/22 01:09 by flanker27
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki