Vector-matrix product for LazyTensor
objects.
Arguments
- v
a
LazyTensor
or aComplexLazyTensor
encoding a parameter vector.- m
a
LazyTensor
or aComplexLazyTensor
encoding a matrix.
Details
vecmatmult(v, m)
encodes, symbolically, the vector-matrix product
of vector v
and matrix m
.
Note: v
and m
should have the same inner dimension or v
should be
of dimension 1.
Examples
if (FALSE) {
v <- c(1,2,3) # arbitrary R vector of length 3
m <- matrix(runif(150 * 3), 150, 3) # arbitrary R matrix, 150 rows, 3 columns
Pm_v <- LazyTensor(v) # parameter vector LazyTensor from v
m_i <- LazyTensor(m, index = 'i') # LazyTensor from matrix m, indexed by 'i'
vm_mult <- vecmatmult(Pm_v, m_i) # symbolic matrix
}