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

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

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

revision 1.6 by matthieu, Tue Jul 15 21:21:05 2003 UTC revision 1.7 by matthieu, Wed Jul 16 14:42:18 2003 UTC
# Line 89  object Line 89  object
89    method getLearnPos = _learnPos    method getLearnPos = _learnPos
90    
91    (**    (**
92      Get the current learning position and increment it.      Increment the current learning position.
93    *)    *)
94    method getLearnPos =    method learnPosInc =
95      let increment learnPos = match learnPos with      let increment learnPos = match learnPos with
96          l when (fst l = List.length _patterns - 1) & (snd l = Array.length (List.nth _patterns (fst l))) -> (0, 0)          l when (fst l = List.length _patterns - 1) & (snd l = Array.length (List.nth _patterns (fst l))) -> (0, 0)
97        | l when (snd l = Array.length (List.nth _patterns (fst l))) -> (fst l + 1, 0)        | l when (snd l = Array.length (List.nth _patterns (fst l))) -> (fst l + 1, 0)
98        | l -> (fst l + 1, snd l + 1)        | l -> (fst l + 1, snd l + 1)
99      in increment _learnPos      in _learnPos <- increment _learnPos
100    
101      (**
102        Get the current learning vector.
103      *)
104      method getLearnVector pos = (List.nth _patterns (fst pos)).(snd pos)
105  end  end

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

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