/Home/aooliver/hepsoft/lcdroot/LCDRootApps/PhUtil/src/LCDNNHFSelectOneProngGhostZpole.c File Reference

#include <math.h>

Go to the source code of this file.

Classes

struct  UT

Defines

#define Act_Logistic(sum, bias)   ( (sum+bias<10000.0) ? ( 1.0/(1.0 + exp(-sum-bias) ) ) : 0.0 )
#define NULL   (void *)0

Typedefs

typedef UT UnitType
typedef UTpUnit

Functions

int LCDNNHFSelectOneProngGhostZpole (float *in, float *out, int init)

Variables

static UnitType Units [14]
static pUnit Sources []
static float Weights []
static UnitType Units [14]


Define Documentation

#define Act_Logistic sum,
bias   )     ( (sum+bias<10000.0) ? ( 1.0/(1.0 + exp(-sum-bias) ) ) : 0.0 )
 

Definition at line 10 of file LCDNNHFSelectOneProngGhostZpole.c.

#define NULL   (void *)0
 

Definition at line 12 of file LCDNNHFSelectOneProngGhostZpole.c.


Typedef Documentation

typedef struct UT * pUnit
 

typedef struct UT UnitType
 


Function Documentation

int LCDNNHFSelectOneProngGhostZpole float *  in,
float *  out,
int  init
 

Definition at line 125 of file LCDNNHFSelectOneProngGhostZpole.c.

References UT::act, and Units.

00126 {
00127   int member, source;
00128   float sum;
00129   enum{OK, Error, Not_Valid};
00130   pUnit unit;
00131 
00132 
00133   /* layer definition section (names & member units) */
00134 
00135   static pUnit Input[5] = {Units + 1, Units + 2, Units + 3, Units + 4, Units + 5}; /* members */
00136 
00137   static pUnit Hidden1[6] = {Units + 6, Units + 7, Units + 8, Units + 9, Units + 10, Units + 11}; /* members */
00138 
00139   static pUnit Output1[2] = {Units + 12, Units + 13}; /* members */
00140 
00141   static int Output[2] = {12, 13};
00142 
00143   for(member = 0; member < 5; member++) {
00144     Input[member]->act = in[member];
00145   }
00146 
00147   for (member = 0; member < 6; member++) {
00148     unit = Hidden1[member];
00149     sum = 0.0;
00150     for (source = 0; source < unit->NoOfSources; source++) {
00151       sum += unit->sources[source]->act
00152              * unit->weights[source];
00153     }
00154     unit->act = Act_Logistic(sum, unit->Bias);
00155   };
00156 
00157   for (member = 0; member < 2; member++) {
00158     unit = Output1[member];
00159     sum = 0.0;
00160     for (source = 0; source < unit->NoOfSources; source++) {
00161       sum += unit->sources[source]->act
00162              * unit->weights[source];
00163     }
00164     unit->act = Act_Logistic(sum, unit->Bias);
00165   };
00166 
00167   for(member = 0; member < 2; member++) {
00168     out[member] = Units[Output[member]].act;
00169   }
00170 
00171   return(OK);
00172 }


Variable Documentation

pUnit Sources[] [static]
 

Initial value:

  {
Units + 1, Units + 2, Units + 3, Units + 4, Units + 5, 
Units + 1, Units + 2, Units + 3, Units + 4, Units + 5, 
Units + 1, Units + 2, Units + 3, Units + 4, Units + 5, 
Units + 1, Units + 2, Units + 3, Units + 4, Units + 5, 
Units + 1, Units + 2, Units + 3, Units + 4, Units + 5, 
Units + 1, Units + 2, Units + 3, Units + 4, Units + 5, 
Units + 6, Units + 7, Units + 8, Units + 9, Units + 10, Units + 11, 
Units + 6, Units + 7, Units + 8, Units + 9, Units + 10, Units + 11, 

  }

Definition at line 26 of file LCDNNHFSelectOneProngGhostZpole.c.

UnitType Units[14] [static]
 

Definition at line 52 of file LCDNNHFSelectOneProngGhostZpole.c.

UnitType Units[14] [static]
 

Definition at line 24 of file LCDNNHFSelectOneProngGhostZpole.c.

float Weights[] [static]
 

Initial value:

  {
-6.261400, 5.287470, 19.333639, -10.045840, -2.607960, 
-5.625460, 1.221120, 7.125640, -7.765170, -11.557370, 
-24.978720, 6.799010, 23.034220, -28.224720, -1.916180, 
-0.991310, -6.426360, -40.838009, -0.573490, -0.079970, 
4.804940, -1.267260, -13.772060, 4.390400, -0.249890, 
4.236590, -7.014590, -6.124230, -17.582581, 6.818620, 
-1.298830, -6.547730, -2.690760, -4.488850, -3.294750, 0.688090, 
-4.177030, -4.728670, 2.762380, -19.176821, 3.950630, -0.484780, 

  }

Definition at line 39 of file LCDNNHFSelectOneProngGhostZpole.c.


Generated on Tue Jul 18 18:34:05 2006 for LCDROOT by  doxygen 1.4.6