get_block: Extract Blocks

Description Usage Arguments Details Value See Also Examples

Description

return the specified block(s) from a multi-block

Usage

1
  get_block(x, i, j, k)

Arguments

x

a multiblock

i

integer to indicate row block-dimension

j

integer to indicate column block-dimension

k

integer to indicate slice block-dimension (not implemented yet)

Details

Use get_block to extract one single block from a multi-block object

Value

the specified block

See Also

rowblock, colblock, separate

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# blockvetcor
bv = blockvector(1:10, parts=c(5,5), dims=2)
# first block
get_block(bv, 1)
# second block
get_block(bv, 2)

# create a block-matrix with 6 blocks
A = blockmatrix(matrix(1:63, 7, 9), c(3,4), c(2,3,4))

# extract block A11
get_block(A, 1, 1)

# extract block A23
get_block(A, 2, 3)

gastonstat/blockberry documentation built on May 16, 2019, 5:44 p.m.