ec.cgp
Class Util

java.lang.Object
  extended by ec.cgp.Util

public class Util
extends java.lang.Object

Miscelanneous utility methods used by CGP.

Author:
David Oranchak, doranchak@gmail.com, http://oranchak.com

Constructor Summary
Util()
           
 
Method Summary
static void computeResults()
           
static void main(java.lang.String[] args)
           
static java.util.List<java.lang.String> readFile(java.io.File aFile)
          Read lines from the given file.
static int scale(float val, int max)
          Return the int in the range [0,max-1] represented by the given float which is in the range [0.0,1.0).
static void test()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

scale

public static int scale(float val,
                        int max)
Return the int in the range [0,max-1] represented by the given float which is in the range [0.0,1.0).

Parameters:
val - float value to scale
max - the maximum integer to generate
Returns:
scaled integer

readFile

public static java.util.List<java.lang.String> readFile(java.io.File aFile)
Read lines from the given file.

Parameters:
aFile - File to read
Returns:
All lines read from the given file.

test

public static void test()

computeResults

public static void computeResults()

main

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