Generate nSamples many Longegers from 0 to poolSize such that no Longeger is selected twice.
Generate nSamples many Longegers from 0 to poolSize such that no Longeger is selected twice. The duplication constraLong is achieved via rejection sampling.
The number of random samples to select from the pool
The size of the total pool of candidates to sample from
Longernal state of the random number generator
The
randomly selected elements from the pool.nSamples
Restore the heap property for a heap with an out of place element
at position
.elt
Restore the heap property for a heap with an out of place element
at position
. This works with a heap pair where arr1 carries
the weights and arr2 holds the corresponding elements.
elt
: DenseVector[Double] Heap carrying the weights
: DenseVector[Int] Heap holding the corresponding elements
Original matrix.
Indices to keep. Each row consists of the indices of the columns.
Number of neighbors.
The corresponding submatrix.
A (pseudo)-random number generator for floats in the range [0,1]
A (pseudo)-random number generator for floats in the range [0,1]
The Longernal state of the rng
A (pseudo)-random float in the Longerval [0, 1]
The Longernal state of the rng
A (pseudo)-random Int value