/Home/aooliver/hepsoft/lcdroot/LCDRootApps/PhUtil/src/LCDNNTrackAttach.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 LCDNNTrackAttach (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 20 of file LCDNNTrackAttach.c.

#define NULL   (void *)0
 

Definition at line 22 of file LCDNNTrackAttach.c.


Typedef Documentation

typedef struct UT * pUnit
 

typedef struct UT UnitType
 


Function Documentation

int LCDNNTrackAttach float *  in,
float *  out,
int  init
 

Definition at line 128 of file LCDNNTrackAttach.c.

References UT::act, and Units.

00129 {
00130   int member, source;
00131   float sum;
00132   enum{OK, Error, Not_Valid};
00133   pUnit unit;
00134 
00135 
00136   /* layer definition section (names & member units) */
00137 
00138   static pUnit Input[5] = {Units + 1, Units + 2, Units + 3, Units + 4, Units + 5}; /* members */
00139 
00140   static pUnit Hidden1[6] = {Units + 6, Units + 7, Units + 8, Units + 9, Units + 10, Units + 11}; /* members */
00141 
00142   static pUnit Output1[1] = {Units + 12}; /* members */
00143 
00144   static int Output[1] = {12};
00145 
00146   for(member = 0; member < 5; member++) {
00147     Input[member]->act = in[member];
00148   }
00149 
00150   for (member = 0; member < 6; member++) {
00151     unit = Hidden1[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     unit = Output1[member];
00162     sum = 0.0;
00163     for (source = 0; source < unit->NoOfSources; source++) {
00164       sum += unit->sources[source]->act
00165              * unit->weights[source];
00166     }
00167     unit->act = Act_Logistic(sum, unit->Bias);
00168   };
00169 
00170   for(member = 0; member < 1; member++) {
00171     out[member] = Units[Output[member]].act;
00172   }
00173 
00174   return(OK);
00175 }


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 36 of file LCDNNTrackAttach.c.

UnitType Units[13] [static]
 

Definition at line 60 of file LCDNNTrackAttach.c.

UnitType Units[13] [static]
 

Definition at line 34 of file LCDNNTrackAttach.c.

float Weights[] [static]
 

Initial value:

  {
19.414761, -2.808000, -2.919760, -4.624430, 6.222280, 
-75.335892, 9.486310, 2.994320, 11.566720, -11.007780, 
-6.970760, 8.919360, 8.702320, 58.130859, -32.872280, 
8.711170, -0.439700, -27.810261, 3.990040, -58.625229, 
-8.255880, -12.572060, -59.266869, 18.190960, -8.602950, 
69.875412, -0.535590, -6.422460, -80.229103, -5.782360, 
-24.869949, 29.129721, -28.617640, -9.017590, -4.131780, 12.596730, 

  }

Definition at line 48 of file LCDNNTrackAttach.c.


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