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

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

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

revision 1.8 by matthieu, Thu Jul 17 00:06:55 2003 UTC revision 1.9 by srv89, Tue Jul 29 02:16:28 2003 UTC
# Line 47  Line 47 
47    
48  class pattern (inputVector : 'a) (outputVector : 'b) =  class pattern (inputVector : 'a) (outputVector : 'b) =
49  object  object
50    
51    constraint 'a = float array array    constraint 'a = float array array
52    
53    constraint 'b = float array array    constraint 'b = float array array
54    
55      (**
56        A vector which contains the pattern's inputs.
57      *)
58    val mutable _inputs = inputVector    val mutable _inputs = inputVector
59    
60      (**
61        A vector which contains the pattern's outputs.
62      *)
63    val mutable _outputs = outputVector    val mutable _outputs = outputVector
64    
65    (*  initializer match (inputVector, outputVector) with    (*  initializer match (inputVector, outputVector) with
66      a, b when Array.length a != 0 && Array.length b != 0 -> ()      a, b when Array.length a != 0 && Array.length b != 0 -> ()
67      | _, _ -> (Env.getEnv())#toChannel "Class Pattern : The input and output are empty.\n" *)      | _, _ -> (Env.getEnv())#toChannel "Class Pattern : The input and output are empty.\n" *)
68                              
69      (**
70        A get*.
71        @return the input vector.
72      *)
73    method getInputs = _inputs    method getInputs = _inputs
74    
75      (**
76        A get*.
77        @return the output vector.
78      *)
79    method getOutputs = _outputs    method getOutputs = _outputs
80    
81      (**
82        A get*.
83        @return the input which corresponds to the "index" parameter.
84      *)
85    method getInput index = _inputs.(index)    method getInput index = _inputs.(index)
86    
87      (**
88        A get*.
89        @return the output which corresponds to the "index" parameter.
90      *)
91    method getOutput index = _outputs.(index)    method getOutput index = _outputs.(index)
92    
93      (**
94        A get*.
95        @return the number of vectors in the pattern.
96      *)
97    method getVectorNumber = Array.length _inputs    method getVectorNumber = Array.length _inputs
98    
99      (**
100        A get*.
101        @return the input vector's size.
102      *)
103    method getInputSize = Array.length _inputs.(0)    method getInputSize = Array.length _inputs.(0)
104    
105      (**
106        A get*.
107        @return the output vector's size.  
108      *)
109    method getOutputSize = Array.length _outputs.(0)    method getOutputSize = Array.length _outputs.(0)
110    
111  end  end

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

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