(in-package :clf)

;; индексы

(defclass cell-index ()
  ((index-list :initarg :index-list
	       :accessor index-list)))

(defmethod index (&rest numbers)
  (make-instance 'cell-index
		 :index-list numbers))

;; акцессоры индексов

(defmethod x-index ((index cell-index))
  (elt (index-list index) 0))

(defmethod y-index ((index cell-index))
  (elt (index-list index) 1))

(defmethod z-index ((index cell-index))
  (elt (index-list index) 2))

(defmethod dimensions ((index cell-index))
  (length (index-list index)))