public void loadBinaryProblem(String filename) {
                String row;
                ArrayList<Integer> classes = new ArrayList<Integer>();
                ArrayList<FeatureNode []> examples = new ArrayList<FeatureNode []>();
                try {
                        BufferedReader r = new BufferedReader(new FileReader(filename));
                        while ((row = r.readLine()) != null) {
                                String [] elems = row.split(" ");
                                //Categorija:
                                Integer cat = Integer.parseInt(elems[0]);
                                catmap.addCategory(cat);
                                if (catmap.size() > 2) {
                                        throw new IllegalArgumentException("only 2 classes allowed!");
                                }
                                classes.add(catmap.getNewCategoryOf(cat));
                                //Index/value parovi:
                                examples.add(parseRow(elems));
                        }
                        x = new FeatureNode[examples.size()][];
                        y = new int[examples.size()];
                        for (int i=0; i<examples.size(); i++) {
                                x[i] = examples.get(i);
                                y[i] = 2*classes.get(i)-1; //0,1 => -1,1
                        }
                        l = examples.size();
                } catch (Exception e) {
                        System.out.println(e);
                }
        }