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

gnn_filewriter.h File Reference

#include "gnn_output.h"

Include dependency graph for gnn_filewriter.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.

Functions

gnn_outputgnn_filewriter_new (FILE *fp)
 Builds a new filewriter device.

gnn_outputgnn_filewriter_with_file_new (const char *filename)
 Builds a new filewriter device with a given filename.

int gnn_filewriter_set_format (gnn_output *set, const char *fmt)
 Sets a new print format.

const char * gnn_filewriter_get_format (gnn_output *set)
 Gets the print format.

int gnn_filewriter_set_prefix (gnn_output *set, const char *prefix)
 Sets a new printing prefix.

const char * gnn_filewriter_get_prefix (gnn_output *set)
 Gets the prefix format string.

int gnn_filewriter_set_postfix (gnn_output *set, const char *postfix)
 Sets a new printing postfix.

const char * gnn_filewriter_get_postfix (gnn_output *set)
 Gets the postfix format string.

int gnn_filewriter_owns_file (gnn_output *set)
 Check if it owns the file.


Function Documentation

const char* gnn_filewriter_get_format gnn_output   set
 

This function returns a pointer to the currently used vector elements print format.

Parameters:
fmt  A format string for double precision values.
Returns:
Returns a pointer to a new gnn_filewriter : File Output Device..

Definition at line 339 of file gnn_filewriter.c.

const char* gnn_filewriter_get_postfix gnn_output   set
 

This function returns a pointer to the currently used postfix string.

Parameters:
set  A pointer to a gnn_filewriter : File Output Device..
Returns:
Returns a pointer to the postfix or NULL.

Definition at line 443 of file gnn_filewriter.c.

const char* gnn_filewriter_get_prefix gnn_output   set
 

This function returns a pointer to the currently used prefix string.

Parameters:
set  A pointer to a gnn_filewriter : File Output Device..
Returns:
Returns a pointer to the prefix or NULL.

Definition at line 391 of file gnn_filewriter.c.

gnn_output* gnn_filewriter_new FILE *    fp
 

This function creates a new gnn_filewriter : File Output Device. device with the given opened file pointer. When destroyed, the stream won't be closed.

Parameters:
fp  A valid and opened file pointer.
Returns:
Returns a pointer to a new gnn_filewriter : File Output Device..

Definition at line 205 of file gnn_filewriter.c.

int gnn_filewriter_owns_file gnn_output   set
 

This function returns 1 if the gnn_filewriter : File Output Device. owns the file.

Parameters:
set  A pointer to a gnn_filewriter : File Output Device..
Returns:
Returns 1 if it owns the file or 0 if not.

Definition at line 465 of file gnn_filewriter.c.

int gnn_filewriter_set_format gnn_output   set,
const char *    fmt
 

This function sets a new print format for the vector elements of the samples. The default is "%g\t", which separates the elements by tabs. The format specifier should contain a valid double-precision specifier, like "%f ", "%e " or "%g " (do not forget to include a separator).

Parameters:
set  A pointer to a gnn_filewriter : File Output Device..
fmt  A format string for double precision values.
Returns:
Returns a pointer to a new gnn_filewriter : File Output Device..

Definition at line 308 of file gnn_filewriter.c.

int gnn_filewriter_set_postfix gnn_output   set,
const char *    postfix
 

This function sets a new printing postfix, which will be postpended to every printed output vector. This string can contain at most one integer format specifier, like "N %d :". The placeholder will be filled with the number of the written pattern.

Parameters:
set  A pointer to a gnn_filewriter : File Output Device..
prefix  A postfix format string or NULL.
Returns:
Returns 0 if succeeded.

Definition at line 416 of file gnn_filewriter.c.

int gnn_filewriter_set_prefix gnn_output   set,
const char *    prefix
 

This function sets a new printing prefix, which will be prepended to every printed output vector. This string can contain at most one integer format specifier, like "N %d :". The placeholder will be filled with the number of the written pattern.

Parameters:
set  A pointer to a gnn_filewriter : File Output Device..
prefix  A prefix format string or NULL.
Returns:
Returns 0 if succeeded.

Definition at line 364 of file gnn_filewriter.c.

gnn_output* gnn_filewriter_with_file_new const char *    filename
 

This function creates a new gnn_filewriter : File Output Device. device. It opens the file filename for printing. The gnn_filewriter : File Output Device. is the owner of the file and closes it when destroyed.

Parameters:
filename  A string containing the file name for printing.
Returns:
Returns a pointer to a new gnn_filewriter : File Output Device..

Definition at line 262 of file gnn_filewriter.c.


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