1
2
3
4 package yawn.nn.mlp;
5
6 /***
7 * A linear output node.
8 *
9 * <p>$Id: LinearNode.java,v 1.8 2005/04/20 18:55:03 supermarti Exp $</p>
10 *
11 * @author Luis Martí (luis dot marti at uc3m dot es)
12 * @version $Revision: 1.8 $
13 */
14 public class LinearNode extends PerceptronNode {
15
16 /***
17 * @param inputSize
18 */
19 public LinearNode(int inputSize) {
20 super(inputSize);
21 }
22
23 public LinearNode() {
24 super();
25 }
26
27 protected double f(double x) {
28 return x;
29 }
30
31 protected double df(double x) {
32 return 1;
33 }
34
35 }