dot
Lexeme parser dot parses the character '.' and skips any
trailing white space. Returns the string ".".
Compose two strategies sequentially. This is the analogue to function
composition on strategies.
For any strategies
strat1,
strat2, and
strat3,
(strat1 `dot` strat2) `dot` strat3 == strat1 `dot` (strat2 `dot` strat3)
strat1 `dot` strat1 = strat1
strat1 `dot` r0 == strat1
strat2 `dot` strat1 == strat2 . withStrategy strat1
Compute the inner product of two vectors or (equivalently) convert a
vector
f a into a covector
f a -> a.
>>> V2 1 2 `dot` V2 3 4
11
Compute the inner product of two vectors or (equivalently) convert a
vector
f a into a covector
f a -> a.
>>> V2 1 2 `dot` V2 3 4
11
Token parser dot parses the character '.' and skips any
trailing white space. Returns the string ".".
The document dot contains a single dot, ".".
The document dot contains a single dot, ".".
Add a dot accent above a symbol, as used to denote a derivative, like
<math>.
The document dot consists of a period, ".".
forVector2 number_ $ \xs ys ->
Vector.dot xs ys
==
Matrix.multiply (Matrix.singleRow xs) (Matrix.singleColumn ys) ! ((),())
QC.forAll (QC.choose (1,100)) $ \dim ->
QC.forAll (QC.choose (0, dim-1)) $ \i ->
QC.forAll (QC.choose (0, dim-1)) $ \j ->
Vector.dot
(Vector.unit (shapeInt dim) i)
(Vector.unit (shapeInt dim) j)
==
(fromIntegral (fromEnum (i==j)) :: Number_)
Dot product (also known as scalar or inner product).
For two vectors, mathematically represented as
a =
a1,a2,...,an and
b = b1,b2,...,bn, the dot product is
a . b = a1*b1 + a2*b2 + ... + an*bn.
Some properties are derived from this. The dot product of a vector
with itself is the square of its magnitude (
norm), and the dot
product of two orthogonal vectors is zero.
Dot product of two points 'dot (x :+ y) (a :+ b) == x * a + y * b'
'dot z w == magnitude z * magnitude w * cos (phase z - phase w)'
The document dot contains a single dot, ".".