org.jblas.util
public class Permutations extends java.lang.Object
Constructor and Description |
---|
Permutations() |
Modifier and Type | Method and Description |
---|---|
static DoubleMatrix |
permutationMatrixFromPivotIndices(int size,
int[] ipiv)
Create a permutation matrix from a LAPACK-style 'ipiv' vector.
|
static int[] |
randomPermutation(int size)
Create a random permutation of the numbers 0, ..., size - 1.
|
static int[] |
randomSubset(int k,
int n)
Get a random sample of k out of n elements.
|
public Permutations()
public static int[] randomPermutation(int size)
public static int[] randomSubset(int k, int n)
public static DoubleMatrix permutationMatrixFromPivotIndices(int size, int[] ipiv)
ipiv
- row i was interchanged with row ipiv[i]© 2008-2010 by Mikio L. Braun and contributors