-
Notifications
You must be signed in to change notification settings - Fork 100
Features at a glance
Algorithmia has a variety of features, spread across many classes and methods. This page helps you get a high-level overview of what's offered and what classes are related to the functionality. Each feature is described more in detail elsewhere on this wiki.
What's an algorithm library without a set of sorting algorithms? The algorithms offered by Algorithmia are all designed to sort in-place, which is different from the sorting mechanic in Linq to Objects. With Linq to Objects you enumerate over a data-structure and with .OrderBy(lambda) you sort the enumerated data. With the sort algorithms in Algorithmia you sort the data inside the enumerated data-structure without making a copy.
The general advantage is that if you need to utilize the sorted data multiple times in different ways (e.g. by using a binary search) you don't have to create a new data-structure from the enumerated data returned by .OrderBy as you would with Linq to Objects. The sort algorithms offered have different characteristics so you can pick a suitable one for the data-set at hand. The system is extensible so you can add your own sort algorithm as well.
Related classes
- All classes in the Sorting folder.
Algorithmia implements a full Command pattern system to make fully undo/redo aware software with minimal effort. The Command pattern is implemented in such a way that the software utilizing it doesn't need to know which commands to execute, it is designed to work in a decoupled, event-driven system, where commands can spawn new commands on-the-fly and which can be undone/redone in one go.
The core design difference between the common 'Command pattern' as described in the 'GoF' books and the implementation in Algorithmia is that in Algorithmia the callee decides whether logic is undo/redo aware, not the caller: in Algorithmia setting a property can be an action which is undo/redo aware as the actual setting of the value inside the property is done through Commands; in the common Command pattern implementations, the set action of the property has to be done with a Command to make the action undo/redo aware.
Additionally, differently from the common Command pattern, in Algorithmia Commands executed through the action on the property (e.g. through event handlers) are seen as part of the command setting the property, without the requirement that the caller knows up front which commands will be executed, making it very easy to create undo/redo aware code.
The Command/Undo/Redo system in Algorithmia is built using fine-grained helper classes which are utilized in other data-structures throughout the library to make these data-structures undo/redo aware.
Related classes
- All classes in the Commands folder
- Several data-structure classes in the GeneralDataStructures folder to offer undo/redo aware equivalents of known data-structures.
Algorithmia offers a variety of Graph data structures and algorithms: directed and non-directed graphs, as well as algorithms like Depth-First Search, Topological Sorting and Transitive Closure. The graph data-structure can be configured to be undo/redo aware and Algorithmia also offers self-managing views on a graph to work with a sub-set of the graph through a view without making a copy.
The graph data-structure and related classes are implemented using names which are common in graph math and algorithms, e.g. 'Vertex' for graph node.
Related classes
- All classes in the Graphs folder and subfolders
A heap is a specialized tree-based data structure that satisfies the heap property: If A is a parent node of B then the key of node A is ordered with respect to the key of node B with the same ordering applying across the heap. Either the keys of parent nodes are always greater than or equal to those of the children and the highest key is in the root node (this kind of heap is called a max heap) or the keys of parent nodes are less than or equal to those of the children and the lowest key is in the root node (a min heap).
Algorithmia offers an implementation of one of the most efficient heap algorithms known: the Fibonacci heap. The heaps implemented in Algorithmia can be both a min-heap and a max-heap, which gives great flexibility in applying the heaps.
Related classes
- All classes in the Heaps folder
- The LinkedBucketList class which is needed for the Fibonacci heap implementation to have a better Linked List implementation than offered by the .NET framework.
A priority queue is an abstract data type which is like a regular queue or stack data structure, but where additionally each element has a "priority" associated with it. In a priority queue, an element with high priority is served before an element with low priority. If two elements have the same priority, they are served according to their order in the queue.
In Algorithma, priority queues work with a Comparison class which dictates which element has priority over another element. Although priority queues can be built with Heaps, in Algorithmia they're not, however this might change in the future. Several different priority queues are provided.
Related classes
- All classes in the PriorityQueues folder
Algorithmia contains a port (to .NET 3.5) of the PropertyBag class, originally developed by Tony Allowat. It can be used to build completely decoupled structures to bind to a property grid for easy editing without designing your code for that purpose.
Related classes
- All classes in the PropertyEditing folder
To build the data-structures for the main functionality, several additional data-structures have been created and they're also part of Algorithmia. Additionally, we added classes which we found very useful in general but which you can't find elsewhere, like the EventThrottler to handle a flood of events coming from all kinds of objects without making your application slow. Among these classes are method input validators, MultiValueDictionaries, Pair classes, Keyed lists, ErrorContainers for IDataErrorInfo implementations... They're described more in detail in their own section elsewhere in this documentation.
Related classes
- Most classes in the GeneralDataStructures folder