KP {lazy.symbolic}R Documentation

Symbolic Expression of the i-j element of the Kronecker Product

Description

Symbolic Expression of the i-j element of the Kronecker Product

Usage

KP(A, B, row = "i", col = "j", eval = 0, ntogoback = 1, print = 0)

Arguments

A

A matrix

B

B matrix

row

row index

col

col index

eval

= 1 to evaluate the result

ntogoback

n parameter of sys.parent function

print

= 1 to print the result

Details

The i-j element of A@B is
A[(i-(i-1)%%nrow(B)+nrow(B)-1)/nrow(B) ,(j-(j-1)%%ncol(B)+ncol(B)-1)/ncol(B)] * B[(i-1)%%nrow(B)+1,(j-1)%%ncol(B)+1]

When eval=1, the A and B matrices must be defined. Also, the numeric value of indices i and j must be specified.

Value

When eval=0, the symbolic expression will be returned.
When eval=1, a list of ABij, value, i, and j will be returned.

Examples

## Not run: 
KP(A,B)
KP(D,E, row="p", col="q")

# with evaluation
A <- demomat(2,2,root="a"); B <- demomat(3,3,root="b")
i <- 3; j <-4
KP(A,B,eval=1,print=1)

## End(Not run)


[Package lazy.symbolic version 0.1.3 Index]