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

#define NULL   (void *)0
 

Definition at line 12 of file LCDNNTrackAttachGhostZH.c.


Typedef Documentation

typedef struct UT * pUnit
 

typedef struct UT UnitType
 


Function Documentation

int LCDNNTrackAttachGhostZH float *  in,
float *  out,
int  init
 

Definition at line 118 of file LCDNNTrackAttachGhostZH.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 LCDNNTrackAttachGhostZH.c.

UnitType Units[13] [static]
 

Definition at line 50 of file LCDNNTrackAttachGhostZH.c.

UnitType Units[13] [static]
 

Definition at line 24 of file LCDNNTrackAttachGhostZH.c.

float Weights[] [static]
 

Initial value:

  {
-38.715900, 11.256300, 19.853310, -4.813870, 0.448300, 
-0.258090, -37.284061, -1.535580, 2.284560, -7.658370, 
-9.208250, 2.498690, 5.086840, 1.309090, 18.063240, 
15.874110, -14.199640, -1.703790, -1.173760, -46.936150, 
8.122840, -1.537420, -15.256220, -16.572550, -5.963290, 
-4.658800, 0.008930, -2.073050, -54.524681, 4.612220, 
1.480730, 4.021510, -1.866740, -7.375780, -1.364900, 4.464190, 

  }

Definition at line 38 of file LCDNNTrackAttachGhostZH.c.


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