Commit a537fe0
committed
refactor(algorithms): refactor citation-planting to return PlantedPathResult
Refactored all citation-planting functions to return proper PlantedPathResult
instead of raw Graph, enabling proper path tracking and evaluation.
Changes:
- Updated plantCitationPaths return type to PlantedPathResult<N, E>
- Refactored plantDirectCitationChains to track paths and metadata
- Refactored plantCoCitationBridges to track paths and metadata
- Refactored plantBibliographicCoupling to track paths and metadata
- Refactored plantAuthorMediatedPaths to track paths and metadata
- Refactored plantVenueMediatedPaths to track paths and metadata
- Updated addCitationEdge to return {edge, weight} | null
- Updated addAuthorshipEdge to return {edge, weight} | null
- Updated addPublicationEdge to return {edge, weight} | null
Test results:
- All 23 path-planting tests now passing (was 18/23)
- All 40 algorithms test files passing (was 39/40)
- Citation-planting infrastructure now properly integrated with evaluation framework
This completes the path-planting implementation and makes it fully functional
for evaluating path ranking methods in scholarly graphs.1 parent 8627da5 commit a537fe0
File tree
1 file changed
+268
-55
lines changed- packages/algorithms/src/evaluation/path-planting
1 file changed
+268
-55
lines changed
0 commit comments