private void printRes(TreeMap<Double,Object> inp, int objectQuery,int k,Dataset dataset)
    {
            java.util.Iterator s=inp.keySet().iterator();
            for(int i=0;s.hasNext()&&i<k;i++)
            {
                double distance=(Double)s.next();
                Object o=inp.get(distance);
                System.out.print(i);
                String className=o.getClass().getName();
                if(className.equals("java.lang.Integer"))
                    System.out.print(" object: "+o);
                else
                    System.out.print(" object: "+((DatasetObject)o).getInternalId());

                System.out.print("\t Computed distance: "+ distance);
                if(dataset!=null){
                    if(className.equals("java.lang.Integer"))
                        System.out.println("\t Actual distance: "+ dataset.distance(dataset.getObject(objectQuery),dataset.getObject((Integer)inp.get(distance))));
                    else
                        System.out.println("\t Actual distance: "+ dataset.distance(dataset.getObject(objectQuery), (DatasetObject)o));
                }
                else
                    System.out.println();
            }
    }