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

Variables

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


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

#define NULL   (void *)0
 

Definition at line 12 of file LCDNNSeedVertexOneProngGhostZpole.c.


Typedef Documentation

typedef struct UT * pUnit
 

typedef struct UT UnitType
 


Function Documentation

int LCDNNSeedVertexOneProngGhostZpole float *  in,
float *  out,
int  init
 

Definition at line 94 of file LCDNNSeedVertexOneProngGhostZpole.c.

References UT::act, and Units.

Referenced by LCDVToplGhost::GetNNoutputSeedVertex().

00095 {
00096   int member, source;
00097   float sum;
00098   enum{OK, Error, Not_Valid};
00099   pUnit unit;
00100 
00101 
00102   /* layer definition section (names & member units) */
00103 
00104   static pUnit Input[3] = {Units + 1, Units + 2, Units + 3}; /* members */
00105 
00106   static pUnit Hidden1[4] = {Units + 4, Units + 5, Units + 6, Units + 7}; /* members */
00107 
00108   static pUnit Output1[1] = {Units + 8}; /* members */
00109 
00110   static int Output[1] = {8};
00111 
00112   for(member = 0; member < 3; member++) {
00113     Input[member]->act = in[member];
00114   }
00115 
00116   for (member = 0; member < 4; member++) {
00117     unit = Hidden1[member];
00118     sum = 0.0;
00119     for (source = 0; source < unit->NoOfSources; source++) {
00120       sum += unit->sources[source]->act
00121              * unit->weights[source];
00122     }
00123     unit->act = Act_Logistic(sum, unit->Bias);
00124   };
00125 
00126   for (member = 0; member < 1; member++) {
00127     unit = Output1[member];
00128     sum = 0.0;
00129     for (source = 0; source < unit->NoOfSources; source++) {
00130       sum += unit->sources[source]->act
00131              * unit->weights[source];
00132     }
00133     unit->act = Act_Logistic(sum, unit->Bias);
00134   };
00135 
00136   for(member = 0; member < 1; member++) {
00137     out[member] = Units[Output[member]].act;
00138   }
00139 
00140   return(OK);
00141 }


Variable Documentation

pUnit Sources[] [static]
 

Initial value:

  {
Units + 1, Units + 2, Units + 3, 
Units + 1, Units + 2, Units + 3, 
Units + 1, Units + 2, Units + 3, 
Units + 1, Units + 2, Units + 3, 
Units + 4, Units + 5, Units + 6, Units + 7, 

  }

Definition at line 26 of file LCDNNSeedVertexOneProngGhostZpole.c.

UnitType Units[9] [static]
 

Definition at line 46 of file LCDNNSeedVertexOneProngGhostZpole.c.

UnitType Units[9] [static]
 

Definition at line 24 of file LCDNNSeedVertexOneProngGhostZpole.c.

float Weights[] [static]
 

Initial value:

  {
10.623890, -15.589810, 1.442860, 
18.245501, 3.384990, 17.455681, 
3.099190, -0.075360, 21.866150, 
5.390570, 1.859890, 2.005130, 
-3.352290, 7.801670, -2.961030, -5.050520, 

  }

Definition at line 36 of file LCDNNSeedVertexOneProngGhostZpole.c.


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