act.h:#define ADJUSTED_TARGET(o,t,tr,zr) ((((o)-(t)) < (zr)) && ((o)-(t)) > (-zr))\
act.h:                              ? o : (((o)-(t)) > (tr)) ? ((t)+(tr)) :\
act.h:				(((o)-(t)) < (-tr)) ? ((t)-(tr)) : o;
act.h:      ((x) <= -17 ? (-1.0) : SIMPLE_TANH(x)))
act.h:     (((x) >= 17 || (x) <= -17) ? SMALL_VAL : SIMPLE_TANH_DERIV(x))
act.h:     LOG((1.0-(d))/(1.0-(y)))*(1.0-(d))))
act.h:     ((y) == 1.0 ? LARGE_VAL : -LOG(1.0-(y)))
act.h:     ((y) == 0.0 ? LARGE_VAL : -LOG(y))
act.h:     ((((real) (y)*(1.0-(y))) <= SMALL_VAL) ?\
act.h:     (((real) (y)-(d)) * LARGE_VAL) :\
act.h:       (((real) (y)-(d))/((real) (y)*(1.0-(y)))))
act.h:     (((real) (1.0-(y)) <= SMALL_VAL) ? LARGE_VAL :\
act.h:     ((real) 1.0/(1.0-(y))))
act.h:     (((real) (y) <= SMALL_VAL) ? -LARGE_VAL :\
act.h:     ((real) -1.0/(y)))
act.h:     ((real) (y) <= SMALL_VAL) ? ((real) -(d) * LARGE_VAL) :\
act.h:       ((real) -(d)/(y)))
act.h:  for (B = U->block, sB = B + U->numBlocks, L = U->incoming; B < sB; B++)\
act.h:    for (O = B->output, sL = L + B->numUnits; L < sL; O++, L++)\
act.h: for (B = U->block, sB = B + U->numBlocks, L = U->incoming; B < sB; B++) {\
act.h:   for (O = B->output, sL = L + B->numUnits; L + 10 < sL;\
act.h:  for (B = U->block, sB = B + U->numBlocks, L = U->incoming; B < sB; B++)\
act.h:    for (O = B->output, nU = B->groupUnits, sL = L + B->numUnits; L < sL;\
act.h: for (B = U->block, sB = B + U->numBlocks, L = U->incoming; B < sB; B++) {\
act.h:   for (O = B->output, nU = B->groupUnits, D = O + nU, sL = L + B->numUnits;\
act.h:#define L_WGT     L->weight
act.h:#define L_DRV     L->deriv
defaults.h:#define SIGMOID_RANGE    16     /* Sigmoid defined for up to +- this value */
defaults.h:#define NUM_COLORS       101      /* Colors in blue-red colormap */
defaults.h:// #define AUTO_NICE_VALUE  10       /* Long-running process renice value */
defaults.h:#define AUTO_NICE_VALUE  0        /* Long-running process renice value */
defaults.h:#define AUTO_NICE_DELAY  10       /* Minutes before auto-renicing */
example.h:  for (s = 0; s < Root->numExampleSets; s++) {\
example.h:    S = Root->set[s];\
example.h:      if (!(S = lookupExampleSet(_name->s)))\
example.h:        return warning("%s: example set \"%s\" doesn't exist", argv[0], _name->s);\
extension.h:  for (h = 0; h < Net->numGroups; h++) {\
extension.h:    H = Net->group[h];\
extension.h:  if (G->type & LESIONED) {\
extension.h:    for (V = G->unit, sV = V + G->numUnits; V < sV; V++)\
extension.h:      if (!(V->type & LESIONED)) {proc;}\
extension.h:    for (V = G->unit, sV = V + G->numUnits; V < sV; V++)\
extension.h:  for (U = G->unit, V = H->unit, sU = U + G->numUnits, sV = V + H->numUnits; U < sU && V < sV; U++,V++) \
extension.h:  for (B = U->block, sB = B + U->numBlocks, L = U->incoming; B < sB; B++)\
extension.h:    for (V = B->unit, sL = L + B->numUnits; L < sL; V++, L++)\
extension.h:  for (B2 = U->block, sB2 = B2 + U->numBlocks, L2 = U->incoming; B2 < sB2; B2++)\
extension.h:    for (V2 = B2->unit, sL2 = L2 + B2->numUnits; L2 < sL2; V2++, L2++)\
extension.h:#define DIST(r1,c1,r2,c2) SQRT(((r1)-(r2))*((r1)-(r2))+((c1)-(c2))*((c1)-(c2)))
extension.h:#define GAUSS(x,d) EXP(-((x)*(x))/((d)*(d)))
network.h:/* This holds all of the user-accessible global stuff.  
network.h:#define IN_BLOCK(U, B) (((U) >= (B)->unit) && \
network.h:			((U) < ((B)->unit + (B)->numUnits)))
network.h:#define IN_GROUP(B, G) (((B)->unit >= (G)->unit) && \
network.h:			((B)->unit < ((G)->unit + (G)->numUnits)))
network.h:  for (g = 0; g < Net->numGroups; g++) {\
network.h:    G = Net->group[g];\
network.h:  for (g = Net->numGroups - 1; g >= 0; g--) {\
network.h:    G = Net->group[g];\
network.h:    G = Net->group[g];\
network.h:  for (g = last; g >= first; g--) {\
network.h:    G = Net->group[g];\
network.h:      if (!(G = lookupGroup(_name->s)))\
network.h:        return warning("%s: group \"%s\" doesn't exist", argv[0], _name->s);\
network.h:  if (G->type & LESIONED) {\
network.h:    for (U = G->unit, sU = U + G->numUnits; U < sU; U++)\
network.h:      if (!(U->type & LESIONED)) {proc;}\
network.h:    for (U = G->unit, sU = U + G->numUnits; U < sU; U++)\
network.h:  if (G->type & LESIONED) {\
network.h:    for (u = 0, U = G->unit, sU = U + G->numUnits; U < sU; u++, U++)\
network.h:      if (!(U->type & LESIONED)) {proc;}\
network.h:    for (u = 0, U = G->unit, sU = U + G->numUnits; U < sU; u++, U++)\
network.h:  for (u = 0, U = G->unit, sU = U + G->numUnits; U < sU; u++, U++)\
network.h:      if (!(U = lookupUnit(_name->s)))\
network.h:        return warning("%s: unit \"%s\" doesn't exist", argv[0], _name->s);\
network.h:  for (b = 0; b < U->numBlocks; b++) {\
network.h:    B = U->block + b;\
network.h:  for (L = U->incoming, sL = L + U->numIncoming; L < sL; L++)\
network.h:  for (g = 0; g < Root->numGraphs; g++) {\
network.h:    if ((G = Root->graph[g])) {proc;}}}
network.h:      int g = atoi(_name->s);\
network.h:      if (g >= Root->numGraphs || !(G = Root->graph[g]))\
network.h:        return warning("%s: graph \"%s\" doesn't exist", argv[0], _name->s);\
network.h:  for (t = 0; t < G->numTraces; t++) {\
network.h:    if ((T = G->trace[t])) {proc;}}}
network.h:      int t = atoi(_name->s);\
network.h:      if (t >= G->numTraces || !(T = G->trace[t]))\
network.h:                       _name->s, G->num);\
network.h:     ((Net->historyLength) ? \
network.h:     (((tick) + Net->exampleHistoryStart + (Net->historyLength << 10)) \
network.h:      % Net->historyLength) : 0)
network.h:     if ((U)->array) (U)->array[index] = (value)
network.h:     (((U)->array) ? (U)->array[index] : NaN)
network.h:  FOR_EACH_UNIT(G, if (U->array) U->array[index] = U->value;)}
network.h:  FOR_EACH_UNIT2(H, if (U->array) U->array[index] = G->unit[u].value;)}
network.h:  FOR_EACH_UNIT(G, U->value = (U->array) ? U->array[index] : NaN;)}
network.h:  FOR_EACH_UNIT2(G, H->unit[u].value = (U->array) ? U->array[index] : NaN;)}
network.h:  FOR_EACH_UNIT(G, U->value = val);}
network.h:  if (F->numUnits > T->numUnits)\
network.h:    error("COPY_VALUES used with mis-matched groups");\
network.h:  FOR_EACH_UNIT2(F, T->unit[u].valueT = U->valueF);}
network.h:  if (F->numUnits > T->numUnits)\
network.h:    error("COPY_HISTORY used with mis-matched groups");\
network.h:  FOR_EACH_UNIT2(F, T->unit[u].arrayT[indexT] = U->arrayF[indexF]);}
network.h:  if (G->costType & ERROR_MASKS)\
network.h:  if (G->costType & ERROR_MASKS)\
network.h:  if (Net->proc && Tcl_EvalObjEx(Interp, Net->proc, TCL_EVAL_GLOBAL) \
object.h:  int maxDepth;      /* For printing recursive object structures.  If -1,
object.h:  flag writable;     /* Is this not write-protected */
system.h:   should try to localize any machine-specific customizations to sysext.h. */
system.h:/* Don't change these, I use the fact that FALSE is 0 and TRUE is non-zero */
system.h:  NaNf   is a 4-byte nan
system.h:  NaNd   is a 8-byte nan
system.h:  isNaNf tests a 4-byte nan
system.h:  isNaNd tests a 8-byte nan
system.h:/************************* MACHINE-SPECIFIC SETTINGS *************************/
system.h:#define BUNZIP2  "bzip2 -d"
system.h:#define UNZIP    "gzip -d"
system.h:#define NO_VALUE "-"
tkCanvas.h: * tkCanvas.h --
tkCanvas.h: * Copyright (c) 1991-1994 The Regents of the University of California.
tkCanvas.h: * Copyright (c) 1994-1995 Sun Microsystems, Inc.
tkCanvas.h:    TagSearchExpr *next;        /* for linked lists of expressions - used in bindings */
tkCanvas.h:    int borderWidth;		/* Width of 3-D border around window. */
tkCanvas.h:				 * traversal highlight and 3-D border.
tkCanvas.h:    int confine;		/* Non-zero means constrain view to keep
tkCanvas.h:     * X = x - xOrigin;
tkCanvas.h:     * Y = y - yOrigin;
tkCanvas.h:				 * upper-left corner of window, given in
tkCanvas.h:				 * the upper-left corner of the drawable
tkCanvas.h:    int scanX;			/* X-position at which scan started (e.g.
tkCanvas.h:    int scanY;			/* Y-position at which scan started (e.g.
tkCanvas.h:    char *takeFocus;		/* Value of -takefocus option;  not used in
tkCanvas.h:     * Additional information, added by the 'dash'-patch
tkCanvas.h: * REDRAW_PENDING -		1 means a DoWhenIdle handler has already
tkCanvas.h: * REDRAW_BORDERS - 		1 means that the borders need to be redrawn
tkCanvas.h: * REPICK_NEEDED -		1 means DisplayCanvas should pick a new
tkCanvas.h: * GOT_FOCUS -			1 means the focus is currently in this
tkCanvas.h: * CURSOR_ON -			1 means the insertion cursor is in the "on"
tkCanvas.h: * UPDATE_SCROLLBARS -		1 means the scrollbars should get updated
tkCanvas.h: * LEFT_GRABBED_ITEM -		1 means that the mouse left the current
tkCanvas.h: *				didn't change canvasPtr->currentItemPtr.
tkCanvas.h: * REPICK_IN_PROGRESS -		1 means PickCurrentItem is currently
tkCanvas.h: * BBOX_NOT_EMPTY -		1 means that the bounding box of the area
tkCanvas.h: * FORCE_REDRAW -		1 means that the new coordinates of some
tkCanvas.h: * Canvas-related procedures that are shared among Tk modules but not
tkCanvas.h:    XColor *colors;		/* Pixel value -> RGB mappings */
train.h:  Net->gradientLinearity = 1.0;\
train.h:  Net->weightCost = 0.0;\
train.h:  if (Net->type & FROZEN) return;\
train.h:  FOR_EACH_GROUP({if (G->type & FROZEN) continue;\
train.h:    if (G->type & ADAPTIVE_GAIN) updateAdaptiveGain(G);\
train.h:    FOR_EACH_UNIT(G, {if (U->type & FROZEN) continue;\
train.h:      L = U->incoming; M = U->incoming2;\
train.h:	if (B->type & FROZEN) {\
train.h:	  L += B->numUnits; M += B->numUnits;\
train.h:	    chooseValue3(B->learningRate, G->learningRate, Net->learningRate);\
train.h:	    chooseValue3(B->momentum, G->momentum, Net->momentum);\
train.h:	    chooseValue3(B->weightDecay, G->weightDecay, Net->weightDecay);\
train.h:	    chooseValue3(B->weightEliminationW0, G->weightEliminationW0, Net->weightEliminationW0);\
train.h:	    for (sL = L + B->numUnits; L < sL; L++, M++) {proc}\
train.h:            for (sL = L + B->numUnits; L < sL; L++, M++) {\
train.h:              lastWeightDelta = M->lastWeightDelta; \
train.h:              deriv = L->deriv; \
train.h:              gradLin -= lastWeightDelta * deriv; \
train.h:              weightCost += SQUARE(L->weight);\
train.h:    Net->gradientLinearity = (lastDeltaLen * derivLen == 0.0) ? NaN :\
train.h:    Net->weightCost = weightCost / 2;\
type.h:     ((class == GROUP && G->type & type) ||\
type.h:      (class == GROUP_INPUT && G->inputType & type) ||\
type.h:      (class == GROUP_OUTPUT && G->outputType & type) ||\
type.h:      (class == GROUP_COST && G->costType & type))
type.h:/* The following are for user-defined link types */
type.h:#define LINK_NUM_TYPES ((1 << LINK_TYPE_BITS) - 1)
type.h:#define SET_LINK_TYPE(t,B)   ((B)->type = (((B)->type & ~LINK_NUM_TYPES)|(t)))
type.h:#define GET_LINK_TYPE(B)     ((B)->type & LINK_NUM_TYPES)
type.h:/* DISPLAY-RELATED TYPES */
util.h:#define SIGMOID(x,g)  ((real) 1.0 / (EXP(-(x) * (g)) + 1.0))
util.h:#define SMALL_VAL     ((real) 1e-8)
util.h:#define INV_SIGMOID(y,g) (((y) <= 0.0) ? -LARGE_VAL : \
util.h:			  (LOG((y) / (1-(y))) / (g)))
util.h:#define OFFSET(Obj,x) (((char *) &((Obj)->x)) - ((char *) (Obj)))
