@Override
    public synchronized Vector slice(int from, int to) {
        SparseVector res = new SparseVector();
        for(int index : data.keys()) {
            if (index >= from && index < to) {
                res.set(index-from, data.get(index));
            }
        }
        return res;
    }