blockdim: block-dimension of a multi-block object

Description Usage Arguments See Also Examples

Description

blockdim returns the blockdimension
parts returns the partitions
dims returns the dimensions
ord returns the order

Usage

1
2
3
  blockdim(x)

  blockdim(x) <- value

Arguments

x

a multiblock object

value

a list with new parts and dims

See Also

nblocks, same_blockdim

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# blockvetcor
bv = blockvector(1:10, parts=c(5,5), dims=2)
blockdim(bv)

# blockdimension associated to a blockmatrix
M = matrix(1:70, 10, 7)
bm = blockmatrix(M, parts=c(5,5,3,4), dims=c(2,2))
blockdim(bm)
parts(bm)
dims(bm)
ord(bm)

# old blockvector
old_one = blockvector(1:10, 10, 1)
blockdim(old_one)

# new blockvector
new_one = old_one

# replace blockdimension in new blockvector
blockdim(new_one) = list(parts=c(3,7), dims=2)
blockdim(new_one)

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