vecOuterMult: Vectorized Outer Multiplication

Description Usage Arguments Value Examples

View source: R/vecOuterMult.R

Description

When computing densities and gradients, we occassionally need to compute the outer product between two vectors. Often, these vectors are stored in matrices and thus cannot be simply multiplied together. This function performs this multiplication for two matrices X and Y.

Usage

1

Arguments

X

The first matrix. Each row contains a (row) vector x, and the final result is the outer product: t(x) times y.

Y

The second matrix. Each row contains a (row) vector y, and the final result is the outer product t(x) times y.

Value

A list containing the results of the various matrix products.

Examples

1
2
3
X = matrix(1:10, nrow = 5)
Y = matrix(1, nrow = 5, ncol = 2)
MCLE:::vecOuterMult(X, Y)

rockclimber112358/MCLE documentation built on May 27, 2019, 12:15 p.m.