Exemple #1
0
func NewCube(slices, rows, columns int) *Cube {
	return &Cube{
		&DenseCub{
			common.NewCoreCub(false, slices, rows, columns, rows*columns, columns, 1, 0, 0, 0),
			make([]float64, slices*rows*columns),
		},
	}
}
Exemple #2
0
func NewSparseCube(slices, rows, columns int) *Cube {
	return &Cube{
		&SparseCub{
			common.NewCoreCub(false, slices, rows, columns, rows*columns, columns, 1, 0, 0, 0),
			make(map[int]float64),
		},
	}
}