public void put(int o, int inc, int postingListToBeAccessed, int accessedPostingLists)
        {
            intWrapper oo=new intWrapper();
            oo.value=o;
            double currentScore;
            long time=System.currentTimeMillis();
            doubleWrapper oi=tempRes.get(oo);
            if (oi!=null){
                updates++;
                currentScore=oi.value-maxEntries+inc;
                oi.value=currentScore;
            }
            else
            {
                currentScore=maxEntries*(postingListToBeAccessed-1)+inc;
            }
            double minDist=currentScore-maxEntries*(postingListToBeAccessed-accessedPostingLists); // the minimum distance this object can reach
            if(minDist>kDist){
                savedInsertions++;      //the object cannot enter the best k objects we save one insertion
                tempRes.remove(oo);
            }
            else{                       //the object can enter the best k. Let's insert it
                if (oi==null){
                    insertions++;
                    oi=new doubleWrapper();
                    oi.value=currentScore;
                    tempRes.put(oo,oi);              //insert in the full result list
                }
                orderedInsert(o,currentScore);  //insert in the best current k
            }
            putTime+=System.currentTimeMillis()-time;
        }