Algo.NET

I've just opened a project on CodePlex -  !!!

This project will implement various algorithms related to artificial intelligence, numerical analysis, NLP, object recognition and quantitative finance. It will initially target C#, and eventually F#.  

First exercise - port Java AIMA 3 to C# from http://code.google.com/p/aima-java  

AIMA3

so far I've ported the utils - helpers, data structures and basic linear algebra classes

  • Matrix class - Implemented ICloneable, ISerializable.GetObjectData (may move to DataContractAttribute instead)
  • cleaned up code via resharper
  • MixedRadixNumber class – unfortunately, there is no.NET equivalent for java Number ValueType base class – will come back to this
  • Get & Put operations – replaced with property accessors, indexors
  • Made whatever I could linq enabled
  • Cleaned up comment overloads
  • For comparison of floating point number used an epsilon 0.00001

classes that were left out from aima.core.util.datastructure - because of existing equivelent classes in.NET BCL:

  • FifoQueue - Queue
  • LifoQueue - Stack
  • Pair - Tuple<T1,T2>
  • Point2D - Point2D
  • Triplet - Tuple<T1,T2,T3>
  • I left PriorityQueue in for the moment - I may replace with OrderedBag / OrderedSet classes in PowerCollections or Parallel Extensions extras http://code.msdn.microsoft.com/Samples-for-Parallel-b4b76364

classes that were left out from aima.core.util - because of existing equivalent classes in.NET BCL:

  • ArrayIterator – IEnumerable
  • CancelableThread – Thread (may move to Task anyway)
  • Converter – LINQ ToDictionary, ToList operators
  • SetOps – LINQ operators

All fun & games!!!

This article is part of the GWB Archives. Original Author: JoshReuben

New on Geeks with Blogs

  • We Won The One Award I Actually Care About

    Full Scale made the Inc. 5000 for the fifth year straight, the 12th listing across my three companies. Here is why the one award you cannot buy is worth stopping for.

  • Your Customers Build the Features Now

    I let a tool I liked sit dead for a year rather than build the features I wanted. An MCP server meant I never had to, and your customers can do the same to your product.

  • Get the Size of a Directory in Linux the Easy Way

    du -sh for the quick answer, ncdu for the cleanup, df for the disk itself: every command for checking directory size in Linux, plus why du and df never agree.

  • Vim Search and Replace: The Ultimate Guide

    One :%s command replaces every match in a file before a find dialog would even open. The Vim substitute patterns worth the muscle memory: flags, ranges, capture groups, and multi-file edits.