Main Page   Data Structures   File List   Data Fields   Globals  

nn.c File Reference

Core functions. More...

#include <math.h>
#include "nn.h"

Functions

double nnSigmoid (nnNode *node)
 Sigmoid function.

double nnDSigmoid (nnNode *node)
 Derivative of the sigmoid function.

void nnRunNetwork (nnNet *net)
 Evaluate each successive layer of a network, from input to output.

void nnSetNetworkInputs (nnNet *net, const double inputs[])
 Set the input nodes of a network from an array.

void nnGetNetworkOutputs (nnNet *net, double outputs[])
 Stores the states of all output nodes in a network into an array.


Detailed Description

Core functions.


Function Documentation

double nnDSigmoid nnNode   node
 

Derivative of the sigmoid function.

Parameters:
node  The nnNode to calculate the sigmoid derivative for.
Returns:
Sigmoid derivative calculated from node->in.

void nnGetNetworkOutputs nnNet   net,
double    outputs[]
 

Stores the states of all output nodes in a network into an array.

Parameters:
net  Network with output states to get.
outputs  Array where to store outputs.

void nnRunNetwork nnNet   net
 

Evaluate each successive layer of a network, from input to output.

Parameters:
net  Network to evaluate.

void nnSetNetworkInputs nnNet   net,
const double    inputs[]
 

Set the input nodes of a network from an array.

Parameters:
net  Network with inputs to set.
inputs  Array of from which to set the inputs.

double nnSigmoid nnNode   node
 

Sigmoid function.

Parameters:
node  Pointer to the nnNode for which to calculate the sigmoid value for.
Returns:
Sigmoid value calculated from node->in.


Variable Documentation

const char rcsid[] [static]
 

Initial value:

        "$Id: nn.c 319 2003-02-22 08:57:23Z asaddi $"


Generated on Sat Feb 22 03:39:25 2003 for nn by doxygen1.2.18