func (mat General32) RowSlice(i, j int) General32 {
	return General32{Rows: j - i, Cols: mat.Cols, Stride: mat.Stride, Data: mat.Data[i*mat.Stride : j*mat.Stride]}
}
RowSlice provides view on submatrix(startRow,endRow) as General32
returned matrix can be casted to *General32
package neuralnetwork
import (
	"sort"
	"gonum.org/v1/gonum/blas/blas32"
	"gonum.org/v1/gonum/blas/blas64"
)
var (
	_ Matrix         = &GeneralXX{}
	_ Mutable        = &GeneralXX{}
	_ RawRowViewerXX = &GeneralXX{}
	_ sort.Interface = &GeneralXX{}
	_ Slicer         = &GeneralXX{}
)
type RawMatrixer32 interface {
	RawMatrix() blas32General
}
type RawMatrixer64 interface {
	RawMatrix() blas64General
}
type RawRowViewer32 interface {
	RawRowView(i int) []float32
}
type RawRowViewer64 interface {
	RawRowView(i int) []float64
}
type RawRowViewerXX = RawRowViewer32
type RawRowViewer = RawRowViewer64
type Mutable interface {
	Set(i, j int, v float64)
	Matrix
}
type Slicer interface {
	Slice(i, j, k, l int) Matrix
}
type blas32General = blas32.General
type blas64General = blas64.General
type blasXXGeneral = blas32General
type General32 blas32.General
type General64 blas64.General
type GeneralXX = General32
type transposed struct{ Matrix }
func (mat transposed) Dims() (r, c int) {
	c, r = mat.Matrix.Dims()
	return
}
func (mat transposed) At(i, j int) float64 {
	return mat.Matrix.At(j, i)
}
func (mat transposed) T() Matrix {
	return mat.Matrix
}
func (mat General32) Dims() (r, c int) {
	return mat.Rows, mat.Cols
}
func (mat General32) At(r, c int) float64 {
	return float64(mat.Data[c+r*mat.Stride])
}
func (mat General32) Set(r, c int, v float64) {
	mat.Data[c+r*mat.Stride] = float32(v)
}
func (mat General32) T() Matrix {
	return transposed{mat}
}
func (mat General64) Dims() (r, c int) {
	return mat.Rows, mat.Cols
}
func (mat General64) At(r, c int) float64 {
	return float64(mat.Data[c+r*mat.Stride])
}
func (mat General64) Set(r, c int, v float64) {
	mat.Data[c+r*mat.Stride] = float64(v)
}
func (mat General64) T() Matrix {
	return transposed{mat}
}
func (mat General32) RawMatrix() blas32General {
	return blas32General{Rows: mat.Rows, Cols: mat.Cols, Stride: mat.Stride, Data: mat.Data}
}
func (mat General64) RawMatrix() blas64General {
	return blas64General{Rows: mat.Rows, Cols: mat.Cols, Stride: mat.Stride, Data: mat.Data}
}
func (mat General32) RawRowView(i int) []float32 {
	return mat.Data[i*mat.Stride : i*mat.Stride+mat.Cols]
}
func (mat General64) RawRowView(i int) []float64 {
	return mat.Data[i*mat.Stride : i*mat.Stride+mat.Cols]
}
func (mat General32) Len() int {
	return mat.Rows
}
func (mat General64) Len() int {
	return mat.Rows
}
func (mat General32) Less(i, j int) bool {
	if mat.Cols != 1 {
		panic("cols != 1")
	}
	return mat.Data[i*mat.Stride] < mat.Data[j*mat.Stride]
}
func (mat General64) Less(i, j int) bool {
	if mat.Cols != 1 {
		panic("cols != 1")
	}
	return mat.Data[i*mat.Stride] < mat.Data[j*mat.Stride]
}
func (mat General32) Swap(i, j int) {
	for k, p, q := 0, i*mat.Stride, j*mat.Stride; k < mat.Cols; k, p, q = k+1, p+1, q+1 {
		mat.Data[p], mat.Data[q] = mat.Data[q], mat.Data[p]
	}
}
func (mat General64) Swap(i, j int) {
	for k, p, q := 0, i*mat.Stride, j*mat.Stride; k < mat.Cols; k, p, q = k+1, p+1, q+1 {
		mat.Data[p], mat.Data[q] = mat.Data[q], mat.Data[p]
	}
}
type general32FastSwapT struct {
	General32
	tmp []float32
}
func (g general32FastSwapT) Swap(i, j int) {
	ipos := i * g.Stride
	copy(g.tmp, g.Data[ipos:ipos+g.Cols])
	jpos := j * g.Stride
	copy(g.Data[ipos:ipos+g.Cols], g.Data[jpos:jpos+g.Cols])
	copy(g.Data[jpos:jpos+g.Cols], g.tmp)
}
func general32FastSwap(g blas32.General) general32FastSwapT {
	return general32FastSwapT{General32(g), make([]float32, g.Cols)}
}
type general64FastSwapT struct {
	General64
	tmp []float64
}
func (g general64FastSwapT) Swap(i, j int) {
	ipos := i * g.Stride
	jpos := j * g.Stride
	if g.Cols == 1 {
		g.Data[ipos], g.Data[jpos] = g.Data[jpos], g.Data[ipos]
		return
	}
	copy(g.tmp, g.Data[ipos:ipos+g.Cols])
	copy(g.Data[ipos:ipos+g.Cols], g.Data[jpos:jpos+g.Cols])
	copy(g.Data[jpos:jpos+g.Cols], g.tmp)
}
func general64FastSwap(g blas64.General) general64FastSwapT {
	return general64FastSwapT{General64(g), make([]float64, g.Cols)}
}
func (mat General32) Slice(i, j, k, l int) Matrix {
	return General32{Rows: j - i, Cols: l - k, Stride: mat.Stride, Data: mat.Data[i*mat.Stride+k : (j-1)*mat.Stride+l]}
}
func (mat General64) Slice(i, j, k, l int) Matrix {
	return General64{Rows: j - i, Cols: l - k, Stride: mat.Stride, Data: mat.Data[i*mat.Stride+k : (j-1)*mat.Stride+l]}
}