[marf-cvs] marf/src test.java,1.6,1.7
Brought to you by:
mokhov
From: Serguei A. M. <mo...@us...> - 2004-05-03 22:14:40
|
Update of /cvsroot/marf/marf/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16232/src Modified Files: test.java Log Message: Document a bit more Arrays.java. Add boundaries check for the valid range of preprocessing, feature extraction, and classification methods. Index: test.java =================================================================== RCS file: /cvsroot/marf/marf/src/test.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** test.java 16 Aug 2003 20:54:39 -0000 1.6 --- test.java 3 May 2004 22:14:01 -0000 1.7 *************** *** 11,31 **** public static void main(String[] argv) { ! // Query for version; used when generating a distro ! if(argv.length > 0) ! if(argv[0].equals("--version")) ! { ! System.out.print(MARF.getVersion()); ! System.exit(0); ! } ! ! // Just some dummy code ! ! MARF.setPreprocessingMethod(MARF.DUMMY); ! ! double[] data = {1, 2, 3}; ! Sample oSample = new Sample(data); ! ! // NOTE: This vector is marf.math.Vector and NOT java.util.Vector ! Vector oVector = new Vector(data); } } --- 11,41 ---- public static void main(String[] argv) { ! try ! { ! // Query for version; used when generating a distro ! if(argv.length > 0) ! if(argv[0].equals("--version")) ! { ! System.out.print(MARF.getVersion()); ! System.exit(0); ! } ! ! // Just some dummy code ! ! MARF.setPreprocessingMethod(MARF.DUMMY); ! ! double[] data = {1, 2, 3}; ! Sample oSample = new Sample(data); ! ! // NOTE: This vector is marf.math.Vector and NOT java.util.Vector ! Vector oVector = new Vector(data); ! } ! ! // Either a MARFException or some subclass of RuntimeException ! catch(Exception e) ! { ! System.err.println(e); ! e.printStackTrace(System.err); ! } } } |