Crate abstutil

source ·
Expand description

The contents of this crate need to be organized better:

  • Timer (a mix of logging, profiling, and even parallel execution)
  • true utility functions (collections, prettyprinting, CLI parsing

Re-exports§

Modules§

Structs§

  • A counter per key
  • A drop-in replacement for BTreeMap, where the keys have the property of being array indices. Some values may be missing. Much more efficient at operations on individual objects, because it just becomes a simple array lookup.
  • Use with BinaryHeap. Since it’s a max-heap, reverse the comparison to get the smallest cost first.
  • Convenience functions around a string->string map
  • Use when your key is just PartialEq, not Ord or Hash.

Constants§

Traits§

  • Trick to make a cloneable Any from https://stackoverflow.com/questions/30353462/how-to-clone-a-struct-storing-a-boxed-trait-object/30353928#30353928.
  • Use with FixedMap. From a particular key, extract a usize. These values should be roughly contiguous; the space used by the FixedMap will be O(n) with respect to the largest value returned here.

Functions§