dot.ext: Elementwise dot product (modified dot function) (Internal...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/vbgmm.R

Description

Same as dot but handle single row matrix differently by multiplying each value but not sum them up

Usage

1
dot.ext(x, y, mydim)

Arguments

x

numeric vector or matrix

y

numeric vector or matrix

mydim

Elementwise product (if 1); otherwise defined by dot

Details

Returns the 'dot' or 'scalar' product of vectors or columns of matrices. Two vectors must be of same length, two matrices must be of the same size. If x and y are column or row vectors, their dot product will be computed IF mydim is 1 (only difference from dot).

Value

A scalar or vector of length the number of columns of x and y.

Author(s)

Yue Li

See Also

dot

Examples

1
2
dot.ext(1:5, 1:5)
dot.ext(1:5, 1:5, 1)

TargetScore documentation built on Nov. 8, 2020, 6:56 p.m.