View source: R/045_atoms_affine_binary_operators.R
| vdot | R Documentation |
The standard inner product of x and y: both are flattened, multiplied
elementwise, and summed. Conjugate-linear in x — x is conjugated
before multiplying, matching numpy.vdot() and CVXPY's vdot(). For real
arguments conjugation is the identity, so this is the ordinary dot product.
Either argument may also be a (possibly nested) list, which is flattened before the product; the two are flattened independently, so their nesting need not match.
vdot(x, y)
x |
An Expression, numeric value, or nested list thereof. The conjugate-linear argument. |
y |
An Expression, numeric value, or nested list thereof. The linear argument. |
A scalar Expression representing sum(Conj(x) * y).
scalar_product(), cvxr_outer(), deep_flatten()
x <- Variable(3)
vdot(x, c(1, 2, 3))
a <- Variable(); b <- Variable()
vdot(list(a, b), c(1, 2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.