NNFW - 1.2.1
Utilities
Configuration
GA
NNFW
WorldSim
Total 99%
Experiments
Main Page
Related Pages
Modules
Classes
Files
File List
nnfw
src
simplecluster.cpp
1
/********************************************************************************
2
* Neural Network Framework. *
3
* Copyright (C) 2005-2009 Gianluca Massera <emmegian@yahoo.it> *
4
* *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
9
* *
10
* This program is distributed in the hope that it will be useful, *
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13
* GNU General Public License for more details. *
14
* *
15
* You should have received a copy of the GNU General Public License *
16
* along with this program; if not, write to the Free Software *
17
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *
18
********************************************************************************/
19
20
#include "
simplecluster.h
"
21
#include "
outputfunction.h
"
22
23
namespace
farsa {
24
25
SimpleCluster::SimpleCluster
(
unsigned
int
numNeurons, QString name )
26
:
Cluster
( numNeurons, name) {
27
}
28
29
SimpleCluster::SimpleCluster
(
ConfigurationParameters
& params, QString prefix )
30
:
Cluster
( params, prefix ) {
31
// there is no extra parameters to configure
32
}
33
34
SimpleCluster::~SimpleCluster
() {
35
}
36
37
void
SimpleCluster::update
() {
38
outFunction
()->
apply
(
inputs
(),
outputs
() );
39
setNeedReset
(
true
);
40
}
41
42
void
SimpleCluster::save
(
ConfigurationParameters
& params, QString prefix) {
43
Cluster::save
( params, prefix );
44
params.
startObjectParameters
( prefix,
"SimpleCluster"
,
this
);
45
// there is no extra parameters to save
46
}
47
48
void
SimpleCluster::describe
( QString type ) {
49
Cluster::describe
( type );
50
addTypeDescription
( type,
"A simple Cluster"
);
51
}
52
53
}