(****************************************************************** [LibNN - Neural Networks Library] http://libnn.org 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. Authors: LAGACHERIE Matthieu Paper mail : 7 rue Delescluzes 94280 LE KREMLIN BICETRE, FRANCE E-mail : matthieu@libnn.org RICORDEAU Olivier Paper mail : 69 avenue d'Italie 75013 PARIS, FRANCE E-mail : olivier@libnn.org *****************************************************************) (** The tdNN virtual class (Time Delay Neural Network) @author Matthieu Lagacherie @author Olivier Ricordeau @since 10/08/2003 *) open Nn open DefaultVisitor class tdNN = object (self : 'a) inherit [('a) defaultVisitor] nn val _networkType = "TDNN" val mutable _outputActivation = [|[|[|0.0|]|]|] val mutable _inputSum = [|[|[|0.0|]|]|] val mutable _error = [|[|[|0.0|]|]|] val mutable _weights = [|[|[|[|0.0|]|]|]|] val mutable _gradients = [|[|[|[|0.0|]|]|]|] val mutable _layerNb = 0 val mutable _delay = [|0|] val mutable _featuresNb = [|0|] val mutable _timeNb = [|0|] val mutable _fieldSize = [|0|] (** The generic method accept *) method accept (visitor : ('a) defaultVisitor) = visitor#visit self (** Accessors get *) method getOutputActivation = ref _outputActivation method getInputSum = ref _inputSum method getError = ref _error method getWeights = ref _weights method getGradients = ref _gradients method getLayerNb = _layerNb method getDelay layer = _delay.(layer) method getFeaturesNb layer = _featuresNb.(layer) method getTimeNb layer = _timeNb.(layer) method getFieldSize layer = _fieldSize.(layer) method getNetworkType = _networkType (** Accessors set *) method setOutputActivation outputActivation = _outputActivation <- outputActivation method setInputSum inputSum = _inputSum <- inputSum method setError error = _error <- error method setWeights weights = _weights <- weights method setGradients gradients = _gradients <- gradients method setLayerNb layerNb = _layerNb <- layerNb method setDelay delay = _delay <- delay method setFeaturesNb featuresNb = _featuresNb <- featuresNb method setTimeNb timeNb = _timeNb <- timeNb method setFieldSize fieldSize = _fieldSize <- fieldSize method setInputActivation inputSumActivation = _inputSum.(0) <- inputSumActivation end