Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

gnn_phandle.h File Reference

#include "gnn_globals.h"

Include dependency graph for gnn_phandle.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  gnn_phandle
 The gnn_phandle type. More...


Typedefs

typedef enum _phandle_update phandle_update
 A type for update flags.


Enumerations

enum  _phandle_update { PHandleCountFlags = 1, PHandleUseFlags = 2 }

Functions

gnn_phandlegnn_phandle_new (size_t size)
 Creates a new parameter handle.

int gnn_phandle_unref (gnn_phandle *ph)
 Unreferences a parameter handle.

int gnn_phandle_ref (gnn_phandle *ph)
 References a parameter handle.

gsl_vector * gnn_phandle_get_w (gnn_phandle *ph)
 Returns a pointer to the internal parameter vector.

gsl_vector * gnn_phandle_get_dw (gnn_phandle *ph)
 Returns a pointer to the internal parameter gradient.

gsl_vector_int * gnn_phandle_get_f (gnn_phandle *ph)
 Returns a pointer to the internal frozen flags.

int gnn_phandle_update (gnn_phandle *ph)
 Updates the handle's fields.


Enumeration Type Documentation

enum _phandle_update
 

Enumeration values:
PHandleCountFlags 
PHandleUseFlags 

Definition at line 50 of file gnn_phandle.h.


Function Documentation

gsl_vector* gnn_phandle_get_dw gnn_phandle   ph
 

This function returns a pointer to the internal parameter gradient . The user can modify its values at will. After changes are made, the gnn_phandle_update function should be called to recompute the auxiliary information and reflect the changes.

Parameters:
ph  The parameter handle to be referenced.
Returns:
A pointer to the parameter gradient.

Definition at line 378 of file gnn_phandle.c.

gsl_vector_int* gnn_phandle_get_f gnn_phandle   ph
 

This function returns a pointer to the internal frozen flags . The user can modify its values at will. After changes are made, the gnn_phandle_update function should be called to recompute the auxiliary information and reflect the changes.

It should be remembered that the vector's element have binary values. That is, 0 means "free" parameter, 1 means "frozen" or "fixed" parameter.

Parameters:
ph  The parameter handle to be referenced.
Returns:
A pointer to the frozen flags.

Definition at line 404 of file gnn_phandle.c.

gsl_vector* gnn_phandle_get_w gnn_phandle   ph
 

This function returns a pointer to the internal parameter vector . The user can modify its values at will. After changes are made, the gnn_phandle_update function should be called to recompute the auxiliary information and reflect the changes.

Parameters:
ph  The parameter handle to be referenced.
Returns:
A pointer to the parameter vector.

Definition at line 358 of file gnn_phandle.c.

gnn_phandle* gnn_phandle_new size_t    size
 

This function allocates a new parameter handle for the given number of parameters. It creates the underlying blocks of parameters, parameter gradients and freeze flags. It's fields are appropiately initialized.

Of course, the number of parameters can perfectly be zero. In this case, the creation of the underlying data blocks is ommitted.

Parameters:
size  The number of parameters that the handle should actually handle.
Returns:
A pointer to a new parameter handle.

Definition at line 219 of file gnn_phandle.c.

int gnn_phandle_ref gnn_phandle   ph
 

This function increases the reference count of the parameter handle. It should be called when the parameters are being shared.

Parameters:
ph  The parameter handle to be referenced.

Definition at line 305 of file gnn_phandle.c.

int gnn_phandle_unref gnn_phandle   ph
 

This function decreases the reference count of the parameter handle. It should be called when the parameters aren't used anymore.

If the reference count drops to zero, then the associated parameters aren't used by anyone, triggering the real deallocation of the handle.

Parameters:
ph  The parameter handle to be unreferenced.

Definition at line 279 of file gnn_phandle.c.

int gnn_phandle_update gnn_phandle   ph
 

This function should be called after changes have made to the handle's vectors w, dw or f, to update the fields and check for consistency.

Note:
Only the necessary values are updated.
Parameters:
ph  The parameter handle to be updated.
Returns:
0 if succeeded.

Definition at line 427 of file gnn_phandle.c.


Generated on Sun Jun 13 20:51:09 2004 for libgnn Gradient Retropropagation Machine Library by doxygen1.2.18