/Home/aooliver/hepsoft/lcdroot/LCDRootApps/PhUtil/src/LCDNNHFSelectOneProngGhostZH.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 LCDNNHFSelectOneProngGhostZH (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 LCDNNHFSelectOneProngGhostZH.c.

#define NULL   (void *)0
 

Definition at line 12 of file LCDNNHFSelectOneProngGhostZH.c.


Typedef Documentation

typedef struct UT * pUnit
 

typedef struct UT UnitType
 


Function Documentation

int LCDNNHFSelectOneProngGhostZH float *  in,
float *  out,
int  init
 

Definition at line 125 of file LCDNNHFSelectOneProngGhostZH.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 LCDNNHFSelectOneProngGhostZH.c.

UnitType Units[14] [static]
 

Definition at line 52 of file LCDNNHFSelectOneProngGhostZH.c.

UnitType Units[14] [static]
 

Definition at line 24 of file LCDNNHFSelectOneProngGhostZH.c.

float Weights[] [static]
 

Initial value:

  {
6.795080, 36.615761, -38.710850, 11.104960, -1.342090, 
-2.561920, 10.766250, 11.876540, -4.658730, -3.258800, 
-10.470490, 6.696490, 12.796300, -8.132660, 37.982201, 
-36.927010, 26.769621, 4.696060, -35.883621, -1.331190, 
-1.814090, -10.446790, -52.487320, -1.633120, -1.313840, 
-4.088760, 2.603680, -16.130280, -5.030680, -0.511690, 
0.874110, -2.418170, 1.527290, -1.497610, -3.742840, -1.930660, 
-1.060450, -1.356060, -1.438570, 1.634410, -21.754440, 2.132080, 

  }

Definition at line 39 of file LCDNNHFSelectOneProngGhostZH.c.


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