;;; Lisplab, matrix2-integer-constructors.lisp ;;; Level2 constructors for integer matrices ;;; Copyright (C) 2012 Joern Inge Vestgaarden ;;; ;;; This program is free software; you can redistribute it and/or modify ;;; it under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 2 of the License, or ;;; (at your option) any later version. ;;; ;;; This program is distributed in the hope that it will be useful, ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License along ;;; with this program; if not, write to the Free Software Foundation, Inc., ;;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. (in-package :lisplab) (defun ub1new (value rows cols) (mnew 'matrix-ub1 value rows cols)) (defun ub1mat (x) (mmat 'matrix-ub1 x)) (defun ub1row (&rest args) (apply #'mrow 'matrix-ub1 args)) (defun ub1col (&rest args) (apply #'mcol 'matrix-ub1 args)) (defun ub1rand (rows cols) (mmap 'matrix-ub1 (lambda (x) (declare (ignore x)) (random #xff)) (ub1new 0 rows cols))) (defun ub8new (value rows cols) (mnew 'matrix-ub8 value rows cols)) (defun ub8mat (x) (mmat 'matrix-ub8 x)) (defun ub8row (&rest args) (apply #'mrow 'matrix-ub8 args)) (defun ub8col (&rest args) (apply #'mcol 'matrix-ub8 args)) (defun ub8rand (rows cols) (mmap 'matrix-ub8 (lambda (x) (declare (ignore x)) (random #xff)) (ub8new 0 rows cols))) (defun ub16new (value rows cols) (mnew 'matrix-ub16 value rows cols)) (defun ub16mat (x) (mmat 'matrix-ub16 x)) (defun ub16row (&rest args) (apply #'mrow 'matrix-ub16 args)) (defun ub16col (&rest args) (apply #'mcol 'matrix-ub16 args)) (defun ub16rand (rows cols) (mmap 'matrix-ub16 (lambda (x) (declare (ignore x)) (random #xffff)) (ub16new 0 rows cols))) (defun ub32new (value rows cols) (mnew 'matrix-ub32 value rows cols)) (defun ub32mat (x) (mmat 'matrix-ub32 x)) (defun ub32row (&rest args) (apply #'mrow 'matrix-ub32 args)) (defun ub32col (&rest args) (apply #'mcol 'matrix-ub32 args)) (defun ub32rand (rows cols) (mmap 'matrix-ub32 (lambda (x) (declare (ignore x)) (random #xffffffff)) (ub32new 0 rows cols)))