   (flip [_]
     (BandRegion. n m ku kl (case uplo 121 122 122 121 0) diag)))
 
+(defn square-band-region
+  [^long n ^long kl ^long ku ^Boolean lower?]
+  (let [kl (min (max 0 (dec n)) kl)
+        ku (min (max 0 (dec n)) ku)]
+    (BandRegion. n n kl ku (if-not lower? 121 122)
+                 (if (or (= -1 kl) (= -1 ku)) 132 131))))
+
 (defn band-region
   ([^long m ^long n ^long kl ^long ku]
    (let [kl (min (max 0 (dec m)) kl)

  ([^long n ^long k lower? diag-unit?]
   (let [diag-pad (if diag-unit? -1 0)]
     (if lower?
       (band-region n n (min (max 0 k) (dec n)) diag-pad)
       (band-region n n diag-pad (min (max 0 k) (dec n)))))))

(defn sb-region
  ([^long n ^long k lower?]
   (if lower?
     (band-region n n (min (max 0 k) (dec n)) 0)
     (band-region n n 0 (min (max 0 k) (dec n))))))

(deftype GERegion [^long m ^long n]
  Object

     :kl (.kl r)
     :ku (.ku r)
     :surface (.surface r)
     :uplo (dec-property (.uplo r))
     :diag (if (.isDiagUnit r) :unit :non-unit)})
  Region
  (accessible [_ _ _]
