Hilbert: Generate Hilbert Matrices

Description Usage Arguments Details Value Examples

View source: R/ddmatrix_special.r

Description

Methods for constructing Hilbert matrices: H[i,j] = 1/(i+j-1)

Usage

1
2
Hilbert(n, type = "matrix", ..., bldim = .pbd_env$BLDIM,
  ICTXT = .pbd_env$ICTXT)

Arguments

n

number of rows and columns.

type

"matrix" or "ddmatrix".

...

Additional arguments.

bldim

blocking dimension.

ICTXT

BLACS context number.

Details

This constructs the square Hilbert matrix of order n. The return is either a matrix or a distributed matrix depending on the argument type=.

Value

Returns a matrix or a distributed matrix.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
# Save code in a file "demo.r" and run with 2 processors by
# > mpiexec -np 2 Rscript demo.r

library(pbdDMAT, quiet = TRUE)
init.grid()

dx <- Hilbert(100, type="ddmatrix")

print(dx)

finalize()

## End(Not run)

pbdDMAT documentation built on May 29, 2017, 1:23 p.m.

Search within the pbdDMAT package
Search all R packages, documentation and source code