at.tuwien.ifs.somtoolbox.apps.helper
Class DatasetRandomiser

java.lang.Object
  extended by at.tuwien.ifs.somtoolbox.apps.helper.DatasetRandomiser
All Implemented Interfaces:
SOMToolboxApp

public class DatasetRandomiser
extends Object
implements SOMToolboxApp

Randomises a given data set (consisting of an InputData vector, and optionally a TemplateVector. The data set is randomised by randomly swapping the order of columns (attributes), and/or rows (vectors).

Version:
$Id: DatasetRandomiser.java 3668 2010-07-15 09:03:06Z frank $
Author:
Rudolf Mayer

Nested Class Summary
 
Nested classes/interfaces inherited from interface at.tuwien.ifs.somtoolbox.apps.SOMToolboxApp
SOMToolboxApp.Type
 
Field Summary
static SOMToolboxApp.Type APPLICATION_TYPE
           
static String DESCRIPTION
           
static String LONG_DESCRIPTION
           
static com.martiansoftware.jsap.Parameter[] OPTIONS
           
 
Fields inherited from interface at.tuwien.ifs.somtoolbox.apps.SOMToolboxApp
DEV_BY_STRING, HOMEPAGE, REQUIRED_MEMBERS, TYPE_GROUPED_COMPARATOR
 
Constructor Summary
DatasetRandomiser()
           
 
Method Summary
static void main(String[] args)
           
private static void randomise(int[] array)
           
private static void writeInputDatumToFile(PrintWriter writer, InputDatum inputDatum, int[] columnOrder)
           
private static void writeToFile(String fileName, InputData inputData, int[] columnOrder, int[] rowOrder, boolean gzip)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DESCRIPTION

public static final String DESCRIPTION
See Also:
SOMToolboxApp, Constant Field Values

LONG_DESCRIPTION

public static final String LONG_DESCRIPTION
See Also:
SOMToolboxApp, Constant Field Values

OPTIONS

public static final com.martiansoftware.jsap.Parameter[] OPTIONS
See Also:
SOMToolboxApp

APPLICATION_TYPE

public static final SOMToolboxApp.Type APPLICATION_TYPE
Constructor Detail

DatasetRandomiser

public DatasetRandomiser()
Method Detail

main

public static void main(String[] args)
                 throws IOException
Throws:
IOException

randomise

private static void randomise(int[] array)

writeToFile

private static void writeToFile(String fileName,
                                InputData inputData,
                                int[] columnOrder,
                                int[] rowOrder,
                                boolean gzip)
                         throws IOException
Throws:
IOException

writeInputDatumToFile

private static void writeInputDatumToFile(PrintWriter writer,
                                          InputDatum inputDatum,
                                          int[] columnOrder)