The command now supports reopening existing indexes instead of failing when the output file exists. Control flow branches between opening an existing index and constructing a new one, moving configuration setup exclusively to the creation path. Directory existence is enforced upfront with proper I/O error propagation. The --force flag retains its original semantics by removing the target directory before proceeding with a fresh build.
23 lines
1.5 KiB
Markdown
23 lines
1.5 KiB
Markdown
<!-- coverage sidecar — ne pas ajouter au nav mkdocs -->
|
|
# Coverage: implementation/layer_tier.md
|
|
|
|
## Code couvert
|
|
|
|
- `obikindex/src/layer/mphf_layer.rs` — MphfLayer, LayerEvidence enum (Exact/Approx), find(), find_exact(), find_approx()
|
|
- `obikindex/src/layer/typed_layer.rs` — Layer<D>, trait LayerData, modes () / PersistentCompactIntMatrix / PersistentBitMatrix, build(), build_evidence(), append_genome_column()
|
|
- `obikindex/src/layer/map.rs` — LayeredMap<D>, push_layer(), query()
|
|
- `obikindex/src/layer/evidence.rs` — Evidence, EvidenceWriter, encodage chunk_id:rank
|
|
- `obikindex/src/layer/fingerprint.rs` — FingerprintVec, FingerprintVecWriter, matches()
|
|
- `obikindex/src/layer/meta.rs` — LayerMeta, EvidenceKind (Exact / Approx { b, z })
|
|
|
|
## Notes
|
|
|
|
FORT RISQUE DE DÉRIVE. C'est le fichier le plus affecté par les changements récents :
|
|
- EvidenceKind (Exact / Approx) est désormais un concept de premier plan — toute la sémantique de query en dépend
|
|
- `LayerEvidence` enum interne à `MphfLayer` : dispatch transparent find() → find_exact() ou find_approx()
|
|
- `fingerprint.rs` : module entièrement nouveau (FingerprintVec + FingerprintVecWriter)
|
|
- `build_evidence()` / `build_exact_evidence()` / `build_approx_evidence()` sont nouveaux
|
|
- `block_bits` dans les fonctions build : O(1) garanti avec le chemin chaud explicit pour block_bits=0
|
|
- Séparation open() (accès aléatoire, requiert .idx) vs open_sequential() (itération seule)
|
|
Pratiquement toute cette page est à réécrire.
|