/[marvin]/marvin/src/libnn/networks/nn.ml
ViewVC logotype

Diff of /marvin/src/libnn/networks/nn.ml

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

revision 1.2 by srv89, Fri Aug 29 08:29:39 2003 UTC revision 1.3 by srv89, Sun Sep 7 19:13:12 2003 UTC
# Line 44  Line 44 
44    @since 06/08/2003    @since 06/08/2003
45  *)  *)
46    
 open Corpus  
47  open Pattern  open Pattern
48  open DefaultVisitor  open DefaultVisitor
49    open Corpus
50    
51  class virtual nn =  class virtual nn =
52  object (self)  object (self)
53    
54      (**
55        A string containing the dynamic type of the nn. This string has to be
56        filled by the derived classes' constructors!
57      *)
58    val mutable _networkType = ""    val mutable _networkType = ""
59    
60      (**
61        The learning step.
62      *)
63    val mutable _step = 0.01    val mutable _step = 0.01
64    
65      (**
66        The corpus, containing all the learning examples.
67      *)
68    val mutable _corpus = new corpus    val mutable _corpus = new corpus
69    
70    (**    (**
# Line 69  object (self) Line 79  object (self)
79    *)    *)
80    method getNetworkType =    method getNetworkType =
81      _networkType      _networkType
82          
83    method addPattern pattern = _corpus#addPattern pattern    (**
84        Adds a pattern to the neural network's pattern.
85        @param pattern The pattern to add.
86      *)
87      method addPattern pattern =
88        _corpus#addPattern pattern
89            
90      (**
91        Returns the corpus.
92        @return The corpus.
93      *)                    
94    method getCorpus = _corpus    method getCorpus = _corpus
95                    
96      (**
97        A get*.
98        @return The current learning position of the corpus.
99      *)      
100      method getLearnPos =
101        _corpus#getLearnPos
102    
103    method getLearnPos = _corpus#getLearnPos    (**
104        A get*.
105    method getInputLearnVector = _corpus#getInputLearnVector _corpus#getLearnPos      @return The corpus' input learn vector.
106      *)
107    method getOutputLearnVector = _corpus#getOutputLearnVector _corpus#getLearnPos    method getInputLearnVector =
108        _corpus#getInputLearnVector _corpus#getLearnPos
109    
110    method getStep = _step    (**
111        A get*.
112        @return The corpus' output learn vector.
113      *)
114      method getOutputLearnVector =
115        _corpus#getOutputLearnVector _corpus#getLearnPos
116    
117      (**
118        A get*.
119        @return The learning step
120      *)
121      method getStep =
122        _step
123          
124  end  end

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

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