func (t *TriBandDense) TTri() Triangular {
	return TransposeTri{t}
}
TTri performs an implicit transpose by returning the receiver inside a TransposeTri.
package mat
import (
	"gonum.org/v1/gonum/blas"
	"gonum.org/v1/gonum/blas/blas64"
)
var (
	triBand TriBanded
	_       Banded     = triBand
	_       Triangular = triBand
	triBandDense *TriBandDense
	_            Matrix           = triBandDense
	_            Triangular       = triBandDense
	_            Banded           = triBandDense
	_            TriBanded        = triBandDense
	_            RawTriBander     = triBandDense
	_            MutableTriBanded = triBandDense
)
type TriBanded interface {
	Banded
	Triangle() (n int, kind TriKind)
	TTri() Triangular
	TriBand() (n, k int, kind TriKind)
	TTriBand() TriBanded
}
type RawTriBander interface {
	RawTriBand() blas64.TriangularBand
}
type MutableTriBanded interface {
	TriBanded
	SetTriBand(i, j int, v float64)
}
var (
	tTriBand TransposeTriBand
	_        Matrix               = tTriBand
	_        TriBanded            = tTriBand
	_        Untransposer         = tTriBand
	_        UntransposeTrier     = tTriBand
	_        UntransposeBander    = tTriBand
	_        UntransposeTriBander = tTriBand
)
type TransposeTriBand struct {
	TriBanded TriBanded
}
func (t TransposeTriBand) At(i, j int) float64 {
	return t.TriBanded.At(j, i)
}
func (t TransposeTriBand) Dims() (r, c int) {
	c, r = t.TriBanded.Dims()
	return r, c
}
func (t TransposeTriBand) T() Matrix {
	return t.TriBanded
}
func (t TransposeTriBand) Triangle() (int, TriKind) {
	n, upper := t.TriBanded.Triangle()
	return n, !upper
}
func (t TransposeTriBand) TTri() Triangular {
	return t.TriBanded
}
func (t TransposeTriBand) Bandwidth() (kl, ku int) {
	kl, ku = t.TriBanded.Bandwidth()
	return ku, kl
}
func (t TransposeTriBand) TBand() Banded {
	return t.TriBanded
}
func (t TransposeTriBand) TriBand() (n, k int, kind TriKind) {
	n, k, kind = t.TriBanded.TriBand()
	return n, k, !kind
}
func (t TransposeTriBand) TTriBand() TriBanded {
	return t.TriBanded
}
func (t TransposeTriBand) Untranspose() Matrix {
	return t.TriBanded
}
func (t TransposeTriBand) UntransposeTri() Triangular {
	return t.TriBanded
}
func (t TransposeTriBand) UntransposeBand() Banded {
	return t.TriBanded
}
func (t TransposeTriBand) UntransposeTriBand() TriBanded {
	return t.TriBanded
}
type TriBandDense struct {
	mat blas64.TriangularBand
}
func NewTriBandDense(n, k int, kind TriKind, data []float64) *TriBandDense {
	if n <= 0 || k < 0 {
		if n == 0 {
			panic(ErrZeroLength)
		}
		panic("mat: negative dimension")
	}
	if k+1 > n {
		panic("mat: band out of range")
	}
	bc := k + 1
	if data != nil && len(data) != n*bc {
		panic(ErrShape)
	}
	if data == nil {
		data = make([]float64, n*bc)
	}
	uplo := blas.Lower
	if kind {
		uplo = blas.Upper
	}
	return &TriBandDense{
		mat: blas64.TriangularBand{
			Uplo:   uplo,
			Diag:   blas.NonUnit,
			N:      n,
			K:      k,
			Data:   data,
			Stride: bc,
		},
	}
}
func (t *TriBandDense) Dims() (r, c int) {
	return t.mat.N, t.mat.N
}
func (t *TriBandDense) T() Matrix {
	return Transpose{t}
}
func (t *TriBandDense) IsZero() bool {
	return t.mat.Stride == 0
}
func (t *TriBandDense) Reset() {
	t.mat.N = 0
	t.mat.Stride = 0
	t.mat.K = 0
	t.mat.Data = t.mat.Data[:0]
}
func (t *TriBandDense) Zero() {
	if t.isUpper() {
		for i := 0; i < t.mat.N; i++ {
			u := min(1+t.mat.K, t.mat.N-i)
			zero(t.mat.Data[i*t.mat.Stride : i*t.mat.Stride+u])
		}
		return
	}
	for i := 0; i < t.mat.N; i++ {
		l := max(0, t.mat.K-i)
		zero(t.mat.Data[i*t.mat.Stride+l : i*t.mat.Stride+t.mat.K+1])
	}
}
func (t *TriBandDense) isUpper() bool {
	return isUpperUplo(t.mat.Uplo)
}
func (t *TriBandDense) triKind() TriKind {
	return TriKind(isUpperUplo(t.mat.Uplo))
}
func (t *TriBandDense) Triangle() (n int, kind TriKind) {
	return t.mat.N, t.triKind()
}