mat: add MutableVector interface
@@ -17,6 +17,7 @@ var (
_ allMatrix = vector
_ Vector = vector
_ Reseter = vector
+ _ MutableVector = vector
)
// Vector is a vector.
@@ -26,6 +27,12 @@ type Vector interface {
Len() int
}
+// A MutableVector can set elements of a vector.
+type MutableVector interface {
+ Vector
+ SetVec(i int, v float64)
+}
+
// TransposeVec is a type for performing an implicit transpose of a Vector.
// It implements the Vector interface, returning values from the transpose
// of the vector within.
