AI-NNEasy

 view release on metacpan or  search on metacpan

lib/AI/NNEasy/NN/node.hploo  view on Meta::CPAN

#############################################################################
## Name:        node.pm
## Purpose:     AI::NNEasy::NN::node
## Author:      Graciliano M. P. 
## Modified by:
## Created:     2005-01-14
## RCS-ID:      
## Copyright:   (c) 2005 Graciliano M. P. 
## Licence:     This program is free software; you can redistribute it and/or
##              modify it under the same terms as Perl itself
#############################################################################

use Class::HPLOO qw(base alloo) ;

class AI::NNEasy::NN::node {

  my $NODEID ;

  sub node ($params) {
    $this->{nodeid} = ++$NODEID ;
    
    $this->{activation} = $$params{random_activation} ? rand($$params{random}) : 0 ;

    $this->{random_weights} = $$params{random_weights} ;
    $this->{decay} = $$params{decay} ;
    $this->{adjust_error} = $$params{adjust_error} ;
    $this->{persistent_activation} = $$params{persistent_activation} ;
    $this->{threshold} = $$params{threshold} ;
    $this->{activation_function} = $$params{activation_function} ;
    $this->{active} = 1 ;
    
    $this->{error} = 0 ;

    return $this ;
  }

}

1;




( run in 0.233 second using v1.01-cache-2.11-cpan-a5abf4f5562 )