pacemaker
Class AdaptiveModel

java.lang.Object
  extended by pacemaker.AdaptiveModel

public class AdaptiveModel
extends java.lang.Object

Useful static code related to Phase Response Curve (PRC) related to "ADAPTIVE" model (Ermentrout, 1991) .

The implementation for g+ and g- functions (as definited in the paper) are provided. They are really easy max/min single line ops when it is recognized that they have a common core, this is implemented in fcore() core = 1/(2*pigreco) * sin(2*pigreco*phase)


Constructor Summary
AdaptiveModel()
           
 
Method Summary
static double eval_PRC(double phase, int period, int max, int min)
          Evaluates the PRC for the given phase.
static double fcore(double phase)
          Evaluate the common core of g+ and g- functions:
static double gminus(double phase)
          Evaluates the g- function.
static double gplus(double phase)
          Evaluates the g+ function.
static void main(java.lang.String[] args)
          For testing purposes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdaptiveModel

public AdaptiveModel()
Method Detail

fcore

public static double fcore(double phase)
Evaluate the common core of g+ and g- functions:

= 1/(2*pigreco) * sin(2*pigreco*phase)

Parameters:
phase - - the phase (x value) proportional to period. In range [0,1].

gplus

public static double gplus(double phase)
Evaluates the g+ function.

g+(x) = max(fcore(x), 0)

Parameters:
phase - - the phase (x value) proportional to period. In range [0,1].

gminus

public static double gminus(double phase)
Evaluates the g- function.

g-(x) = max(fcore(x), 0)

Parameters:
phase - - the phase (x value) proportional to period. In range [0,1].

eval_PRC

public static double eval_PRC(double phase,
                              int period,
                              int max,
                              int min)
Evaluates the PRC for the given phase.

Parameters:
phase - - the phase (x value) proportional to period. In range [0,1].
Returns:
PRC evaluation (y value): in range [0,1].

main

public static void main(java.lang.String[] args)
For testing purposes