Skip to contents

Vector-matrix product for LazyTensor objects.

Usage

vecmatmult(v, m)

Arguments

v

a LazyTensor or a ComplexLazyTensor encoding a parameter vector.

m

a LazyTensor or a ComplexLazyTensor encoding a matrix.

Value

a LazyTensor or a ComplexLazyTensor.

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.

Author

Chloe Serre-Combe, Amelie Vernay

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
}