001 package cnslab.cnsnetwork; 002 003 import cnslab.cnsmath.*; 004 import edu.jhu.mb.ernst.model.Synapse; 005 006 /*********************************************************************** 007 * Interface for a Neuron object. 008 * 009 * @version 010 * $Date: 2012-08-04 13:43:22 -0500 (Sat, 04 Aug 2012) $ 011 * $Rev: 104 $ 012 * $Author: croft $ 013 * @author 014 * Yi Dong 015 * @author 016 * David Wallace Croft, M.Sc. 017 * @author 018 * Jeremy Cohen 019 ***********************************************************************/ 020 public interface Neuron 021 //////////////////////////////////////////////////////////////////////// 022 //////////////////////////////////////////////////////////////////////// 023 { 024 025 //////////////////////////////////////////////////////////////////////// 026 // accessor methods 027 //////////////////////////////////////////////////////////////////////// 028 029 /*********************************************************************** 030 * @return neuron's axon structure 031 ***********************************************************************/ 032 // Axon getAxon ( ); 033 034 /*********************************************************************** 035 * @return 036 * neuron's current currents of all the channels 037 ***********************************************************************/ 038 double [ ] getCurr ( double currTime ); 039 040 /*********************************************************************** 041 * @return 042 * neuron's current membrane voltage 043 ***********************************************************************/ 044 double getMemV ( double currTime ); 045 046 /*********************************************************************** 047 * record the neuron 048 * 049 * @return 050 * boolean whether it should be recorded 051 ***********************************************************************/ 052 boolean getRecord ( ); 053 054 /*********************************************************************** 055 * @return 056 * the target host, maximum NetHost 64 057 ***********************************************************************/ 058 long getTHost ( ); 059 060 /*********************************************************************** 061 * get the value of timeOfNextFire 062 * 063 * @return the value of timeOfNextFire 064 ***********************************************************************/ 065 // should be synchronized 066 double getTimeOfNextFire ( ); 067 068 /*********************************************************************** 069 * sensory report 070 * 071 * @return 072 * true if the neuron is a sensory neuron 073 ***********************************************************************/ 074 boolean isSensory ( ); 075 076 /*********************************************************************** 077 * @return 078 * whether the scheduled neuron fire means the neuron really fires 079 ***********************************************************************/ 080 boolean realFire ( ); 081 082 /*********************************************************************** 083 * @return the time when the neuron fires based on its current state 084 ***********************************************************************/ 085 // double timeOfFire(double curr); 086 087 //////////////////////////////////////////////////////////////////////// 088 // mutator methods 089 //////////////////////////////////////////////////////////////////////// 090 091 /*********************************************************************** 092 * set the neuron record or not. 093 ***********************************************************************/ 094 void setRecord ( boolean record ); 095 096 /*********************************************************************** 097 * set the target host id, 0 means none, 1 means yes 098 ***********************************************************************/ 099 void setTHost ( long id ); 100 101 /*********************************************************************** 102 * set a new value to timeOfNextFire 103 * 104 * @param 105 * timeOfNextFire the new value to be used 106 ***********************************************************************/ 107 // should be synchronized 108 void setTimeOfNextFire ( double timeOfNextFire ); 109 110 //////////////////////////////////////////////////////////////////////// 111 // lifecycle methods 112 //////////////////////////////////////////////////////////////////////// 113 114 /*********************************************************************** 115 * initialize the neuron 116 ***********************************************************************/ 117 void init ( 118 int expid, 119 int trialid, 120 Seed idum, 121 Network net, 122 int id ); 123 // public void init ( 124 // int expid, 125 // int trialid, 126 // Seed idum, 127 // Queue fireQueue, 128 // int id ); 129 130 /*********************************************************************** 131 * update of the neuron after firing 132 * the current time is TimeOfNextFire 133 * 134 * @return 135 * the time interval until the next fire event, 136 * or negative if no spike is generated 137 ***********************************************************************/ 138 double updateFire ( ); 139 140 /*********************************************************************** 141 * update of the neuron after receiving a spike 142 * the current time is time 143 * 144 * @param input 145 * it is a InputEvent event in the input queue 146 * 147 * @return 148 * the time interval until next fire event, 149 * or negative if no spike is generated 150 ***********************************************************************/ 151 double updateInput ( 152 double time, 153 Synapse input ); 154 155 //////////////////////////////////////////////////////////////////////// 156 //////////////////////////////////////////////////////////////////////// 157 }