public class Permutations extends Object
Constructor and Description |
---|
Permutations() |
Modifier and Type | Method and Description |
---|---|
static DoubleMatrix |
permutationDoubleMatrixFromPivotIndices(int size,
int[] ipiv)
Create a permutation matrix from a LAPACK-style 'ipiv' vector.
|
static FloatMatrix |
permutationFloatMatrixFromPivotIndices(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 static int[] randomPermutation(int size)
public static int[] randomSubset(int k, int n)
public static DoubleMatrix permutationDoubleMatrixFromPivotIndices(int size, int[] ipiv)
ipiv
- row i was interchanged with row ipiv[i]public static FloatMatrix permutationFloatMatrixFromPivotIndices(int size, int[] ipiv)
ipiv
- row i was interchanged with row ipiv[i]Copyright © 2015. All rights reserved.