(****************************************************************** [LibNN - Neural Networks Library] Copyright (C) 2002 - 2003 LAGACHERIE Matthieu RICORDEAU Olivier This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Author: LAGACHERIE Matthieu Paper mail : 7 rue Delescluzes 94280 LE KREMLIN BICETRE, FRANCE E-mail : matthieu@marvinproject.org RICORDEAU Olivier Paper mail : 69 avenue d'Italie 75013 PARIS, FRANCE E-mail : olivier@marvinproject.org *****************************************************************) (** The class Pattern @author Matthieu Lagacherie @author Olivier Ricordeau *) open Env class pattern (inputVector, outputVector) = object val mutable _inputs = inputVector val mutable _outputs = outputVector initializer match (inputVector, outputVector) with a, b when Array.length a != 0 && Array.length b != 0 -> () | _, _ -> (NNEnv.getEnv())#toChannel "Class Pattern : The input and output are empty.\n" method getInputs = _inputs method getOutputs = _outputs method getInput index = _inputs.(index) method getOutput index = _outputs.(index) method getVectorNumber = Array.length _inputs method getInputSize = Array.length _inputs.(0) method getOutputSize = Array.length _outputs.(0) end