NNFW - 1.2.2
Utilities
Configuration
GA
NNFW
WorldSim
Total 99%
Experiments
Main Page
Related Pages
Modules
Classes
Files
File List
nnfw
src
fakecluster.cpp
1
/********************************************************************************
2
* Neural Network Framework. *
3
* Copyright (C) 2005-2011 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 "
fakecluster.h
"
21
#include "
liboutputfunctions.h
"
22
23
namespace
farsa {
24
25
FakeCluster::FakeCluster
(
unsigned
int
size, QString name )
26
:
Cluster
( size, name) {
27
// Outputs will point to same data of Inputs
28
outputdataptr
=
inputdataptr
;
29
}
30
31
FakeCluster::FakeCluster
(
ConfigurationParameters
& params, QString prefix )
32
:
Cluster
( params, prefix ) {
33
// Outputs will point to same data of Inputs
34
outputdataptr
=
inputdataptr
;
35
// there is no extra parameters to configure
36
}
37
38
FakeCluster::~FakeCluster
() {
39
}
40
41
void
FakeCluster::update
() {
42
setNeedReset
(
true
);
43
return
;
44
}
45
46
void
FakeCluster::randomize
(
double
,
double
) {
47
return
;
48
}
49
50
void
FakeCluster::save
(
ConfigurationParameters
& params, QString prefix) {
51
Cluster::save
( params, prefix );
52
params.
startObjectParameters
( prefix,
"FakeCluster"
,
this
);
53
// there is no extra parameters to save
54
}
55
56
void
FakeCluster::describe
( QString type ) {
57
Cluster::describe
( type );
58
addTypeDescription
( type,
"This Cluster collapse inputs and outputs"
,
"The inputs and outputs values are always the same regardless the update method has been called or not. The OutFunction parameter has no effect"
);
59
}
60
61
}