/[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.1 by matthieu, Mon Jul 7 22:52:54 2003 UTC revision 1.2 by matthieu, Tue Jul 8 17:03:54 2003 UTC
# Line 34  E-mail : olivier@marvinproject.org Line 34  E-mail : olivier@marvinproject.org
34        
35  *)  *)
36    
37  class corpus(inputVector, outputVector, env) =  #use "Pattern.ml"
 object  
   val mutable _inputs = inputVector  
   val mutable _outputs = outputVector  
   val mutable _env : environment ref = env  
   
   initializer match (inputVector, outputVector) with  
       a, b when Array.length a != 0 && Array.length b != 0 -> ()  
     | _, _ -> !_env#toChannel "The input and output pattern are empty.\n"  
   
   method getInputs = _inputs  
   
   method getOutputs = _outputs  
38    
39    method getInput index = _inputs.(index)  class corpus =
40    object
41    method getOutput index = _outputs.(index)    val mutable _patterns = []
   
   method getPatternNumber = Array.length _inputs  
42    
43    method getInputSize = Array.length _inputs.(0)    method getPatterns = _patterns
44  end;;    method getPattern index = List.nth _patterns index
45      method getPatternNumber = List.length _patterns
46    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