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

Variables

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


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

#define NULL   (void *)0
 

Definition at line 12 of file LCDNNHFSelectGhostZH.c.


Typedef Documentation

typedef struct UT * pUnit
 

typedef struct UT UnitType
 


Function Documentation

int LCDNNHFSelectGhostZH float *  in,
float *  out,
int  init
 

Definition at line 149 of file LCDNNHFSelectGhostZH.c.

References UT::act, and Units.

00150 {
00151   int member, source;
00152   float sum;
00153   enum{OK, Error, Not_Valid};
00154   pUnit unit;
00155 
00156 
00157   /* layer definition section (names & member units) */
00158 
00159   static pUnit Input[7] = {Units + 1, Units + 2, Units + 3, Units + 4, Units + 5, Units + 6, Units + 7}; /* members */
00160 
00161   static pUnit Hidden1[8] = {Units + 8, Units + 9, Units + 10, Units + 11, Units + 12, Units + 13, Units + 14, Units + 15}; /* members */
00162 
00163   static pUnit Output1[2] = {Units + 16, Units + 17}; /* members */
00164 
00165   static int Output[2] = {16, 17};
00166 
00167   for(member = 0; member < 7; member++) {
00168     Input[member]->act = in[member];
00169   }
00170 
00171   for (member = 0; member < 8; member++) {
00172     unit = Hidden1[member];
00173     sum = 0.0;
00174     for (source = 0; source < unit->NoOfSources; source++) {
00175       sum += unit->sources[source]->act
00176              * unit->weights[source];
00177     }
00178     unit->act = Act_Logistic(sum, unit->Bias);
00179   };
00180 
00181   for (member = 0; member < 2; member++) {
00182     unit = Output1[member];
00183     sum = 0.0;
00184     for (source = 0; source < unit->NoOfSources; source++) {
00185       sum += unit->sources[source]->act
00186              * unit->weights[source];
00187     }
00188     unit->act = Act_Logistic(sum, unit->Bias);
00189   };
00190 
00191   for(member = 0; member < 2; member++) {
00192     out[member] = Units[Output[member]].act;
00193   }
00194 
00195   return(OK);
00196 }


Variable Documentation

pUnit Sources[] [static]
 

Initial value:

  {
Units + 1, Units + 2, Units + 3, Units + 4, Units + 5, Units + 6, Units + 7, 
Units + 1, Units + 2, Units + 3, Units + 4, Units + 5, Units + 6, Units + 7, 
Units + 1, Units + 2, Units + 3, Units + 4, Units + 5, Units + 6, Units + 7, 
Units + 1, Units + 2, Units + 3, Units + 4, Units + 5, Units + 6, Units + 7, 
Units + 1, Units + 2, Units + 3, Units + 4, Units + 5, Units + 6, Units + 7, 
Units + 1, Units + 2, Units + 3, Units + 4, Units + 5, Units + 6, Units + 7, 
Units + 1, Units + 2, Units + 3, Units + 4, Units + 5, Units + 6, Units + 7, 
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 + 14, Units + 15, 
Units + 8, Units + 9, Units + 10, Units + 11, Units + 12, Units + 13, Units + 14, Units + 15, 

  }

Definition at line 26 of file LCDNNHFSelectGhostZH.c.

UnitType Units[18] [static]
 

Definition at line 56 of file LCDNNHFSelectGhostZH.c.

UnitType Units[18] [static]
 

Definition at line 24 of file LCDNNHFSelectGhostZH.c.

float Weights[] [static]
 

Initial value:

  {
-40.251732, 30.447550, -1.602510, 4.982160, -1.672310, -2.706350, 2.616760, 
75.607498, 8.297900, 14.142590, -2.111890, 8.203920, -21.157690, -13.410130, 
8.054140, 14.547020, 25.253889, -3.139480, 14.607220, 4.823490, -2.293770, 
44.736389, 12.803110, 10.143750, -0.941820, 9.562440, -23.232090, -42.112411, 
-3.999900, 3.262790, 1.200900, -10.326560, -1.438990, -1.786290, -2.894920, 
20.389650, 1.138780, -7.157040, -5.356400, 2.709180, -2.203460, -13.270920, 
-9.687040, -58.619419, 7.007860, 6.591980, 7.104910, -9.463710, -3.212440, 
-14.819140, -9.980000, -17.429661, 0.006080, -6.279540, -16.674580, 11.335890, 
3.341770, 2.599630, 1.212160, -1.699510, -2.672590, -2.016580, -1.450800, -2.368060, 
-3.529960, -2.641480, -1.278930, 1.656950, 2.647930, 2.161220, 1.495570, 2.351890, 

  }

Definition at line 41 of file LCDNNHFSelectGhostZH.c.


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