hqs,hqsTest | R Documentation |
Sort a distributed vector.
hqs(cls,xname) hqsTest(vlength,clength)
cls |
A cluster for the parallel package. |
xname |
Name of a distributed vector. |
vlength |
Length of the test vector. |
clength |
Size of the test cluster. |
In hqs
, the distributed vector is sorted using the Hyperquicksort
algorithm. In keeping with partools' Leave It There philosophy,
both input and output are distributed; the sorted vector is
NOT returned to the caller. The name of the sorted distributed vector
will be chunk
. If the caller needs the sorted vector, this
can be obtained via distribcat
.
Robin Yancey, Norm Matloff
cls <- makeCluster(4) setclsinfo(cls) z <- sample(1:50,25) z # view unsorted vector distribsplit(cls,'z') # distribute it hqs(cls,'z') # view the distributed sorted vector clusterEvalQ(cls,chunk) # optionally collect the results at the caller distribcat(cls,'chunk')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.