   (rownames [this] "Vector of row names, in order")
   (colnames [this] "Vector of column names, in order")
   (get-matrix [this] "Extract the matrix object")
+  (get-row-index [this] "Extract the row-index object")
   (rowname-subset [this names] "Get a new PNamedMatrix subsetting to just the given rownames"))
 
 ;(defn- padding-dimcounts

    (rownames [this] (get-names (.row-index this)))
    (colnames [this] (get-names (.col-index this)))
    (get-matrix [this] (.matrix this))
    (rowname-subset [this names]
      (let [row-indices (map (partial index (.row-index this)) names)
            row-index (subset (.row-index this) names)]

  are in nmat, it just subsets to the rownames that are. Should scrap other one?"
  (let [safe-names (filter
                     ; XXX This is kinda bad; should only be using protocol
                     (partial index (get-row-index nmat))
                     names)]
    (rowname-subset nmat names)))

(defn get-row-by-name [nmat row-name]
  ; XXX This is kinda bad; should only be using protocol
  (cm/get-row (get-matrix nmat) (index (get-row-index nmat) row-name)))

(defn inv-rowname-subset [nmat row-names]
  "Returns named matrix which has been subset to all the rows not in row-names"
