/Home/aooliver/hepsoft/lcdroot/LCDRootApps/PhUtil/src/LCDNNTrackAttachGhostZpole.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 LCDNNTrackAttachGhostZpole (float *in, float *out, int init)

Variables

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


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 LCDNNTrackAttachGhostZpole.c.

#define NULL   (void *)0
 

Definition at line 12 of file LCDNNTrackAttachGhostZpole.c.


Typedef Documentation

typedef struct UT * pUnit
 

typedef struct UT UnitType
 


Function Documentation

int LCDNNTrackAttachGhostZpole float *  in,
float *  out,
int  init
 

Definition at line 118 of file LCDNNTrackAttachGhostZpole.c.

References UT::act, and Units.

Referenced by LCDVToplGhost::GetNNoutputTrackAttach().

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


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, 

  }

Definition at line 26 of file LCDNNTrackAttachGhostZpole.c.

UnitType Units[13] [static]
 

Definition at line 50 of file LCDNNTrackAttachGhostZpole.c.

UnitType Units[13] [static]
 

Definition at line 24 of file LCDNNTrackAttachGhostZpole.c.

float Weights[] [static]
 

Initial value:

  {
-25.288549, -4.046800, 5.016060, 0.513620, 0.626160, 
2.070870, -0.100070, 2.819970, 25.874180, -4.198960, 
7.204980, 6.118720, -0.542130, 0.093370, 5.098960, 
-4.418000, 2.607140, 7.771570, -2.675650, 18.379610, 
-9.906980, 6.152710, 2.138680, -0.293120, 36.910759, 
8.016760, -2.452140, -6.188510, -11.696310, -6.958790, 
-4.582510, -3.758210, -8.969600, 2.015460, 7.999760, -1.914720, 

  }

Definition at line 38 of file LCDNNTrackAttachGhostZpole.c.


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