cross {CLAST} R Documentation

## Special combination of Matrix and Vector

### Description

This operation is useful in recursively generating all the possible path histories of a sequential design.

### Usage

cross(A, v)


### Arguments

 A An arbitrary matrix v An arbitrary vector

### Details

For each component of v, the matrix A is duplicated with an extra right column equal to v[i]. This is added to the current output until the components of v are exhausted.

### Value

A matrix with dim(A)[2]+1 columns and dim(A)[1]*length(v) rows.

Chris J. Lloyd

### Examples

A=cbind(c(1,2),c(3,4))
v=c(5,6)
cross(A,v)
#     [,1] [,2] [,3]
#[1,]    1    3    5
#[2,]    2    4    5
#[3,]    1    3    6
#[4,]    2    4    6


[Package CLAST version 1.0.1 Index]