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

Variables

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


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

#define NULL   (void *)0
 

Definition at line 22 of file LCDNNSeedVertex.c.


Typedef Documentation

typedef struct UT * pUnit
 

typedef struct UT UnitType
 


Function Documentation

int LCDNNSeedVertex float *  in,
float *  out,
int  init
 

Definition at line 97 of file LCDNNSeedVertex.c.

References UT::act, and Units.

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


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 + 4, Units + 5, Units + 6, 

  }

Definition at line 36 of file LCDNNSeedVertex.c.

UnitType Units[8] [static]
 

Definition at line 54 of file LCDNNSeedVertex.c.

UnitType Units[8] [static]
 

Definition at line 34 of file LCDNNSeedVertex.c.

float Weights[] [static]
 

Initial value:

  {
-11.317890, -0.705460, 15.902080, 
7.238910, 7.200770, -2.640270, 
-16.638500, -7.847330, -2.392810, 
4.946140, 3.236760, -5.214430, 

  }

Definition at line 45 of file LCDNNSeedVertex.c.


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