import org.shogun.*;
import org.jblas.*;
import java.io.*;
import java.util.*;
public class Load {
	public static DoubleMatrix load_numbers(String filename) {
		DoubleMatrix result = null;
		try {
			DoubleMatrix temp = DoubleMatrix.loadAsciiFile(filename);
			result = temp.reshape(2, temp.getLength() / 2);
		} catch(java.io.IOException e) {
			System.out.println("Unable to create matrix from " + filename + ": " + e.getMessage());
			System.exit(-1);
		}
		return result;
	}	
	public static DoubleMatrix load_labels(String filename) {
		DoubleMatrix result = null;
		try {
			DoubleMatrix temp = DoubleMatrix.loadAsciiFile(filename);
			result = temp.reshape(1, temp.getLength());
		} catch(java.io.IOException e) {
			System.out.println("Unable to create matrix from " + filename + ": " + e.getMessage());
			System.exit(-1);
		}
		return result;
	}
	public static String[] load_dna(String filename) {
		ArrayList list = new ArrayList();		
		String[] result = null;
		try {
			FileInputStream fstream = new FileInputStream(filename);
			DataInputStream in = new DataInputStream(fstream);
			BufferedReader buffer = new BufferedReader(new InputStreamReader(in));
			String line;
			while((line = buffer.readLine()) != null) {
				list.add(line);
			}
			in.close();
			result = new String[list.size()];
			for (int i = 0; i < list.size(); i++) {
				result[i] = (String)list.get(i);
			}
		} catch(java.io.IOException e) {
			System.out.println("Unable to create matrix from " + filename + ": " + e.getMessage());
			System.exit(-1);
		}
		return result;
	}

	public static String[] load_cubes(String filename) {
		ArrayList list = new ArrayList();		
		String[] result = null;
		try {
			FileInputStream fstream = new FileInputStream(filename);
			DataInputStream in = new DataInputStream(fstream);
			BufferedReader buffer = new BufferedReader(new InputStreamReader(in));
			String line;
			while((line = buffer.readLine()) != null) {
				list.add(line);
			}
			in.close();
			result = new String[list.size()];
			for (int i = 0; i < list.size(); i++) {
				result[i] = (String)list.get(i);
			}
		} catch(java.io.IOException e) {
			System.out.println("Unable to create matrix from " + filename + ": " + e.getMessage());
			System.exit(-1);
		}
		return result;
	}
}	

@@ -903,32 +903,40 @@
 e) %7B%0A%09%09ArrayList
+%3CString%3E
  list = new Arra
@@ -932,32 +932,40 @@
  = new ArrayList
+%3CString%3E
 ();%09%09%0A%09%09String%5B%5D
@@ -1637,16 +1637,24 @@
 rrayList
+%3CString%3E
  list = 
@@ -1666,16 +1666,24 @@
 rrayList
+%3CString%3E
 ();%09%09%0A%09%09

fix warnings in Load.java