From f3a1d533117411031fc28bac2d4f26bd8331ec41 Mon Sep 17 00:00:00 2001 From: Raffi Sanna Date: Tue, 17 May 2022 13:19:59 -0700 Subject: [PATCH] Forward Declare Aliases to Prevent Style Warnings --- src/high-level/matrix.lisp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/high-level/matrix.lisp b/src/high-level/matrix.lisp index 243eaaba..9a2b2055 100644 --- a/src/high-level/matrix.lisp +++ b/src/high-level/matrix.lisp @@ -487,6 +487,7 @@ If :SQUARE is T, then the result will be restricted to the upper rightmost squar (tref matrix i j)))) target)))) ;;; Synonym for upper-triangular +(declaim (ftype (function (matrix)) triu)) (setf (fdefinition 'triu) #'upper-triangular) (define-extensible-function (lower-triangular lower-triangular-lisp) (matrix &key square) @@ -507,18 +508,21 @@ If :SQUARE is T, then the result will be restricted to the lower leftmost square (tref matrix i j)))) target)))) ;;; Synonym for lower-triangular +(declaim (ftype (function (matrix)) tril)) (setf (fdefinition 'tril) #'lower-triangular) (define-extensible-function (conjugate-transpose conjugate-transpose-lisp) (matrix) (:documentation "Compute the conjugate transpose of a matrix") (:method ((matrix matrix)) (map #'conjugate (transpose matrix)))) +(declaim (ftype (function (matrix)) dagger)) (setf (fdefinition 'dagger) #'conjugate-transpose) (define-extensible-function (conjugate-transpose! conjugate-transpose!-lisp) (matrix) (:documentation "Compute the conjugate transpose of a matrix, replacing the elements") (:method ((matrix matrix)) (map! #'conjugate (transpose! matrix)))) +(declaim (ftype (function (matrix)) dagger!)) (setf (fdefinition 'dagger!) #'conjugate-transpose!) (define-backend-function eig (matrix)