commit | f7f9abb25b4856e6d523db8f2cbb20d493862f25 | [log] [tgz] |
---|---|---|
author | Leo Neumeyer <leo@s4.io> | Sun Aug 14 10:55:14 2011 -0700 |
committer | Leo Neumeyer <leo@s4.io> | Sun Aug 14 10:55:14 2011 -0700 |
tree | 2cd688df1affa3cb7512fb9c586b92c24dbb5142 | |
parent | 4c95ba1d610f70d24a68ead8456a517ccdb305b4 [diff] |
Added k-means train example.
The goal of this project is to incorporate feedback from various users and create a prototype with a cleaner, simpler API. The base classes are the foundation on top of which higher level layers and tools can be built. For example, one could write a domain specific language to create the application graph. Look at this as the foundation and not as the end product.
Here is a list of ideas:
Please post feedback and suggestions in the s4 forum.
The repo is here:
https://github.com/leoneu/s4-piper
In this version:
Note that when we create a PE in App, we are really creating a prototype of the PE. The actual PE instances get created every time a node receives an event that is dispatched to a specific PE prototype. The first PE has Map that holds the instances by a specific key. PE instances are clones which means that we don't call the constructor. Instead we provide an init method. Also, the instance variables are cloned. This means that references are also copied. If you wanted to have a List per PE instance, you would have to create it in the init method. This design pattern, makes thing very simple and efficient but has the downside that programmers have to understand how instances are created via clone.
For now we identify PEs using a composite string produced by KeyFinder. We must also pass the raw data types used to create the composite key. Need to think how to do this with type safety in mind.
Examples: