value_type: Field over which the vector space is defined |
X | A type that is a model of VectorSpace |
v,w | Object of type X |
a,b | object of type convertible to X::value_type |
0 | zero vector, i.e. the identity for the addition |
0 | zero scalar, i.e. the identity for the addition in the Field X::value_type |
1 | multiplicative identity in the field over which the vector-space is defined. |
Name | Expression | Type requirements | Return type |
---|---|---|---|
Scalar multiplication | a * v | X | |
Scalar division | v / a | X | |
Scalar multiplication | v *= a | X | |
Scalar division | v /= a | X |
Name | Expression | Precondition | Semantics | Postcondition |
---|---|---|---|---|
Scalar multiplication | a*v | |||
Scalar division | v / a | a!=0 | equivalent to (1/a) * v | |
Scalar multiplication | v*=a | v=a*v | ||
Scalar division | v/=a | a!=0 | v=v/a |
Multiplicative identity | 1 v = v |
Scalar multiplication distributes over vector addition | a(v+w) = av + aw |
Vector multiplication distributes over scalar addition | (a+b)v = av + bv |
Negation | -v = (-1)*v |