Learn R Programming

gmp (version 0.4-4)

matrix: Matrix manipulation with gmp

Description

Overload of all standard tools usefull for matrix manipulation adapted to large numbers.

Usage

matrix.bigz(data = NA, nrow = 1, ncol = 1, byrow = FALSE, dimnames = NULL, mod = NA,...)

Arguments

data
An optional data vector
nrow
the desired number of rows
ncol
the desired number of columns
byrow
logical. If 'FALSE' (the default) the matrix is filled by columns, otherwise the matrix is filled by rows.
dimnames
Not implemented
mod
Optional modulus
...
Not used

Value

  • A matrix of class bigz or bigq

Details

Extract function is the same use for vector or matrix. Then, x[i] return same value as x[i,]. Special features concerning bigz class: modulus can be Unset{Just play with large numbers} Set with a vector of size 1{Example: matrix.bigz(1:6,nrow=2,ncol=3,mod=7) This mean you work in Z/nZ, for the whole matrix. It is the only case where %*% and solve functions will work in Z/nZ} Set with a vector smaller than data{Example: matrix.bigz(1:6,nrow=2,ncol=3,mod=1:5) then modulus is repeated to the end of data. This can be used to define matrix with a different modulus at each row } Set with same size as data{Modulus is defined for each cell}

See Also

Solving linear algebra system solve.bigz; matrix