alexcrawford / lexorank-php
PHP Implementation of JIRA's LexoRank algorithm.
Installs: 49 811
Dependents: 1
Suggesters: 0
Security: 0
Stars: 19
Watchers: 4
Forks: 5
Open Issues: 1
Type:project
Requires
- php: ~8.0 || ~8.1 || ~8.2
- webmozart/assert: ^1.11
Requires (Dev)
- doctrine/coding-standard: ^10.0
- phpunit/phpunit: ^9.5
- psalm/plugin-phpunit: ^0.17.0
- roave/infection-static-analysis-plugin: ^1.23
- vimeo/psalm: ^4.27
This package is auto-updated.
Last update: 2024-11-06 15:31:10 UTC
README
A simple PHP implementation of xissy/lexorank
LexoRank is a ranking system introduced by Atlassian JIRA.
Background
What is the best representation of an ordered list in a database? With a dumb order number based ranking system, re-ordering a row of a list may require updating all rows of the list in a transaction, which is O(n).
- https://stackoverflow.com/questions/9536262/best-representation-of-an-ordered-list-in-a-database/49956113
- https://softwareengineering.stackexchange.com/questions/195308/storing-a-re-orderable-list-in-a-database
LexoRank makes it O(1). All you need to do is updating the re-ordered row's order field.