1
3 """
4 Class for Algorithm errors.
5 """
6
9
10
12 """
13 Class to define user algorithm.
14 """
15
16 _attributes = ('results')
17
19 self.results = {}
20 pass
21
23 self.results[item] = result
24
26 """
27 implements how to deal with the given data item. The output of the process can be
28 appended to the self.results dictionary by calling self.__appendResult__(item, result).
29
30 @since: 0.0.1
31 @author: Hurng-Chun Lee
32 @contact: hurngchunlee@gmail.com
33
34 @param item is the sigle item from the data collection
35 @return True if the item is properly processed; otherwise False
36 """
37 raise NotImplementedError('algorithm needs to be implemented to deal with the data item')
38
40 """
41 returns the up-to-date results from what has been processed by this algorithm object.
42 """
43 return self.results
44