function verifica_base_hier2(base_h,A_h,min_nivel,passov,max_nivel,...
    inib_h,tamb_h,p)

jult = 0;
for kv = min_nivel:passov:max_nivel
    fprintf(2,'nivel %d inicio %d tamanho %d\n',kv, inib_h(kv),tamb_h(kv));
    assert(tamb_h(1,kv) >= 0)
    if tamb_h(1,kv) > 0
        assert(inib_h(1,kv) == jult + 1)
    end
    jult = jult + tamb_h(1,kv);
end
fprintf(2,'numero de elementos = %d \n', size(base_h.elementos,2));
assert(size(base_h.elementos,2) == jult)
assert(size(A_h,2) == jult)
assert(size(A_h,1) == size(p,1))

    