anchor.diff:  				    (aref values j)))))
       out))
   
  -;;; Untested.
  +;;; The new sparse vector will have index array the intersection of two
  +;;; original arrays, so the implementation maybe easier.
   (defun sparse-inner-product (svec1 svec2)
  -  "Inner product of two sparse vectors."
  +  "Inner product function of two sparse vectors."
     (declare (type sparse-vector svec1 svec2))
     (assert (= (sparse-vector-len svec1)
   	     (sparse-vector-len svec2))
  
positive.code: 	  "Size mismatch, two vectors of length ~D and ~D."
  	  (sparse-vector-len svec1)
  	  (sparse-vector-len svec2))
    (let* ((ilen1 (length (sparse-vector-index svec1)))
  	 (ilen2 (length (sparse-vector-index svec2)))
  	 (vout (make-array ilen1 :initial-element 0))
  	 (iout (make-array ilen1 :initial-element 0))
  	 (iptr 0))
      ;; Loop through svec1, if there's an item of svec2 in slot i nonzero,
      ;; multiply them and add it to the new vector, or do nothing.
      (loop for i from 0 to (1- ilen1) do
  	 (loop for j from 0 to (1- ilen2) do
  	      (if (= (aref (sparse-vector-index svec2) j)
  		     (aref (sparse-vector-index svec1) i))
  		  (setf (aref vout iptr)
  			(* (aref (sparse-vector-values svec1) i)
  			   (aref (sparse-vector-values svec2) j))
  			(aref iout iptr) (aref (sparse-vector-index svec1) i)
  			(iptr (1+ iptr))))))
      (make-sparse-vector :values (ignore-trailing-zero vout)
  			:index (ignore-trailing-zero iout)
  			:len (sparse-vector-len svec1))))
  
negative.code: 	       (aref out-index i) (aref index i)))
      out))
  
  (defun sparse-vector-+-2 (svec1 svec2)
    "Helper function of general sparse vector addition."
    (declare (type sparse-vector svec1 svec2))
  