st.runif: Generate Random Samples from Uniform Distribution on Stiefel...

Description Usage Arguments Value References Examples

View source: R/st_runif.R

Description

It generates n random samples from Stiefel manifold St(p,r) according to the procedure described in the reference.

Usage

1
st.runif(n, p, r, rtype = c("list", "array"))

Arguments

n

number of samples to be generated.

p

original dimension (of the ambient space).

r

dimension of the frame.

rtype

return type; either 3d-array ("array") or list ("list").

Value

a length n list or 3d array of size (p,r,n).

References

\insertRef

chikuse_statistics_2003RiemStiefel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## let's simply draw 3 times from St(10,5)
dat3 = st.runif(3, 10, 5, rtype="array")

## visualize
opar <- par(no.readonly=TRUE)
par(mfrow=c(1,3))
image(dat3[,,1], main="sample 1")
image(dat3[,,2], main="sample 2")
image(dat3[,,3], main="sample 3")
par(opar)

RiemStiefel documentation built on March 26, 2020, 7:48 p.m.