x = matrix(1:10, ncol = 2)
y = matrix(1:15, ncol = 3)
getCPI(x, y, 'combine')
getCPI(x, y, 'tensorprod')
getCPI(x, y, type = c('combine', 'tensorprod'))
getCPI(x, y, type = c('tensorprod', 'combine'))
Run the code above in your browser using DataLab