binaryOp_c: cross product binary operator.

Description Usage Arguments Details Value Note Author(s) References Examples

Description

Binary operator, given matrices x and y as arguments, return a matrix cross-product.

Usage

1
  x %c%  y

Arguments

x

(m*n) matrix.

y

(m*q) matrix.

Details

result is (n*m) matrix = t(x) %*% y, sum(x[,i]*y[,j])

Value

A double or complex matrix, with appropriate dimnames taken from x and y.

Note

This is binary operator of crossprod adjusted in nlr for more streamlined and readable. Mostly used in optimization functions, might not be called by user explicitly.

Author(s)

Hossein Riazoshams, May 2014. Email: riazihosein@gmail.com URL http://www.riazoshams.com/nlr/

References

Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language. Wadsworth & Brooks/Cole.

Examples

1
2
3
4
5
6
7
8
9
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
(1:4) %c% (1:4) ## result is sum(1^2+2^2+3^2+4^2)
 m1 <- matrix(c(1:4),nrow=2)
 m2 <- matrix(c(1:8),nrow=2)
 m1 %c% m2

nlr documentation built on July 31, 2019, 5:09 p.m.

Related to binaryOp_c in nlr...