TMD.Algo 0.0.5.0

So, since its Google code jam time, I figure I’ll do another TMD.Algo release.  Still the same licensing as before.

New features: (Beware bugs due to insufficient testing… especially in the first 2)

  1. MaxFlowMinCost algorithm for Graph.
  2. Generic TernarySearch extension for lists.
  3. SortedDictionary2  – a sorted dictionary with ‘near’ lookup support. Finds the element equal or less than the search element and then you can enumerate from that position.
  4. Pattern support.  Algorithms for efficiently finding the sum or value at index in a repeating pattern with optional non-repeating start. Uses sequence generation state as a key to detect loops.
  5. Memotizer – a simple function adapter to automatically cache results – not exactly nice to use if the function needs to be recursive…
  6. LookupQueue – amortized O(1) lookup/remove/append queue using a dictionary augmented linked list.  Presumes queue elements are all distinct. (Internal implementation uses arrays to avoid the GC and random location dereferencing penalties of a normal linked list.)

Improvements:

  1. Fraction improvements: Truncate to closest integer in direction of 0, explicit cast for integer to fraction, <= and >= operators added, absolute value function.

Bug fixes:

  1. Corner case in reverse comparer (if base comparer returned int.MinValue it would fail).
  2. One of the error messages in LookupHeap had a typo.

 

Link: http://www.themissingdocs.net/downloads/TMD.Algo.0.0.5.0.zip

 

Leave a Reply

Your email address will not be published. Required fields are marked *