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

#define NULL   (void *)0
 

Definition at line 12 of file LCDNNHFSelectGhostZpole.c.


Typedef Documentation

typedef struct UT * pUnit
 

typedef struct UT UnitType
 


Function Documentation

int LCDNNHFSelectGhostZpole float *  in,
float *  out,
int  init
 

Definition at line 149 of file LCDNNHFSelectGhostZpole.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 LCDNNHFSelectGhostZpole.c.

UnitType Units[18] [static]
 

Definition at line 56 of file LCDNNHFSelectGhostZpole.c.

UnitType Units[18] [static]
 

Definition at line 24 of file LCDNNHFSelectGhostZpole.c.

float Weights[] [static]
 

Initial value:

  {
0.592060, 7.315660, -3.693530, -2.050900, -2.109990, 0.161240, -2.477880, 
-36.302601, 27.697781, -0.054130, 0.512950, -11.065560, -16.162781, 0.694520, 
8.754350, -21.236750, -2.745320, -3.650920, 1.450230, -1.907920, 1.448960, 
-7.638910, 12.883540, 23.061840, 0.394010, 0.582970, -10.612470, -16.413170, 
46.124569, 18.503929, 22.062349, 2.419850, 26.234619, 36.394421, -24.295031, 
-20.438931, -2.183120, -4.353290, -0.109000, -3.972100, 5.759090, -0.836940, 
-14.829820, -9.585720, -8.282880, 4.362840, -0.533270, -9.646860, -32.478661, 
-8.988600, 12.091690, 26.603350, -1.257970, 7.916810, -18.841660, -13.766060, 
-6.101290, 5.559670, -2.780940, -5.631780, 2.285500, -3.891880, -0.388980, 4.774590, 
6.050750, -6.070260, 2.836230, 5.023780, -2.420590, 3.790840, -5.196850, -4.775370, 

  }

Definition at line 41 of file LCDNNHFSelectGhostZpole.c.


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