ranking
Stable type · Relational keys and geometry
Tier: stable · Kind: type · Topic: Relational keys and geometry
| Julia | TypeScript | Python | Rust | Go |
|---|---|---|---|---|
| not exported | not exported | Ranking | Ranking | not exported |
Julia
Julia does not export this type.
TypeScript
TypeScript does not export this type.
Python
class Ranking
Ranking(order: list[Any], ids: dict[Any, int], base: int)
Ranking.__getitem__(key: Any) -> int
Result of rank
.
order— the distinct tuples in §5.5.1 total order.ids—ids[t]is the dense integer assigned to tuplet.base— the emission base. Python emits 0-based (the canonical numbering;CONFORMANCE_SPEC.md§5.5.1 rule 3). The conformance adapter declares this base and the harness normalises viacanonical = reported − base.
Rust
pub struct Ranking {
pub order: Vec<Key>,
pub id: IndexMap<Key, i64>,
pub base: i64,
}
impl Ranking { pub fn dense_ids(&self) -> Vec<i64> }
impl Ranking { pub fn canonical_dense_ids(&self) -> Vec<i64> }
Result of rank
.
order— the distinct tuples in §5.5.1 total order.id—id[t]is the dense integer assigned to tuplet(insertion order equals sorted order, since it is filled inordersequence).base— the emission base. Rust emits 0-based (CONFORMANCE_SPEC.md§5.5.1 rule 3, the canonical numbering); the conformance adapter recovers the canonical 0-based ID viacanonical = reported − base.
Go
Go does not export this type.