org.jmat.data.matrixTools
Class Shuffle

java.lang.Object
  |
  +--org.jmat.data.matrixTools.Shuffle

public class Shuffle
extends java.lang.Object

Shuffle algoritm.


Constructor Summary
Shuffle(int n)
          Construct a shuffled order.
 
Method Summary
static double[] Array(double[] X)
          Return a shuffled array
 int[] getOrder()
          Get the order of the entire column.
 int getOrder(int i)
          Get the order of one line.
static void main(java.lang.String[] args)
           
static AbstractMatrix MatrixColumns(AbstractMatrix X)
          Shuffle columns of a Matrix
static AbstractMatrix MatrixElements(AbstractMatrix X)
          Shuffle elements of a Matrix
static AbstractMatrix MatrixRows(AbstractMatrix X)
          Shuffle rows of a Matrix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Shuffle

public Shuffle(int n)
Construct a shuffled order.

Parameters:
n - Size to shuffle.
Method Detail

getOrder

public int getOrder(int i)
Get the order of one line.

Parameters:
i - order of the line i.
Returns:
order shuffled.

getOrder

public int[] getOrder()
Get the order of the entire column.

Returns:
orders shuffled.

Array

public static double[] Array(double[] X)
Return a shuffled array

Parameters:
X - double array
Returns:
double array

MatrixRows

public static AbstractMatrix MatrixRows(AbstractMatrix X)
Shuffle rows of a Matrix

Parameters:
X - Matrix to shuffle
Returns:
a Matrix

MatrixColumns

public static AbstractMatrix MatrixColumns(AbstractMatrix X)
Shuffle columns of a Matrix

Parameters:
X - Matrix to shuffle
Returns:
a Matrix

MatrixElements

public static AbstractMatrix MatrixElements(AbstractMatrix X)
Shuffle elements of a Matrix

Parameters:
X - Matrix to shuffle
Returns:
a Matrix

main

public static void main(java.lang.String[] args)