act.c:      //      if (UnitUp || G->type & USE_OUTPUT_HIST)
act.c:      if (UnitUp || G->type & USE_OUTPUT_HIST || Net->type & CONTINUOUS)
act.c:      if ((G->type & ERROR_MASKS) && (UnitUp || G->type & USE_TARGET_HIST))
act.c:  real *O = G->output;
act.c:  real *O = G->output, 
act.c:    initInput = chooseValue(G->initInput, Net->initInput),
act.c:    initOutput = chooseValue(G->initOutput, Net->initOutput),
act.c:    initOutputRange = chooseValue(G->initOutputRange, Net->initOutputRange);
act.c:  if (!G->inputProcs || G->outputType & HARD_CLAMP) {
act.c:    if (G->inputType & IN_INTEGR) {
act.c:  real *O = G->output;
act.c:  real *D = G->outputDeriv;
act.c:  real *D = G->outputDeriv;
act.c:  memset(G->outputDeriv, 0, G->numUnits * sizeof(real));
act.c:  memset(G->outputDeriv, 0, G->numUnits * sizeof(real));
act.c:  if (G->costType) {
act.c:  int lastTick = G->net->ticksOnExample - 1 ;
act.c:  if (G->inputType & IN_INTEGR) {
act.c:    //    real val = chooseValue(G->initInput, Net->initInput);
act.c:    for (P = G->inputProcs; P; P = P->next)
act.c:  if (G->outputType & (OUT_INTEGR | INTERACT_INTEGR)) {
act.c:    //    real val = chooseValue(G->initOutput, Net->initOutput);
act.c:    for (P = G->outputProcs; P; P = P->next)
act.c:  if (G->inputType & IN_INTEGR) {
act.c:    real val = chooseValue(G->initInput, Net->initInput);
act.c:    for (P = G->inputProcs; P; P = P->next)
act.c:	for (i = 0; i < G->numUnits; i++)
act.c:  if (G->outputType & (OUT_INTEGR | INTERACT_INTEGR)) {
act.c:    real val = chooseValue(G->initOutput, Net->initOutput);
act.c:    for (P = G->outputProcs; P; P = P->next)
act.c:	for (i = 0; i < G->numUnits; i++)
act.c:  if (G->inputType & IN_INTEGR) {
act.c:    for (P = G->inputProcs; P; P = P->next)
act.c:	memset(P->unitData, 0, G->numUnits * sizeof(real));
act.c:  if (G->outputType & OUT_INTEGR) {
act.c:    for (P = G->outputProcs; P; P = P->next)
act.c:	memset(P->unitData, 0, G->numUnits * sizeof(real));
act.c:  if (G->noiseProc) {
act.c:    real range = chooseValue(G->noiseRange, Net->noiseRange);
act.c:      L->deriv = G->noiseProc(L->deriv, range);}));
act.c:  if (G->type & IPSP_DYNAMIC) 
act.c:  if (G->type & (INTEGR_MULT_DECAY|INTEGR_MULT_DECAY2))
act.c:  real crit = G->mismatchCriterion, factor = G->mismatchPenalty ;
act.c:  P->unitHistoryData = realMatrix(Net->historyLength, G->numUnits,
act.c:  real initOutput = chooseValue(G->initOutput, Net->initOutput),
act.c:    gain = chooseValue(G->gain, Net->gain),
act.c:    strength = chooseValue(G->clampStrength, Net->clampStrength), val;
act.c:  real dt = Net->dt * G->dtScale, *lastInput = P->unitData;
act.c:  real dt = Net->dt * G->dtScale, *lastInputDeriv = P->unitData;
act.c:  P->unitData = realArray(G->numUnits, "IN_INTEGR:unitData");
act.c:  P->unitHistoryData = realMatrix(Net->historyLength, G->numUnits,
act.c:  mean /= (real)G->numUnits ;
act.c:  sd = sqrt(sd / (real)G->numUnits) ;
act.c:  P->unitHistoryData = realMatrix(Net->historyLength, G->numUnits,
act.c:  if (G->noiseProc) {
act.c:    real range = chooseValue(G->noiseRange, Net->noiseRange);
act.c:	if (!G->noZeroInputNoise || U->externalInput > 0.0)
act.c:	  U->input = G->noiseProc(U->input, range) ;
act.c:  if (G->noiseProc) {
act.c:    real range = chooseValue(G->noiseRange, Net->noiseRange);
act.c:    FOR_EACH_UNIT(G, U->inputDeriv = G->noiseProc(U->inputDeriv, range));
act.c:  real strength = chooseValue(G->clampStrength, Net->clampStrength);
act.c:  real drop = chooseValue(G->dropoutProb, Net->dropoutProb);
act.c:  real drop = chooseValue(G->dropoutProb, Net->dropoutProb);
act.c:	real lower = G->elbowLowerSlope, upper = G->elbowUpperSlope ;
act.c:	if (originalOutput[u] < G->elbowPoint){
act.c:	real lower = G->elbowLowerSlope, upper = G->elbowUpperSlope ;
act.c:		if (originalOutput[u] < G->elbowPoint)
act.c:  P->unitHistoryData = realMatrix(Net->historyLength, G->numUnits,"ELBOW:unitHistoryData");
act.c:  real outputGain = chooseValue(G->outputGain, Net->outputGain);
act.c:  if (G->type & ADAPTIVE_GAIN) {
act.c:    real gain = chooseValue(G->gain, Net->gain);
act.c:  if (G->type & ADAPTIVE_GAIN) {
act.c:    real gain = chooseValue(G->gain, Net->gain);
act.c:  real x, drop = chooseValue(G->dropoutProb, Net->dropoutProb);
act.c:  if (G->type & ADAPTIVE_GAIN) {
act.c:    real gain = chooseValue(G->gain, Net->gain);
act.c:  if (G->type & ADAPTIVE_GAIN) {
act.c:    real gain = chooseValue(G->gain, Net->gain);
act.c:  real x, z, gain = chooseValue(G->gain, Net->gain), 
act.c:    y = EXP(gain * chooseValue(G->ternaryShift, Net->ternaryShift));
act.c:  real x, z, v, w, gain = chooseValue(G->gain, Net->gain), 
act.c:    y = EXP(gain * chooseValue(G->ternaryShift, Net->ternaryShift));
act.c:  if (G->type & ADAPTIVE_GAIN) {
act.c:    real gain = chooseValue(G->gain, Net->gain);
act.c:  if (G->type & ADAPTIVE_GAIN) {
act.c:    real gain = chooseValue(G->gain, Net->gain);
act.c:  if (G->type & ADAPTIVE_GAIN) {
act.c:    real gain = chooseValue(G->gain, Net->gain);
act.c:  if (G->type & ADAPTIVE_GAIN) {
act.c:    real gain = chooseValue(G->gain, Net->gain);
act.c:  int i, j, mu = 0, mi, mj, cols = G->numColumns, rows = G->numUnits / cols;
act.c:  flag periodic = G->periodicBoundary;
act.c:  neigh = SQUARE(G->neighborhood);
act.c:  real kthA, *kA = G->kAct ;
act.c:  int i, kthI = 0, k = G->k, *kI = G->kIndex ;
act.c:  if (k > G->numUnits) {
act.c:    printf("kWTAOutput: G->k (%d) > G->numUnits (%d)\n", G->k, G->numUnits) ;
act.c:  for (i = 0 ; i < k ; i++) G->unit[kI[i]].output = 1.0 ; 
act.c:  P->unitHistoryData = realMatrix(Net->historyLength, G->numUnits, 
act.c:  G->kIndex = (int *)safeMalloc(G->numUnits * sizeof(int), "kWTAOutputInit:G->kIndex") ;
act.c:  G->kAct   = (real *)safeMalloc(G->numUnits * sizeof(real), "kWTAOutputInit:G->kAct") ;
act.c:  real gain = chooseValue(G->gain, Net->gain), 
act.c:    dt = Net->dt * G->dtScale, *lastOutput = P->unitData;
act.c:  P->unitData = realArray(G->numUnits, "OUT_BOLTZ:unitData");
act.c:  P->unitHistoryData = realMatrix(Net->historyLength, G->numUnits,
act.c:    strength = chooseValue(G->clampStrength, Net->clampStrength);
act.c:    scale = 1.0 - chooseValue(G->clampStrength, Net->clampStrength);
act.c:  P->unitHistoryData = realMatrix(Net->historyLength, G->numUnits,
act.c:  real dt = Net->dt * G->dtScale;
act.c:  real dt = Net->dt * G->dtScale;
act.c:  P->unitData = realArray(G->numUnits, "OUT_INTEGR:unitData");
act.c:  P->unitHistoryData = realMatrix(Net->historyLength, G->numUnits,
act.c:  P->unitHistoryData = realMatrix(Net->historyLength, G->numUnits,
act.c:    range = chooseValue(G->noiseRange, Net->noiseRange);
act.c:  int noiseTick = (G->net->type&CONTINUOUS ? 1 : 0) ;
act.c:  if (G->applyNoiseOnce && Net->currentTick > noiseTick) {
act.c:    if (G->type&INPUT) restoreOutputs(G, Net->currentTick-1) ;
act.c:	if (G->noiseProc &&
act.c:	    (!G->noZeroInputNoise || cleanOutput[u] > 0.0))
act.c:	  U->output = G->noiseProc(U->output, range);
act.c:  P->unitHistoryData = realMatrix(Net->historyLength, G->numUnits,
act.c:  if (G->noiseProc) {
act.c:    real range = chooseValue(G->noiseRange, Net->noiseRange);
act.c:		  G->noiseProc(U->outputDeriv, range));
act.c:  real max = G->maxOutput, min = G->minOutput;
act.c:  P->unitHistoryData = realMatrix(Net->historyLength, G->numUnits,
act.c:  real max = G->minOutput;
act.c:      //    if (U != winner) U->output = G->minOutput;
act.c:  P->unitHistoryData = realMatrix(Net->historyLength, G->numUnits,
act.c:  real decay = G->actDecay, rest = G->actRest ;
act.c:	real rest = G->actRest ;
act.c:	real constant = G->decayConstant ;
act.c:	real decayRange = G->decayNoiseRange;
act.c:	real rest = G->actRest ;
act.c:	real constant = G->decayConstant ;
act.c:	real tau   = chooseValue(G->integratedOutputTau, Net->integratedOutputTau) ;
act.c:	real bound = chooseValue(G->integratedOutputDecay, Net->integratedOutputDecay) ;
act.c:	if (G->type&RESET_ON_EXAMPLE && Net->currentTick == 1)
act.c:	real tau   = chooseValue(G->integratedOutputTau, Net->integratedOutputTau) ;
act.c:	real bound = chooseValue(G->integratedOutputDecay, Net->integratedOutputDecay) ;
act.c:	if (G->type&RESET_ON_EXAMPLE && Net->currentTick == 1)
act.c:	real constant = G->decayConstant ;
act.c:	real maxTick = G->maxTick;
act.c:	real constant = G->decayConstant ;
act.c:	real maxTick = G->maxTick;
act.c:	real constant = G->decayConstant;
act.c:	real maxTick = G->maxTick;
act.c:		if (G->type&RESET_ON_EXAMPLE && Net->currentTick == 1){
act.c:		real threshold = G->IPSPthreshold;
act.c:        real maxTick = G->maxTick;
act.c:	real rest = G->actRest;
act.c:	real constant = G->decayConstant;
act.c:	real rest = G->actRest;
act.c:		real minus = G->invSquareTuning * invSquare * (U->output - rest);
act.c:  P->unitHistoryData = realMatrix(Net->historyLength, G->numUnits,
act.c:	P->unitHistoryData = realMatrix(Net->historyLength, G->numUnits,
act.c:	P->unitHistoryData = realMatrix(Net->historyLength, G->numUnits,
act.c:	P->unitHistoryData = realMatrix(Net->historyLength, G->numUnits,
act.c:	P->unitHistoryData = realMatrix(Net->historyLength, G->numUnits,
act.c:	P->unitHistoryData = realMatrix(Net->historyLength, G->numUnits, 
act.c:	P->unitHistoryData = realMatrix(Net->historyLength, G->numUnits,
act.c:	P->unitHistoryData = realMatrix(Net->historyLength, G->numUnits,
act.c:	P->unitHistoryData = realMatrix(Net->historyLength, G->numUnits,
act.c:	P->unitHistoryData = realMatrix(Net->historyLength, G->numUnits,
act.c:	P->unitHistoryData = realMatrix(Net->historyLength, G->numUnits,
act.c:  real dt   = Net->dt * G->dtScale;
act.c:  real max  = G->maxOutput;
act.c:  real min  = G->minOutput;
act.c:  real rest = chooseValue(G->initOutput, Net->initOutput);
act.c:  P->unitData = realArray(G->numUnits, "INTERACT_INTEGR:unitData");
act.c:    targetRadius = chooseValue(G->targetRadius, Net->targetRadius),
act.c:    targetOneRadius = chooseValue(G->targetOneRadius, Net->targetOneRadius),
act.c:    targetZeroScaling = chooseValue(G->targetZeroScaling, Net->targetZeroScaling),
act.c:    zeroErrorRadius = chooseValue(G->zeroErrorRadius, Net->zeroErrorRadius);
act.c:  error *= G->errorScale / Net->ticksPerInterval * 
act.c:  G->error += error;
act.c:  real targetZeroScaling = chooseValue(G->targetZeroScaling, Net->targetZeroScaling) ;
act.c:		Net->currentExample->frequency : 1.0) * G->errorScale * 2.0;
act.c:  error *= G->errorScale / Net->ticksPerInterval * 
act.c:  G->error += error;
act.c:		Net->currentExample->frequency : 1.0) * G->errorScale * 2.0;
act.c:  real targMin, targMax, gap = chooseValue(G->targetRadius, Net->targetRadius) ;
act.c:  error *= G->errorScale / Net->ticksPerInterval * 
act.c:  G->error += error;
act.c:  real gap = chooseValue(G->targetRadius, Net->targetRadius) ;
act.c:  error *= G->errorScale / Net->ticksPerInterval * 
act.c:  G->error += error;
act.c:		Net->currentExample->frequency : 1.0) * G->errorScale * 2.0;
act.c:    targetRadius = chooseValue(G->targetRadius, Net->targetRadius),
act.c:    targetOneRadius = chooseValue(G->targetOneRadius, Net->targetOneRadius),
act.c:    targetZeroScaling = chooseValue(G->targetZeroScaling, Net->targetZeroScaling),
act.c:    zeroErrorRadius = chooseValue(G->zeroErrorRadius, Net->zeroErrorRadius);
act.c:  error *= G->errorScale / Net->ticksPerInterval * 
act.c:  G->error += error;
act.c:	     1.0) * G->errorScale, 
act.c:    targetZeroScaling = chooseValue(G->targetZeroScaling, Net->targetZeroScaling),
act.c:    targetRadius = chooseValue(G->targetRadius, Net->targetRadius),
act.c:    zeroErrorRadius = chooseValue(G->zeroErrorRadius, Net->zeroErrorRadius);
act.c:  error *= G->errorScale / Net->ticksPerInterval * 
act.c:  G->error += error;
act.c:		1.0) * G->errorScale, output, target;
act.c:    targetRadius = chooseValue(G->targetRadius, Net->targetRadius), 
act.c:    zeroErrorRadius = chooseValue(G->zeroErrorRadius, Net->zeroErrorRadius);
act.c:		   Net->currentExample->frequency : 1.0) * G->errorScale;
act.c:  error = (1.0 - data->cosine) * G->errorScale / Net->ticksPerInterval * 
act.c:  G->error += error;
act.c:  real cost = 0.0, min = G->minOutput, max = G->maxOutput;
act.c:    real p = chooseValue(G->outputCostPeak, Net->outputCostPeak), 
act.c:  cost *= G->outputCostScale / Net->ticksPerInterval;
act.c:  G->outputCost += cost;
act.c:  real strength = Net->outputCostStrength * G->outputCostScale /
act.c:    Net->ticksPerInterval, min = G->minOutput, max = G->maxOutput;
act.c:    real p = chooseValue(G->outputCostPeak, Net->outputCostPeak),
act.c:  real cost = 0.0, min = G->minOutput, max = G->maxOutput;
act.c:  real p = chooseValue(G->outputCostPeak, Net->outputCostPeak) ;
act.c:  cost *= G->outputCostScale / Net->ticksPerInterval;
act.c:  G->outputCost += cost;
act.c:  real strength = Net->outputCostStrength * G->outputCostScale /
act.c:    Net->ticksPerInterval, min = G->minOutput, max = G->maxOutput;
act.c:  real p = chooseValue(G->outputCostPeak, Net->outputCostPeak);
act.c:  real target = chooseValue(G->outputCostPeak, Net->outputCostPeak) ;
act.c:  G->sumActivation = sum ; // used in groupActCostBack
act.c:  cost = ABS(sum - target*(real)G->numUnits) * 
act.c:         G->outputCostScale/(real)Net->ticksPerInterval;
act.c:  G->outputCost += cost;
act.c:  real strength = Net->outputCostStrength * G->outputCostScale / Net->ticksPerInterval ;
act.c:  real target   = chooseValue(G->outputCostPeak, Net->outputCostPeak);
act.c:  real ave      = G->sumActivation / (real)G->numUnits ;
act.c:  real strength = Net->outputCostStrength * G->outputCostScale / Net->ticksPerInterval ;
act.c:  G->outputCost += cost;
act.c:  real strength = Net->outputCostStrength * G->outputCostScale / Net->ticksPerInterval ;
act.c:  real cost = 0.0, min = G->minOutput, max = G->maxOutput;
act.c:    real p = chooseValue(G->outputCostPeak, Net->outputCostPeak), 
act.c:  cost *= G->outputCostScale / Net->ticksPerInterval;
act.c:  G->outputCost += cost;
act.c:  real strength = Net->outputCostStrength * G->outputCostScale * 2.0 /
act.c:    Net->ticksPerInterval, min = G->minOutput, max = G->maxOutput;
act.c:    real p = chooseValue(G->outputCostPeak, Net->outputCostPeak),
act.c:    p = chooseValue(G->outputCostPeak, Net->outputCostPeak),
act.c:  cost *= G->outputCostScale / Net->ticksPerInterval;
act.c:  G->outputCost += cost;
act.c:  real p = chooseValue(G->outputCostPeak, Net->outputCostPeak),
act.c:    scale = Net->outputCostStrength * G->outputCostScale * 2.0 /
act.c:    p = chooseValue(G->outputCostPeak, Net->outputCostPeak),
act.c:  cost *= G->outputCostScale / Net->ticksPerInterval;
act.c:  G->outputCost += cost;
act.c:  real strength = Net->outputCostStrength * G->outputCostScale /
act.c:    p = chooseValue(G->outputCostPeak, Net->outputCostPeak),
act.c:    p = chooseValue(G->outputCostPeak, Net->outputCostPeak), 
act.c:  cost *= G->outputCostScale / Net->ticksPerInterval;
act.c:  G->outputCost += cost;
act.c:  real strength = Net->outputCostStrength * G->outputCostScale *
act.c:    p = chooseValue(G->outputCostPeak, Net->outputCostPeak), 
act.c:  real *lastOutput = P->unitData, *thisOutput = P->unitData + G->numUnits,
act.c:  if (G->type & RESET_ON_EXAMPLE &&
act.c:  cost *= G->outputCostScale / Net->ticksPerInterval;
act.c:  G->outputCost += cost;
act.c:  real *lastOutput = P->unitData, *thisOutput = P->unitData + G->numUnits,
act.c:  if (G->type & RESET_ON_EXAMPLE &&
act.c:    strength = Net->outputCostStrength * G->outputCostScale * 2.0 /
act.c:  P->unitData = realArray(2 * G->numUnits, "DELTA_COST:unitData");
act.c:  G->groupCriterionReached = standardGroupCriterion;
act.c:  G->groupCriterionReached = maxGroupCriterion;
act.c:  FOR_EACH_GROUP(if (G->groupCriterionReached) {
act.c:      chooseValue(G->trainGroupCrit, Net->trainGroupCrit) :
act.c:      chooseValue(G->testGroupCrit, Net->testGroupCrit);
act.c:    if (!(reached = G->groupCriterionReached(G, criterion))) break;
act.c:  flag clamped = (!G->inputProcs || ((G->outputType & HARD_CLAMP) && 
act.c:  if (clamped || !(G->inputType & BASIC_INPUT_TYPES)) {
act.c:    for (P = G->inputProcs; P; P = P->next)
act.c:  if (UnitUp || alwaysStore || G->type & USE_INPUT_HIST) 
act.c:  if (!G->inputProcs || ((G->outputType & HARD_CLAMP) && 
act.c:			 (G->outputType == HARD_CLAMP || fullyClamped(G))))
act.c:  if (G->inputProcs) {
act.c:    if ((P = G->inputProcs->prev)) do {
act.c:    } while (P != G->inputProcs->prev);
act.c:  if (!(G->outputType & (BASIC_OUTPUT_TYPES | BIAS_CLAMP)))
act.c:  for (P = G->outputProcs; P; P = P->next)
act.c:  if (UnitUp || alwaysStore || G->type & USE_OUTPUT_HIST) 
act.c:  if (G->outputProcs) {
act.c:    if ((P = G->outputProcs->prev)) do {
act.c:    } while (P != G->outputProcs->prev);
act.c:  int inGrace = (Net->inGracePeriod || Net->currentTick <= G->graceTick) ;
act.c:    if ((UnitUp || alwaysStore || G->type & USE_TARGET_HIST) && 
act.c:	G->costType & ERROR_MASKS)
act.c:    for (P = G->costProcs; P; P = P->next)
act.c:    if ((UnitUp || alwaysStore || G->type & USE_TARGET_HIST) && 
act.c:	G->costType & ERROR_MASKS)
act.c:  int inGrace = (Net->inGracePeriod || Net->currentTick <= G->graceTick) ;
act.c:  if (G->costProcs) {
act.c:    if (!inGrace && (P = G->costProcs->prev)) do {
act.c:    } while (P != G->costProcs->prev);
act.c:    if (UnitUp || alwaysStore || G->type & USE_OUT_DERIV_HIST)
act.c:      if (G->type & ELMAN) {
act.c:	for (P = G->outputProcs; P; P = P->next)
act.c:	if (wasReset && G->type & RESET_ON_EXAMPLE) {
act.c:  printf("%9s[%s]:", G->name, tag) ;
act.c:      if (!(G->type & RESET_ON_EXAMPLE)) {
act.c:	if (G->inputType & IN_INTEGR)
act.c:  FOR_EACH_GROUP(if (G->type & RESET_ON_EXAMPLE) resetGroup(G)) ;
act.c:    G->error = G->outputCost = 0.0;
act.c:  FOR_EACH_GROUP(if (!(G->type & RESET_ON_EXAMPLE)) resetGroup(G)) ;
act.c:  FOR_EACH_GROUP(if (G->type & DERIV_NOISE) injectLinkDerivNoise(G));
act.c:  FOR_EACH_GROUP(if (G->type & OUTPUT) numOutputGroups++);
act.c:    FOR_EACH_GROUP(if (G->type & OUTPUT) {
act.c:      stringAppendV(S, " %-12s", G->name);
act.c:    FOR_EACH_GROUP(if (G->type & OUTPUT) {
act.c:      smartAppendVal(S, G->error, 8);
act.c:      eval("set Test(%s.totalError) %d", G->name, ticks);
act.c:    FOR_EACH_GROUP(if (G->type & OUTPUT) {
act.c:      smartAppendVal(S, G->error / examples, 8);
act.c:      eval("set Test(%s.exampleError) %g", G->name, Net->error / examples);
act.c:    FOR_EACH_GROUP(if (G->type & OUTPUT) {
act.c:      smartAppendVal(S, G->error / ticks, 8);
act.c:      eval("set Test(%s.tickError) %g", G->name, Net->error / ticks);
act.c:    FOR_EACH_GROUP(G->error = G->outputCost = 0.0);
act.c:    if ((UnitUp || G->type & USE_TARGET_HIST) && (G->costType & ERROR_MASKS))
act.c:    if (G->outputType & OUT_BOLTZ) {
act.c:	chooseValue(G->trainGroupCrit, Net->trainGroupCrit) :
act.c:	chooseValue(G->testGroupCrit, Net->testGroupCrit);
act.c:      for (P = G->outputProcs; P; P = P->next)
act.c:	  for (u = 0; u < G->numUnits; u++)
act.c:	    if (ABS(G->output[u] - lastOutput[u]) > criterion)
act.c:  real initOutput = chooseValue(G->initOutput, Net->initOutput);
act.c:  real clampStrength = chooseValue(G->clampStrength, Net->clampStrength),
act.c:    initOutput = chooseValue(G->initOutput, Net->initOutput) * clampStrength;
act.c:      FOR_EACH_GROUP(if (!(G->type & BIAS)) initializeBoltzmannOutputs(G));
act.c:	  if (G->type & RESET_ON_EXAMPLE) resetBoltzmannOutputs(G);
act.c:	if (G->type & RESET_ON_EXAMPLE) resetBoltzmannOutputs(G);
canvRect.c:  if (canvRectPtr->unit < 0 || canvRectPtr->unit >= G->numUnits)
canvRect.c:  U = G->unit + canvRectPtr->unit;
canvRect.c:	if (!isNaN(G->minOutput)) {
canvRect.c:	  if (!isNaN(G->maxOutput)) {
canvRect.c:	    value = (value - G->minOutput) / (G->maxOutput - G->minOutput);
canvRect.c:	    value = LOG(value - G->minOutput);
canvRect.c:	} else if (!isNaN(G->maxOutput)) {
canvRect.c:	  value = -LOG(G->maxOutput - value);
canvRect.c:    if ((Net->type & FROZEN) || (G->type & FROZEN) ||
connect.c:  mean = chooseValue3(B->randMean, G->randMean, Net->randMean);
connect.c:  range = chooseValue3(B->randRange, G->randRange, Net->randRange);
connect.c:  if (!doFrozen && (G->type & FROZEN)) return;
connect.c:  mean = chooseValue3(reqMean, G->randMean, mean);
connect.c:  range = chooseValue3(reqRange, G->randRange, range);
connect.c:  if (linkType == ALL_LINKS && G->outputType & ELMAN_CLAMP)
connect.c:    for (P = G->outputProcs; P; P = P->next) {
connect.c:  if (linkType == ALL_LINKS) G->type |= FROZEN;
connect.c:    if (!(G->type & FROZEN)) {
connect.c:      if (!frozen && (G->type & FROZEN)) continue;
connect.c:	      (!thawed && (!((Net->type | G->type | U->type | B->type)
connect.c:      if (!frozen && (G->type & FROZEN)) continue;
connect.c:	      (!thawed && (!((Net->type | G->type | U->type | B->type)
connectCom.c:	  if (!typeSet) typeName = G->name;
connectCom.c:    if (!typeSet) typeName = G->name;
connectCom.c:  FOR_EACH_GROUP_IN_LIST(gl1, fromGroups[G->num] = 1);
connectCom.c:		     G->num, G->num, U->num, b, link)) {
connectCom.c:    FOR_EACH_GROUP(if (!(G->type & HELD)) append("\"%s\" ", G->name));
connectCom.c:  FOR_EACH_GROUP(G, G->type &= ~HOLD_PENDING);
connectCom.c:    G->type |= HOLD_PENDING;
connectCom.c:    FOR_EACH_GROUP(if (G->type & HELD) append("\"%s\" ", G->name));
connectCom.c:  FOR_EACH_GROUP(G, G->type &= ~HOLD_PENDING);
connectCom.c:    FOR_EACH_GROUP(G, if (G->type & HELD) G->type |= HOLD_PENDING);
connectCom.c:      G->type |= HOLD_PENDING;
connectCom.c:    if (rangeSet) G->noiseRange = range;
connectCom.c:    G->noiseProc = proc;
display.c:  for (u = PF->unit->num; u < G->numUnits && u < PF->unit->num + PF->width; 
display.c:    if (G->unit[u].plotCol == 0) {
display.c:      G->unit[u].plotCol = -PF->num;
display.c:  for (u = PF->unit->num; u < G->numUnits && u < PF->width + PF->unit->num; 
display.c:    U = G->unit + u;
display.c:    if (G->costType & ERROR_MASKS) {
display.c:		   x, y, x + Net->unitCellSize, y + Net->unitCellSize, G->num,
display.c:		   U->num, NaNColor, G->num, U->num, G->num, U->num, G->num, 
display.c:		   x, y, x + outputSize, y + outputSize, G->num, U->num,
display.c:		   NaNColor, G->num, U->num, G->num, U->num, G->num, U->num)
display.c:		 x, y, x + Net->unitCellSize, y + Net->unitCellSize, G->num,
display.c:		 U->num, NaNColor, G->num, U->num, G->num, U->num, G->num, 
display.c:      if (G->numColumns) {
display.c:	if (G->numColumns > numCols) numCols = G->numColumns;
display.c:      } else if (G->numUnits > maxUnits) maxUnits = G->numUnits;
display.c:    if (G->type & BIAS) {
display.c:      argv[1] = G->name;
display.c:    else if (G->type & ELMAN) {
display.c:      argv[4] = G->name;
display.c:      sprintf(Buffer, "%d", (G->numColumns > 0) ? G->numColumns : numCols);
display.c:      argv[2] = G->name;
display.c:      sprintf(Buffer, "%d", (G->numColumns > 0) ? G->numColumns : numCols);
display.c:  FOR_EACH_GROUP(G->outPosition = G->inPosition = -1);
display.c:    if (!G->showIncoming || !G->numIncoming) continue;
display.c:	    if (G->inPosition == -1) {
display.c:	      G->inPosition = inPos;
display.c:	      inPos += G->numUnits + 1;
display.c:    if (G->outPosition != -1) {
display.c:      G->outPosition = outPos;
display.c:      outPos += G->numUnits + 1;
display.c:    if (G->outPosition != -1) {
display.c:	   topmargin + (int)(((real) G->numUnits / 2 + G->outPosition) * 
display.c:			     Space), G->name);
display.c:      for (U = G->unit, sU = U + G->numUnits; U < sU; U += 5)
display.c:	     topmargin + (G->outPosition + U->num) * Space, U->num);
display.c:    if (G->inPosition != -1) {
display.c:	   (((real) G->numUnits / 2 + G->inPosition) * Space), 
display.c:	   topmargin - (int) (fontsize * 2), G->name);
display.c:	      x = leftmargin + (G->inPosition + U->num) * Space;
display.c:		       G->num, U->num, l, NaNColor, G->num, U->num, l, 
display.c:		       G->num, U->num, l, P->group->num, P->num, 
display.c:	       "-font .link.font", leftmargin + (G->inPosition + U->num)
display.c:    if (G->inPosition != -1) {
display.c:    if (G->inPosition != -1) {
displayCom.c:      FOR_EACH_GROUP(G->showOutgoing = FALSE);
displayCom.c:      FOR_EACH_GROUP_IN_LIST(argv[arg], G->showOutgoing = TRUE);
displayCom.c:      FOR_EACH_GROUP(G->showIncoming = FALSE);
displayCom.c:      FOR_EACH_GROUP_IN_LIST(argv[arg], G->showIncoming = TRUE);
displayCom.c:    pre = (!G->numOutgoing) ? -1 : (G->showOutgoing) ? 1 : 0;
displayCom.c:    post = (!G->numIncoming) ? -1 : (G->showIncoming) ? 1 : 0;
displayCom.c:    append("{ \"%s\" %d %d %d } ", G->name, G->num, pre, post);
displayCom.c:    G->showIncoming = state;
displayCom.c:    G->showOutgoing = state;
displayCom.c:      G->showIncoming = on;
displayCom.c:      eval("set .link.post.%d %d", G->num, on);
displayCom.c:      G->showOutgoing = on;
displayCom.c:      eval("set .link.pre.%d %d", G->num, on);
example.c:  writeBinInt(channel, G->numUnits);
example.c:  writeBinFlag(channel, (G->type & OUTPUT) ? 1 : 0);
example.c:    if (G->type & OUTPUT)
example.c:  cprintf(channel, "%d %d\n", G->numUnits, (G->type & OUTPUT) ? 1 : 0);
example.c:    if (G->type & OUTPUT)
example.c:  FOR_EACH_GROUP(if (G->type & WRITE_OUTPUTS) groups++);
example.c:	if (G->type & WRITE_OUTPUTS) groupWriteBinaryValues(G, tick, channel);
example.c:	if (G->type & WRITE_OUTPUTS) groupWriteTextValues(G, tick, channel);
example.c:    if ((u = L->firstUnit) < 0 || u >= G->numUnits)
example.c:    if (u + L->numUnits > G->numUnits)
example.c:	G->unit[u].externalInput = L->val[i];
example.c:	G->unit[u].target = L->val[i];
example.c:      for (u = 0; u < G->numUnits; u++)
example.c:	*((real *) Obj((char *) (G->unit + u), offset)) = L->value;
example.c:	if ((u = L->unit[i]) < 0 || u >= G->numUnits)
example.c:			 "in group %s", u, G->name);
example.c:	if ((v = -L->unit[++i]) < u || v >= G->numUnits)
example.c:			 "range in group %s", v, G->name);
example.c:	  *((real *) Obj((char *) (G->unit + u), offset)) = L->value;
example.c:	if ((u = L->unit[i]) < 0 || u >= G->numUnits)
example.c:			 "in group %s", u, G->name);
example.c:	*((real *) Obj((char *) (G->unit + u), offset)) = L->value;
example.c:    if (G->type & EXT_INPUT_NOISE) {
example.c:	real range = chooseValue(G->noiseRange, Net->noiseRange);
example.c:	  U->externalInput = G->noiseProc(U->externalInput, range);
extension.c:  FREE(G->ext);
extension.c:  G->ext = safeCalloc(1, sizeof(struct groupExt), 
extension.c:     "initGroupExtension:G->ext");
extension.c:  G->ext->frontSide = 0;
extension.c:  G->ext->backSide = 0;
extension.c:  G->ext->maxOut     = 0.0 ;
extension.c:  G->ext->secondOut  = 0.0 ;
extension.c:  G->ext->thirdOut   = 0.0 ;
extension.c:  G->ext->maxOutSum     = 0.0 ;
extension.c:  G->ext->secondOutSum  = 0.0 ;
extension.c:  G->ext->thirdOutSum   = 0.0 ;
extension.c:  G->ext->maxOutNum  = -1 ;
extension.c:  G->ext->maxTargNum = -1 ;
extension.c:  G->ext->RT = -1 ;
extension.c:  FREE(G->ext);
extension.c:	  Unit U0 = G->unit ;
extension.c:	  Unit U0 = G->unit ;
extension.c:	  Unit U0 = G->unit ;
extension.c:	  Unit U0 = G->unit ;
extension.c:  G->ext->maxOut     = max->output ;
extension.c:  G->ext->secondOut  = second->output ;
extension.c:  G->ext->thirdOut   = third->output ;
extension.c:  G->ext->maxOutNum  = max->num ;
extension.c:  G->ext->maxTargNum = targ->num ;
extension.c:  G->ext->RT         = G->net->currentTick ;
extension.c:    G->ext->maxOutSum    = summedOutput(max) ;
extension.c:    G->ext->secondOutSum = summedOutput(second) ;
extension.c:    G->ext->thirdOutSum  = summedOutput(third) ;
extension.c:  G->groupCriterionReached = gapGroupCriterion;
extension.c:  G->groupCriterionReached = fixedGroupCriterion;
extension.c:  int lastTick = G->net->currentTick - 1 ;
extension.c:  G->groupCriterionReached = maxChangeGroupCriterion;
extension.c:  int lastTick = G->net->currentTick - 1 ;
extension.c:  if (sum / (float)G->numUnits < criterion)
extension.c:  G->groupCriterionReached = aveChangeGroupCriterion;
extension.c:  if (sum / (float)G->numUnits < criterion)
extension.c:  G->groupCriterionReached = aveSSEGroupCriterion;
extension.c:  if (sum / (float)G->numUnits > criterion)
extension.c:  G->groupCriterionReached = aveActGroupCriterion;
extension.c:  FOR_EACH_GROUP(if ((inFront && G->ext->frontSide)||(!inFront && !G->ext->frontSide)) {
extension.c:  FOR_EACH_GROUP( if ((inFront && G->ext->frontSide)||(!inFront && G->ext->backSide)) {
extension.c:    if( !(G->ext->frontSide && G->ext->backSide) ) {
extension.c:  FOR_EACH_GROUP_BACK(if ((inFront && G->ext->frontSide)||(!inFront && G->ext->backSide)) {
extension.c:    FOR_EACH_GROUP(if ((inFront && G->ext->frontSide)||(!inFront && G->ext->backSide)) {
extension.c:      if (G->type & ELMAN) {
extension.c:	for (P = G->outputProcs; P; P = P->next)
extension.c:      FOR_EACH_GROUP_IN_RANGE_BACK(lastSource, 0, if ((inFront && G->ext->frontSide)||(!inFront && G->ext->backSide)) {
extension.c:	if (wasReset && G->type & RESET_ON_EXAMPLE) {
extension.c:      FOR_EACH_GROUP_IN_RANGE_BACK(lastSource, 0, if ((inFront && G->ext->frontSide)||(!inFront && G->ext->backSide)) {
extension.c:    FOR_EACH_GROUP_IN_RANGE(0, lastSource, if ((inFront && G->ext->frontSide)||(!inFront && G->ext->backSide)) {
extension.c:  FOR_EACH_GROUP( if ((inFront && G->ext->frontSide)||(!inFront && G->ext->backSide)) {
extension.c:    if( G->ext->frontSide && G->ext->backSide ) {
extension.c:  FOR_EACH_GROUP_BACK(if ((inFront && G->ext->frontSide)||(!inFront && G->ext->backSide)) {
extension.c:  FOR_EACH_GROUP( if ( G->ext->frontSide && G->ext->backSide ) { injectOutputDerivCache(G); } );
extension.c:    FOR_EACH_GROUP(if ((inFront && G->ext->frontSide)||(!inFront && G->ext->backSide)) {
extension.c:      if (G->type & ELMAN) {
extension.c:	for (P = G->outputProcs; P; P = P->next)
extension.c:      FOR_EACH_GROUP_IN_RANGE_BACK(lastSource, 0, if ((inFront && G->ext->frontSide)||(!inFront && G->ext->backSide)) {
extension.c:	if (wasReset && G->type & RESET_ON_EXAMPLE) {
extension.c:      FOR_EACH_GROUP_IN_RANGE_BACK(lastSource, 0, if ((inFront && G->ext->frontSide)||(!inFront && G->ext->backSide)) {
extension.c:    FOR_EACH_GROUP_IN_RANGE(0, lastSource, if ((inFront && G->ext->frontSide)||(!inFront && G->ext->backSide)) {
extension.OLD.c:  FREE(G->ext);
extension.OLD.c:  G->ext = safeCalloc(1, sizeof(struct groupExt), 
extension.OLD.c:     "initGroupExtension:G->ext");
extension.OLD.c:  G->ext->frontSide = 0;
extension.OLD.c:  G->ext->backSide = 0;
extension.OLD.c:  G->ext->maxOut     = 0.0 ;
extension.OLD.c:  G->ext->secondOut  = 0.0 ;
extension.OLD.c:  G->ext->thirdOut   = 0.0 ;
extension.OLD.c:  G->ext->maxOutSum     = 0.0 ;
extension.OLD.c:  G->ext->secondOutSum  = 0.0 ;
extension.OLD.c:  G->ext->thirdOutSum   = 0.0 ;
extension.OLD.c:  G->ext->maxOutNum  = -1 ;
extension.OLD.c:  G->ext->maxTargNum = -1 ;
extension.OLD.c:  G->ext->RT = -1 ;
extension.OLD.c:  FREE(G->ext);
extension.OLD.c:	  Unit U0 = G->unit ;
extension.OLD.c:	  Unit U0 = G->unit ;
extension.OLD.c:	  Unit U0 = G->unit ;
extension.OLD.c:	  Unit U0 = G->unit ;
extension.OLD.c:  G->ext->maxOut     = max->output ;
extension.OLD.c:  G->ext->secondOut  = second->output ;
extension.OLD.c:  G->ext->thirdOut   = third->output ;
extension.OLD.c:  G->ext->maxOutNum  = max->num ;
extension.OLD.c:  G->ext->maxTargNum = targ->num ;
extension.OLD.c:  G->ext->RT         = G->net->currentTick ;
extension.OLD.c:    G->ext->maxOutSum    = summedOutput(max) ;
extension.OLD.c:    G->ext->secondOutSum = summedOutput(second) ;
extension.OLD.c:    G->ext->thirdOutSum  = summedOutput(third) ;
extension.OLD.c:  G->groupCriterionReached = gapGroupCriterion;
extension.OLD.c:  G->groupCriterionReached = fixedGroupCriterion;
extension.OLD.c:  int lastTick = G->net->currentTick - 1 ;
extension.OLD.c:  G->groupCriterionReached = maxChangeGroupCriterion;
extension.OLD.c:  int lastTick = G->net->currentTick - 1 ;
extension.OLD.c:  if (sum / (float)G->numUnits < criterion)
extension.OLD.c:  G->groupCriterionReached = aveChangeGroupCriterion;
extension.OLD.c:#define SHARED(G)    (G->ext->frontSide &&  G->ext->backSide)
extension.OLD.c:#define FRONTONLY(G) (G->ext->frontSide && !G->ext->backSide)
extension.OLD.c:#define BACKONLY(G)  (G->ext->backSide  && !G->ext->frontSide)
extension.OLD.c:    printf("%9s[%2s]:", G->name, tag) ;
extension.OLD.c:      if ((inFront && G->ext->frontSide) || (!inFront && BACKONLY(G))) {
extension.OLD.c:	if (!SHARED(G) && (G->ext->frontSide||G->ext->backSide)) {
extension.OLD.c:	  if (G->type & OUTPUT) {
extension.OLD.c:      } else if (G->ext->backSide) { // backSide only
extension.OLD.c:	if (G->ext->frontSide||G->ext->backSide) {
extension.OLD.c:	  if (G->type & OUTPUT) {
extension.OLD.c:      if (G->type & ELMAN) {
extension.OLD.c:	for (P = G->outputProcs; P; P = P->next)
extension.OLD.c:	if (wasReset && G->type & RESET_ON_EXAMPLE) {
extension.OLD.c:      if (G->ext->frontSide) {
extension.OLD.c:  FOR_EACH_GROUP_BACK(if (G->ext->frontSide) {
extension.OLD.c:    FOR_EACH_GROUP(if (G->ext->frontSide) {
extension.OLD.c:      if (G->type & ELMAN) {
extension.OLD.c:	for (P = G->outputProcs; P; P = P->next)
extension.OLD.c:      FOR_EACH_GROUP_IN_RANGE_BACK(lastSource, 0, if (G->ext->frontSide) {
extension.OLD.c:	if (wasReset && G->type & RESET_ON_EXAMPLE) {
extension.OLD.c:      FOR_EACH_GROUP_IN_RANGE_BACK(lastSource, 0, if (G->ext->frontSide) {
extension.OLD.c:    FOR_EACH_GROUP_IN_RANGE(0, lastSource, if (G->ext->frontSide) {
extension.OLD.c://    if(G->ext->backSide && Net->currentTick>0) {
extension.OLD.c:  FOR_EACH_GROUP(if (G->type & RESET_ON_EXAMPLE) resetGroup(G)) ;
graph.c:  if (t < G->numTraces && G->trace[t])
graph.c:    return G->trace[t];
graph.c:  for (t = 0; t < G->numTraces && G->trace[t]; t++);
graph.c:  if (t >= G->numTraces) {
graph.c:    int n = imax(t + 2, 2 * G->numTraces);
graph.c:    G->trace = safeRealloc(G->trace, n * sizeof(Trace), "G->trace");
graph.c:    memset(G->trace + G->numTraces, 0, (n - G->numTraces) * sizeof(Trace));
graph.c:    G->numTraces = n;
graph.c:  G->trace[t] = T;
graph.c:  G->tracesChanged = TRUE;
graph.c:  G->num      = g;
graph.c:  G->updateOn = ON_REPORT;
graph.c:  G->updateEvery = 1;
graph.c:  G->width    = 0;
graph.c:  G->height   = 0;
graph.c:  G->cols     = DEF_GR_columns;
graph.c:  G->max = G->min = 0.0;
graph.c:  G->fixMax   = FALSE;
graph.c:  G->fixMin   = TRUE;
graph.c:  G->maxVal   = -LARGE_VAL;
graph.c:  G->minVal   = LARGE_VAL;
graph.c:  G->scaleY   = 0;
graph.c:  G->clearOnReset = FALSE;
graph.c:  G->storeOnReset = TRUE;
graph.c:  G->maxX     = 0;
graph.c:  G->hidden   = TRUE;
graph.c:  if (!G->hidden || Batch) return TCL_OK;
graph.c:  G->hidden = FALSE;
graph.c:  G->needsRedraw = FALSE;
graph.c:  G->needsPropRefresh = FALSE;
graph.c:  eval(".drawGraph %d", G->num);
graph.c:  sprintf(var, ".graphPropUp_%d", G->num);
graph.c:  Tcl_LinkVar(Interp, var, (char *) &(G->propertiesUp), TCL_LINK_INT);
graph.c:  if (G->hidden) return TCL_OK;
graph.c:  G->hidden = TRUE;
graph.c:  G->needsRedraw = FALSE;
graph.c:  G->needsPropRefresh = FALSE;
graph.c:  eval("destroy .graph%d", G->num);
graph.c:  eval("destroy .grProp%d", G->num);
graph.c:  eval("destroy .graphPropUp_%d", G->num);
graph.c:  G->trace[T->num] = NULL;
graph.c:  G->tracesChanged = TRUE;
graph.c:  Root->graph[G->num] = NULL;
graph.c:  /* FREE(G->title); */
graph.c:  FREE(G->trace);
graph.c:  G->x = G->maxX = 0;
graph.c:  G->x = 0;
graph.c:  if (!G->hidden) eval(".graph%d.g xview moveto 0", G->num);
graph.c:    if (G->clearOnReset) clearGraph(G);
graph.c:    else if (G->storeOnReset) storeGraph(G);
graph.c:  if (x > G->maxX) G->maxX = x;
graph.c:  if ((!G->fixMax && v > G->maxVal) || (!G->fixMin && v < G->minVal))
graph.c:  int g = G->num, xMax;
graph.c:  if (G->hidden) return;
graph.c:  if (G->maxX == 0) {
graph.c:    v = (real) G->x / G->maxX;
graph.c:    a = (real) (G->x - 2 * G->updateEvery) / G->maxX;
graph.c:    b = (real) (G->x + G->updateEvery) / G->maxX;
graph.c:  xMax = (int) (G->maxX * G->scaleX + 2);
graph.c:  if (xMax < G->width - 2) xMax = G->width;
graph.c:  eval(".graph%d.g configure -scrollregion {0 0 %d %d}", g, xMax, G->height);
graph.c:  if ((G->x % G->updateEvery) == 0)
graph.c:    for (t = G->numTraces - 1; t >= 0; t--)
graph.c:      if ((T = G->trace[t]) && T->active) updateTrace(T, G->x);
graph.c:  G->x++;
graph.c:  if (++G->updatesSinceRedraw >= 100) drawLater(G);
graph.c:  FOR_EACH_GRAPH(if (G->updateOn & update) updateGraph(G););
graph.c:  if (!G->needsRedraw && !G->hidden) {
graph.c:    G->needsRedraw = TRUE;
graph.c:    Tcl_DoWhenIdle((Tcl_IdleProc *) drawNow, (ClientData) G->num);
graph.c:  if (G->hidden) return;
graph.c:  sprintf(buf, ".graph%d.g create line", G->num);
graph.c:    int y = G->height - Y_MARGIN - (int) ((T->val[i].y - G->min) * G->scaleY);
graph.c:    sprintf(buf, " %d %d", (int) (T->val[i].x * G->scaleX) + 1, y);
graph.c:  int t, i, g = G->num, xint;
graph.c:  if (!G->needsRedraw || G->hidden) return TCL_OK;
graph.c:  G->needsRedraw = FALSE;
graph.c:  G->updatesSinceRedraw = 0;
graph.c:  if (!G->fixMax || !G->fixMin) {
graph.c:    G->maxVal = -LARGE_VAL;
graph.c:    G->minVal =  LARGE_VAL;
graph.c:          if (T->val[i].y > G->maxVal) G->maxVal = T->val[i].y;
graph.c:          if (T->val[i].y < G->minVal) G->minVal = T->val[i].y;
graph.c:    if (!G->fixMax) G->max = G->maxVal;
graph.c:    if (!G->fixMin) G->min = G->minVal;
graph.c:    if (G->max < G->min) G->max = G->min = 0;
graph.c:  G->scaleX = (G->cols > 0) ? (real) (G->width - 2) / G->cols : 0.0;
graph.c:  G->scaleY = (G->max > G->min) ? (real) (G->height - Y_MARGIN) / 
graph.c:    (G->max - G->min) : 0.0;
graph.c:       g, g, G->cols);
graph.c:       g, g, G->max);
graph.c:       g, g, G->min);
graph.c:       g, G->height - Y_MARGIN);
graph.c:      g, G->height - Y_MARGIN, G->height - Y_MARGIN);*/
graph.c:  xint = (int) nearestInterval((real) G->cols / 3.0);
graph.c:  for (i = 1; i * xint < G->maxX * 2 || i < 10; i++) {
graph.c:    int x = (int) (((real) i - 0.5) * xint * G->scaleX);
graph.c:	 x, (int) (G->height - Y_MARGIN),
graph.c:	 x, (int) (G->height - Y_MARGIN + 5));
graph.c:    x = (int) (i * xint * G->scaleX);
graph.c:	 x, (int) (G->height - Y_MARGIN),
graph.c:	 x, (int) (G->height - Y_MARGIN + 5));
graph.c:	 x, (int) (G->height - Y_MARGIN + 6), (int) (xint * i));
graph.c:  yint = nearestInterval((G->max - G->min) / 2.5);
graph.c:  i = (int) (ceil(G->min / yint));
graph.c:    while (yint * ((real) i - 0.5) < G->max) {
graph.c:      if (((real) i - 0.5) * yint >= G->min) {
graph.c:        y = G->height - Y_MARGIN - (int) ((((real) i - 0.5) * yint - G->min)
graph.c:					* G->scaleY);
graph.c:      y = G->height - Y_MARGIN - (int) ((i * yint - G->min) * G->scaleY);
graph.c:  for (t = G->numTraces - 1; t >= 0; t--)
graph.c:    if ((T = G->trace[t]))
graph.c:  if (G->hidden) return TCL_OK;
graph.c:  if (eval(".deleteTraceProps %d", G->num)) return TCL_ERROR;
graph.c:    if (eval(".drawTraceProps %d %d", G->num, t)) return TCL_ERROR;
graph.c:  G->tracesChanged = FALSE;
graph.c:  if (G->hidden) return TCL_OK;
graph.c:    if (eval(".refreshTraceProps %d %d", G->num, t)) return TCL_ERROR;
graph.c:  if (G->hidden) return TCL_OK;
graph.c:  G->needsPropRefresh = FALSE;
graph.c:  eval(".refreshGraphProps %d", G->num);
graph.c:  if (G->tracesChanged) return drawTraceProps(G);
graph.c:  if (!G->needsPropRefresh || !G->propertiesUp) return TCL_OK;
graph.c:  if (G->hidden) return TCL_OK;
graph.c:  if (G->propertiesUp && !G->needsPropRefresh) {
graph.c:    G->needsPropRefresh = TRUE;
graph.c:    Tcl_DoWhenIdle((Tcl_IdleProc *) refreshPropsNow, (ClientData) G->num);
graphCom.c:    return result("%d", G->num);
graphCom.c:        sprintf(gname, "%d ", G->num);
graphCom.c:        if (G->updateOn) updateGraph(G);
graphCom.c:  G->updateOn = updates;
graphCom.c:  return result("%d", G->num);
graphCom.c:  if (h == G->height && w == G->width) return TCL_OK;
graphCom.c:  G->height = h;
graphCom.c:  G->width = w;
network.c:  int len = strlen(G->name);
network.c:  if (!strncmp(G->name, name, len) && name[len] == ':') {
network.c:    if (u >= 0 && u < G->numUnits && !strcmp(G->unit[u].name, name))
network.c:      return G->unit + u;
network.c:  if (u < 0 || u >= G->numUnits) return NULL;
network.c:  return G->unit + u;
network.c:  FOR_EACH_GROUP(if (!strcmp(G->name, name)) return G);
network.c:    FREE(G->name);
network.c:    for (P = G->inputProcs;  P; P = Q) {Q = P->next; freeGroupProc(P);}
network.c:    for (P = G->outputProcs; P; P = Q) {Q = P->next; freeGroupProc(P);}
network.c:    for (P = G->costProcs;   P; P = Q) {Q = P->next; freeGroupProc(P);}
network.c:  if (!(G->net->type & OPTIMIZED)) {
network.c:    FREE(G->output);
network.c:    FREE(G->unit);
network.c:   else in the network.  It starts counting at G->numUnits for speed which 
network.c:  int n = G->numUnits;
network.c:  do sprintf(name->s, "%s:%d", G->name, n++);
network.c:      (G->costType & ERROR_MASKS || G->type & USE_TARGET_HIST))
network.c:      (G->costType || G->type & USE_OUT_DERIV_HIST))
network.c:  U->gain          = chooseValue(G->gain, Net->gain);
network.c:  if ((G->type & BIASED) && (bias = lookupGroup(BIAS_NAME)))
network.c:  return eval("catch {.initUnit group(%d).unit(%d)}", G->num, U->num);
network.c:  FOR_EACH_GROUP(if (G->type & OUTPUT) FOR_EVERY_UNIT(G, Net->output[i++] = U));
network.c:  FOR_EACH_GROUP(if (G->type & INPUT) FOR_EVERY_UNIT(G, Net->input[i++] = U));
network.c:    appendGroupProc(&G->inputProcs, &G->inputType, class, type);
network.c:    appendGroupProc(&G->outputProcs, &G->outputType, class, type);
network.c:    appendGroupProc(&G->costProcs, &G->costType, class, type);
network.c:    prependGroupProc(&G->inputProcs, &G->inputType, class, type);
network.c:    prependGroupProc(&G->outputProcs, &G->outputType, class, type);
network.c:    prependGroupProc(&G->costProcs, &G->costType, class, type);
network.c:    removeGroupProc(&(G->inputProcs), type);
network.c:    removeGroupProc(&(G->outputProcs), type);
network.c:    removeGroupProc(&(G->costProcs), type);
network.c:    if (!(G->type & OUTPUT))   changeNumOutputs(-G->numUnits);
network.c:  } else if (G->type & OUTPUT) changeNumOutputs(G->numUnits);
network.c:    if (!(G->type & INPUT))    changeNumInputs(-G->numUnits);
network.c:  } else if (G->type & INPUT)  changeNumInputs(G->numUnits);
network.c:      if (class == GROUP) G->type |= type;
network.c:      if (class == GROUP) G->type &= ~type;
network.c:  flag wasOutput = G->type & OUTPUT, wasInput  = G->type & INPUT;
network.c:  G->type = G->type & FROZEN;
network.c:  while (G->inputProcs) 
network.c:    removeGroupProc(&G->inputProcs, G->inputProcs->type);
network.c:  while (G->outputProcs) 
network.c:    removeGroupProc(&G->outputProcs, G->outputProcs->type);
network.c:  while (G->costProcs) 
network.c:    removeGroupProc(&G->costProcs, G->costProcs->type);
network.c:  G->inputType = G->outputType = G->costType = 0;
network.c:  G->name = copyString(name);
network.c:  G->num = Net->numGroups - 1;
network.c:  G->net = Net;
network.c:  G->trainGroupCrit     = DEF_G_trainGroupCrit;
network.c:  G->testGroupCrit      = DEF_G_testGroupCrit;
network.c:  G->learningRate       = DEF_G_learningRate;
network.c:  G->momentum           = DEF_G_momentum;
network.c:  G->weightDecay        = DEF_G_weightDecay;
network.c:  G->weightEliminationW0= DEF_G_weightEliminationW0;
network.c:  G->gainDecay          = DEF_G_gainDecay;
network.c:  G->outputCostScale    = DEF_G_outputCostScale;
network.c:  G->outputCostPeak     = DEF_G_outputCostPeak;
network.c:  G->targetRadius       = DEF_G_targetRadius;
network.c:  G->targetOneRadius    = DEF_G_targetRadius;
network.c:  G->targetZeroScaling  = DEF_G_targetZeroScaling;
network.c:  G->zeroErrorRadius    = DEF_G_zeroErrorRadius;
network.c:  G->errorScale         = DEF_G_errorScale;
network.c:  G->graceTick		= -1 ;
network.c:  G->actDecay		= 0.0 ;
network.c:  G->actRest		= 0.0 ;
network.c:  G->actDecayTime	= 0.0 ;
network.c:  G->decayConstant      = 0.0 ;
network.c:  G->decayNoiseRange	= 0.0 ;	
network.c:  G->invSquareTuning 	= 0.0 ;
network.c:  G->elbowPoint		= 0.5 ;
network.c:  G->elbowLowerSlope	= 1.0 ;
network.c:  G->elbowUpperSlope	= 2.0 ;
network.c:  G->maxTick		= 1.0 ;
network.c:  G->IPSPthreshold	= .5  ;
network.c:  G->dtScale            = DEF_G_dtScale;
network.c:  G->gain               = DEF_G_gain;
network.c:  G->ternaryShift       = DEF_G_ternaryShift;
network.c:  G->clampStrength      = DEF_G_clampStrength;
network.c:  G->initOutput         = (*type&BIAS ? 1.0 : DEF_G_initOutput) ;
network.c:  G->outputGain		    = NaN ;
network.c:  G->noZeroInputNoise	    = 0 ;
network.c:  G->applyNoiseOnce	    = 0 ;
network.c:  G->integratedOutputTau    = NaN ;
network.c:  G->integratedOutputDecay  = NaN ;
network.c:  G->initOutputRange       = DEF_G_initOutputRange;
network.c:  G->initInput          = DEF_G_initInput;
network.c:  G->randMean           = DEF_G_randMean;
network.c:  G->randRange          = DEF_G_randRange;
network.c:  G->noiseRange         = DEF_G_noiseRange;
network.c:  G->noiseProc          = DEF_G_noiseProc;
network.c:  G->dropoutProb        = DEF_G_dropoutProb;
network.c:  G->showIncoming       = DEF_G_showIncoming;
network.c:  G->showOutgoing       = DEF_G_showOutgoing;
network.c:  G->inPosition = G->outPosition = 0;
network.c:  G->numColumns         = DEF_G_numColumns;
network.c:  G->k			= DEF_G_k;
network.c:  G->mismatchCriterion  = DEF_G_mismatchCriterion;
network.c:  G->mismatchPenalty	= DEF_G_mismatchPenalty;
network.c:  G->neighborhood       = DEF_G_neighborhood;
network.c:  G->periodicBoundary   = DEF_G_periodicBoundary;
network.c:  G->numUnits = numUnits;
network.c:  G->unit = safeCalloc(numUnits, sizeof(struct unit), "addGroup:G->unit");
network.c:  G->output = realArray(2 * numUnits, "addGroup:G->output");
network.c:  G->outputDeriv = G->output + numUnits;
network.c:    sprintf(Buffer, "%s:%d", G->name, u); 
network.c:  return eval("catch {.initGroup group(%d)}", G->num);
network.c:    if (G->num < g)
network.c:    if (G->num != g) {
network.c:      Net->group[g] = Net->group[G->num];
network.c:      Net->group[G->num] = temp;
network.c:      temp->num = G->num;
network.c:      G->num = g;
network.c:  Net->numUnits -= G->numUnits;
network.c:  if (G->type & OUTPUT) changeNumOutputs(-G->numUnits);
network.c:  if (G->type & INPUT)  changeNumInputs(-G->numUnits);
network.c:  if (G->num != Net->numGroups) {
network.c:    memmove(Net->group + G->num, Net->group + G->num + 1, 
network.c:	    (Net->numGroups - G->num) * sizeof(Group));
network.c:    for (g = G->num; g < Net->numGroups; g++)
network.c:  for (i = 0; i < G->numUnits; i++)
network.c:    *(real *) ((char *) (G->unit + i) + offset) = value;
network.c:    G->error = 0.0;
network.c:  G->output[U->num] = G->outputDeriv[U->num] = 0;
network.c:  G->type |= LESIONED;
network.c:	strcat(format, "d"); sprintf(Buffer, format, G->num); break;
network.c:	strcat(format, "s"); sprintf(Buffer, format, G->name); break;
network.c:  size += 2 * G->numUnits * sizeof(real);
network.c:  size += G->numUnits * sizeof(struct unit);
network.c:  G->net  = New;
network.c:  G->unit = duplicate(G->unit, G->numUnits * sizeof(struct unit), 1);
network.c:  for (P = G->inputProcs;  P; P = P->next) P->group = G;
network.c:  for (P = G->outputProcs; P; P = P->next) {
network.c:  for (P = G->costProcs;   P; P = P->next) P->group = G;
network.c:  G->output = duplicate(G->output, 2 * G->numUnits * sizeof(real), 1);
network.c:  G->outputDeriv = G->output + G->numUnits;
network.c:  Network N = G->net;
networkCom.c:    wasOutput = G->type & OUTPUT; wasInput = G->type & INPUT;
networkCom.c:    FOR_EACH_GROUP_BACK(if (!(G->type & BIAS) && deleteGroup(G)) 
networkCom.c:	value = chooseValue(G->initInput, Net->initInput);
networkCom.c:	value = chooseValue(G->initOutput, Net->initOutput);
networkCom.c:      if (eval("%s group(%d) group(%d).unit(%d)", argv[2], G->num, G->num, 
networkCom.c:      G->polaritySum = 0.0;
networkCom.c:      G->polarityNum = 0;
networkCom.c:      scale = 1.0 / (G->maxOutput - G->minOutput);
networkCom.c:        real x = (U->output - G->minOutput) * scale;
networkCom.c:        G->polaritySum += d;
networkCom.c:        G->polarityNum++;
networkCom.c:      sprintf(data, "{\"%s\" %g} ", G->name, (G->polarityNum > 0) ?
networkCom.c:              G->polaritySum / G->polarityNum : 0);
object.c:  if (G && G->name)
object.c:    sprintf(dest, "%s", G->name);
object.c:  if (G) sprintf(dest, "Graph %d", G->num);
objectCom.c:    return result("group(%d)", G->num);
objectCom.c:  return result("group(%d)", G->num);
train.c:  real gainDecay = chooseValue(G->gainDecay, Net->gainDecay);
train.c:  FOR_EACH_GROUP({if (G->type & FROZEN) continue;
trainCom.c:  U = G->unit;
type.c:    if ((G->type & (1 << i)) && (init = getTypeData((1 << i), GROUP)))
type.c:  for (P = G->inputProcs; P; P = P->next) {
type.c:  for (P = G->outputProcs; P; P = P->next) {
type.c:  for (P = G->costProcs; P; P = P->next) {
type.c:  printTypes("Base Type", GROUP, G->type & FIXED_MASKS);
type.c:  if (G->inputProcs) {
type.c:    for (P = G->inputProcs; P; P = P->next) {
type.c:  if (G->outputProcs) {
type.c:    for (P = G->outputProcs; P; P = P->next) {
type.c:  if (G->costProcs) {
type.c:    for (P = G->costProcs; P; P = P->next) {
type.c:  printTypes("Group Criterion Type", GROUP, G->type & CRITERION_MASKS);
type.c:  printTypes("History Types", GROUP, G->type & USE_HIST_MASKS);
type.c:  printTypes("Other Types", GROUP, G->type &
type.c:  for (P = G->outputProcs; P; P = P->next) {
type.c:	init = 1.0 / G->numUnits;
type.c:      (G->outputType & (CLAMPING_OUTPUT_TYPES & ~ELMAN_CLAMP))) {
type.c:  G->minOutput = min;
type.c:  G->maxOutput = max;
type.c:  if (!isNaN(G->initOutput)) G->initOutput = init;
type.c:  if (G->type & BIAS)
type.c:    SET_TYPE(G->type, BIAS, FIXED_MASKS | CRITERION_MASKS);
type.c:  special = (G->type & (INPUT | ELMAN | BIAS) && !(G->type & OUTPUT));
type.c:  if (!special && !(G->inputType & MAX_POOLING)) G->type |= BIASED;
type.c:    if (DEF_G_continuousReset) G->type |= RESET_ON_EXAMPLE;
type.c:  } else if (DEF_G_standardReset) G->type |= RESET_ON_EXAMPLE;
type.c:     G->type = selectFirstType(G->type, CRITERION_MASKS);
type.c:  G->type |= STANDARD_CRIT;
type.c:  if (G->type & OUTPUT) G->type |= WRITE_OUTPUTS;
type.c:  G->inputType = 0;
type.c:  for (P = G->inputProcs; P; P = P->next)
type.c:    G->inputType |= P->type;
type.c:  G->outputType = 0;
type.c:  for (P = G->outputProcs; P; P = P->next)
type.c:    G->outputType |= P->type;
type.c:  G->costType = 0;
type.c:  for (P = G->costProcs; P; P = P->next)
type.c:    G->costType |= P->type;
type.c:  if (!(G->inputType & BASIC_INPUT_TYPES) && !special) {
type.c:    else if (G->outputType & KWTA)
type.c:  if (!(G->outputType & (BASIC_OUTPUT_TYPES | CLAMPING_OUTPUT_TYPES))) {
type.c:    if (special && (G->type & BIAS))
type.c:    else if (special && (G->type & INPUT) && !(G->inputType & SOFT_CLAMP))
type.c:    else if (special && (G->type & ELMAN))
type.c:    else if (G->inputType & MAX_POOLING)
type.c:      (!special || ((G->type & INPUT) && !(G->outputType & HARD_CLAMP))) && 
type.c:      !(G->inputType & IN_INTEGR_TYPES) && !(G->outputType & OUT_INTEGR_TYPES))
type.c:  if (!(G->costType & ERROR_MASKS) && (G->type & OUTPUT) && 
type.c:      !(G->outputType & (KOHONEN))) {
type.c:    if (G->outputType & SOFT_MAX)
type.c:    else if (G->outputType & LINEAR)
type.c:    else if (G->outputType & ELBOW)
type.c:    else if (G->outputType & RELU)
type.c:  if ((Net->type & CONTINUOUS) && (G->type & OUTPUT) && 
type.c:      !(G->type & CRITERION_MASKS))
type.c:    G->type |= STANDARD_CRIT;
