/[marvin]/marvin/src/libnn/misc/corpus.ml
ViewVC logotype

Diff of /marvin/src/libnn/misc/corpus.ml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by srv89, Thu Jul 31 02:02:33 2003 UTC revision 1.2 by srv89, Mon Sep 1 13:08:35 2003 UTC
# Line 52  open Pattern Line 52  open Pattern
52    
53  class corpus =  class corpus =
54  object  object
55      
56    (**    (**
57      The patterns list.      The patterns list.
58    *)    *)
# Line 66  object Line 67  object
67      A get*.      A get*.
68      @return the patterns list.      @return the patterns list.
69    *)    *)
70    method getPatterns = _patterns    method getPatterns =
71        _patterns
72    
73    (**    (**
74      A get*.      A get*.
75      @return the nth pattern stored in the object.      @return the nth pattern stored in the object.
76    *)    *)
77    method getPattern index = List.nth _patterns index    method getPattern index =
78        List.nth _patterns index
79    
80    (**    (**
81      A get*.      A get*.
82      @return how many patterns are stored in the object.      @return how many patterns are stored in the object.
83    *)    *)
84    method getPatternNumber = List.length _patterns    method getPatternNumber =
85        List.length _patterns
86    
87    (**    (**
88      Adds a pattern to the object's patterns set.      Adds a pattern to the object's patterns set.
89    *)    *)
90    method addPattern (thePattern : pattern) = _patterns <- thePattern::_patterns    method addPattern (thePattern : pattern) =
91        _patterns <- thePattern::_patterns
92    
93    (**    (**
94      Get the current learning position      Get the current learning position
95    *)    *)
96    method getLearnPos = _learnPos    method getLearnPos =
97        _learnPos
98    
99    (**    (**
100      Increment the current learning position.      Increment the current learning position.
# Line 104  object Line 110  object
110    (**    (**
111      Get the current input learning vector.      Get the current input learning vector.
112    *)    *)
113    method getInputLearnVector pos = (List.nth _patterns (fst pos))#getInput (snd pos)    method getInputLearnVector pos =
114        (List.nth _patterns (fst pos))#getInput (snd pos)
115    
116    (**    (**
117      Get the current output learning vector.      Get the current output learning vector.
118    *)    *)
119    method getOutputLearnVector pos = (List.nth _patterns (fst pos))#getOutput (snd pos)    method getOutputLearnVector pos =
120        (List.nth _patterns (fst pos))#getOutput (snd pos)
121    
122  end  end

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26