Jannis (0.1preAlpha) | ||
Frames | No Frames |
1: /* Synapse.java - Copyright (c) 2005 by Stefan Thesing 2: <p>This file is part of Jannis.</p> 3: <p>Jannis is free software; you can redistribute it and/or modify 4: it under the terms of the GNU General Public License as published by 5: the Free Software Foundation; either version 2 of the License, or 6: (at your option) any later version.</p> 7: <p>Jannis is distributed in the hope that it will be useful, 8: but WITHOUT ANY WARRANTY; without even the implied warranty of 9: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10: GNU General Public License for more details.</p> 11: <p>You should have received a copy of the GNU General Public License 12: along with Jannis; if not, write to the<br> 13: Free Software Foundation, Inc.,<br> 14: 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA<br> 15: */ 16: package de.webdings.jannis.neuralnet; 17: 18: /** 19: * Synapse is used to represent a connection between 20: * two {@link Neuron}s. 21: * 22: * @author Stefan Thesing<br> 23: * Website: <a href="http://www.webdings.de">http://www.webdings.de</a> 24: * @version 0.1 31.07.2005 25: * @see Neuron 26: */ 27: public class Synapse { 28: //attribute 29: /** 30: * the source neuron of activation 31: */ 32: protected Neuron source; 33: /** 34: * the target neuron of the activation 35: */ 36: protected Neuron target; 37: /** 38: * the synapse weight 39: */ 40: protected float weight; 41: //constructor 42: /** 43: * @param source 44: * @param target 45: * @param weight 46: */ 47: public Synapse(Neuron source, Neuron target, float weight) { 48: this.source = source; 49: this.target = target; 50: this.weight = weight; 51: } 52: //methods 53: /** 54: * @return Returns the source neuron. 55: */ 56: public Neuron getSource() { 57: return source; 58: } 59: /** 60: * @param source The source neuron to set. 61: */ 62: public void setSource(Neuron source) { 63: this.source = source; 64: } 65: /** 66: * @return Returns the target neuron. 67: */ 68: public Neuron getTarget() { 69: return target; 70: } 71: /** 72: * @param target The target neuron to set. 73: */ 74: public void setTarget(Neuron target) { 75: this.target = target; 76: } 77: /** 78: * @return Returns the synapse weight. 79: */ 80: public float getWeight() { 81: return weight; 82: } 83: /** 84: * @param weight The synapse weight to set. 85: */ 86: public void setWeight(float weight) { 87: this.weight = weight; 88: } 89: }
Jannis (0.1preAlpha) |
© 2005 by Stefan Thesing;
Verbatim copying and redistribution of this entire page are permitted provided this notice is preserved.