Ejemplo n.º 1
0
// Add returns a new Matrix that is the sum of this Matrix and other.
func (d *Matrix) Add(other matrix.Matrix) matrix.Matrix {
	if other.IsSparse() {
		return d.addSparse(other)
	}
	dother := other.(*Matrix)
	return d.addDense(dother)
}