[Pybrainsim-activity] SF.net SVN: pybrainsim:[52] trunk/src/GeneratorStimulusPhaseReset.py
Status: Planning
Brought to you by:
rgoj
From: <rg...@us...> - 2009-08-03 10:42:40
|
Revision: 52 http://pybrainsim.svn.sourceforge.net/pybrainsim/?rev=52&view=rev Author: rgoj Date: 2009-08-03 10:42:32 +0000 (Mon, 03 Aug 2009) Log Message: ----------- * Removing the obsolete class GeneratorStimulusPhaseReset. Removed Paths: ------------- trunk/src/GeneratorStimulusPhaseReset.py Deleted: trunk/src/GeneratorStimulusPhaseReset.py =================================================================== --- trunk/src/GeneratorStimulusPhaseReset.py 2009-08-03 10:41:45 UTC (rev 51) +++ trunk/src/GeneratorStimulusPhaseReset.py 2009-08-03 10:42:32 UTC (rev 52) @@ -1,49 +0,0 @@ -# PyBrainSim -# Copyright 2009 Roman Goj -# -# This file is part of PyBrainSim. -# -# PyBrainSim is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# PyBrainSim is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with PyBrainSim. If not, see <http://www.gnu.org/licenses/>. - -__metaclass__ = type # New style classes. Is this necessary? - -""" -""" - -from GeneratorDummy import GeneratorDummy - -class GeneratorStimulusPhaseReset(GeneratorDummy): - def __init__(self): - self.activation = 0 - self.connectedGeneratorPhase = 0 - self.stimulusTimes = [] - self.currentStimulus = 0 - - def setStimulusTimes(self, stimulusTimes): - self.stimulusTimes = stimulusTimes - - def receiveInput(self, input): - self.connectedGeneratorPhase = input - print("Received input: " + str(self.connectedGeneratorPhase)) - - def runGenerator(self, time): - if self.currentStimulus < len(self.stimulusTimes): - if self.stimulusTimes[self.currentStimulus] < time: - print("Stimulus now: BEEEEEEEP! ... Time is: " + str(time) + ", Stimulus list is: " + str(self.stimulusTimes) + " Connected generator phase should have been: " + str(self.connectedGeneratorPhase)) - self.activation = -self.connectedGeneratorPhase - self.currentStimulus += 1 - else: - self.activation = 0 - - return 0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |