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

Variables

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


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

#define NULL   (void *)0
 

Definition at line 12 of file LCDNNHFSelectNoVertexGhostZH.c.


Typedef Documentation

typedef struct UT * pUnit
 

typedef struct UT UnitType
 


Function Documentation

int LCDNNHFSelectNoVertexGhostZH float *  in,
float *  out,
int  init
 

Definition at line 137 of file LCDNNHFSelectNoVertexGhostZH.c.

References UT::act, and Units.

00138 {
00139   int member, source;
00140   float sum;
00141   enum{OK, Error, Not_Valid};
00142   pUnit unit;
00143 
00144 
00145   /* layer definition section (names & member units) */
00146 
00147   static pUnit Input[6] = {Units + 1, Units + 2, Units + 3, Units + 4, Units + 5, Units + 6}; /* members */
00148 
00149   static pUnit Hidden1[7] = {Units + 7, Units + 8, Units + 9, Units + 10, Units + 11, Units + 12, Units + 13}; /* members */
00150 
00151   static pUnit Output1[2] = {Units + 14, Units + 15}; /* members */
00152 
00153   static int Output[2] = {14, 15};
00154 
00155   for(member = 0; member < 6; member++) {
00156     Input[member]->act = in[member];
00157   }
00158 
00159   for (member = 0; member < 7; member++) {
00160     unit = Hidden1[member];
00161     sum = 0.0;
00162     for (source = 0; source < unit->NoOfSources; source++) {
00163       sum += unit->sources[source]->act
00164              * unit->weights[source];
00165     }
00166     unit->act = Act_Logistic(sum, unit->Bias);
00167   };
00168 
00169   for (member = 0; member < 2; member++) {
00170     unit = Output1[member];
00171     sum = 0.0;
00172     for (source = 0; source < unit->NoOfSources; source++) {
00173       sum += unit->sources[source]->act
00174              * unit->weights[source];
00175     }
00176     unit->act = Act_Logistic(sum, unit->Bias);
00177   };
00178 
00179   for(member = 0; member < 2; member++) {
00180     out[member] = Units[Output[member]].act;
00181   }
00182 
00183   return(OK);
00184 }


Variable Documentation

pUnit Sources[] [static]
 

Initial value:

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

  }

Definition at line 26 of file LCDNNHFSelectNoVertexGhostZH.c.

UnitType Units[16] [static]
 

Definition at line 54 of file LCDNNHFSelectNoVertexGhostZH.c.

UnitType Units[16] [static]
 

Definition at line 24 of file LCDNNHFSelectNoVertexGhostZH.c.

float Weights[] [static]
 

Initial value:

  {
0.049850, -0.946650, -1.666800, -6.179320, -0.263570, -0.888520, 
0.489800, -0.993160, -60.020901, 7.833100, -13.015480, 5.119560, 
-0.846410, -5.633590, 1.338990, 0.912430, 2.186680, 7.895150, 
2.098840, 0.750690, -23.569401, -11.488430, -24.893909, -3.600230, 
15.653720, 6.578580, -0.472240, -3.062450, 1.204310, 7.195140, 
0.788270, 1.539510, -52.216400, 3.246270, -14.239620, 11.975460, 
0.671340, -0.763550, 5.320680, -26.488110, 9.354320, -5.902920, 
2.511370, 2.357500, 3.093430, 0.230860, -3.484040, -2.282060, 0.232610, 
2.355780, 3.573330, -3.311430, -2.470590, 3.080270, -3.995200, -2.101470, 

  }

Definition at line 40 of file LCDNNHFSelectNoVertexGhostZH.c.


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