All pastes #28058 Raw Edit

Unnamed

public text v1 · immutable
#28058 ·published 2005-11-09 00:03 UTC
rendered paste body
public class Test {

	public static void main(String[] arg) {

		String[] name = { "Species one", "Species two", "Species three",
				"Species four", "Species five", "Species six", "Species seven",
				"Species eight", "Species nine", "Species ten" };

		double[][] probabilities = {
				{ 0.99, 0.01, 0.95, 0.95, 0.05, 0.01, 0.15 },
				{ 0.90, 0.85, 0.05, 0.99, 0.85, 0.05, 0.15 },
				{ 0.05, 0.95, 0.01, 0.01, 0.05, 0.85, 0.99 },
				{ 0.15, 0.01, 0.90, 0.95, 0.95, 0.05, 0.85 },
				{ 0.01, 0.90, 0.15, 0.99, 0.15, 0.85, 0.15 },
				{ 0.15, 0.05, 0.05, 0.95, 0.85, 0.85, 0.95 },
				{ 0.05, 0.85, 0.05, 0.01, 0.95, 0.01, 0.90 },
				{ 0.95, 0.15, 0.95, 0.01, 0.85, 0.01, 0.15 },
				{ 0.01, 0.99, 0.99, 0.15, 0.05, 0.99, 0.85 },
				{ 0.01, 0.05, 0.85, 0.95, 0.85, 0.15, 0.99 }
				}; // end matrix definition

		int[] testResults = { 0, 1, 1, 0, 0, 1, 1 };
		
		double[][] resultMatrix;
		
		if (testResults[0] == 1)resultMatrix = probabilities;
		else resultMatrix[][] = 1-probabilities;
		

		Identifier myIdentifier = new Identifier();
		
		for (int i = 0; i < 10; i++) {
			String speciesName = name[i];
			double[] speciesProbabilities = probabilities[i];
			myIdentifier.addBacteria(speciesName, speciesProbabilities);
			System.out.println("Added " + speciesName);		
			
		}// end for i
		
	}// end method main()

}// end class Test