#include <stdio.h>
Go to the source code of this file.
Data Structures | |
struct | LWPR_ParserData |
Data structure used for parsing an LWPR model from an XML file. More... | |
Functions | |
int | lwpr_write_xml (const LWPR_Model *model, const char *filename) |
Writes an LWPR model to an XML file. | |
void | lwpr_write_xml_fp (const LWPR_Model *model, FILE *fp) |
Writes an LWPR model to an XML file. | |
int | lwpr_read_xml (LWPR_Model *model, const char *filename, int *numWarnings) |
Parse an LWPR model from an XML file. | |
void | lwpr_xml_write_matrix (FILE *fp, int level, const char *name, int M, int Ms, int N, const double *val) |
Writes a matrix as an XML tag into a file. | |
void | lwpr_xml_write_vector (FILE *fp, int level, const char *name, int N, const double *val) |
Writes a vector as an XML tag into a file. | |
void | lwpr_xml_write_int (FILE *fp, int level, const char *name, int val) |
Writes an interger as an XML tag into a file. | |
void | lwpr_xml_write_scalar (FILE *fp, int level, const char *name, double val) |
Writes a scalar (double) as an XML tag into a file. | |
void | lwpr_xml_write_rf (FILE *fp, const LWPR_ReceptiveField *RF) |
Writes a receptive field structure as XML tags into a file. | |
int | lwpr_xml_parse_scalar (const char **atts, const char **fieldName) |
Checks whether an XML tag describes a valid scalar (int or double). | |
int | lwpr_xml_parse_vector (const char **atts, const char **fieldName, int *N) |
Checks whether an XML tag describes a valid vector. | |
int | lwpr_xml_parse_matrix (const char **atts, const char **fieldName, int *M, int *N) |
Checks whether an XML tag describes a valid matrix. | |
void | lwpr_xml_error (LWPR_ParserData *ud, const char *msg) |
Auxiliary routine to report a parsing error. | |
void | lwpr_xml_dim_error (LWPR_ParserData *ud, const char *fieldname, int wishM, int wishN) |
Auxiliary routine to report a "bad dimensionality" parsing error. | |
void | lwpr_xml_report_unknown (LWPR_ParserData *ud, const char *fieldname) |
Auxiliary routine to report an "unknown element" warning. | |
void | lwpr_xml_start_element (void *userData, const char *name, const char **atts) |
Callback for EXPAT parser, start of a new element. | |
void | lwpr_xml_end_element (void *userData, const char *name) |
Callback for EXPAT parser, element finished. | |
void | lwpr_xml_handle_data (void *userData, const char *s, int len) |
Callback for EXPAT parser, for data between enclosing tags. | |
int | lwpr_xml_read_file_into_buffer (const char *filename, char **buffer) |
Reads a file into memory. |
This header file describes routines for writing LWPR models to XML files, and parsing LWPR models from XML files, if EXPAT is available.
An XML document type definition (DTD) is provided in the file "include/lwpr_xml.dtd".
|
Auxiliary routine to report a "bad dimensionality" parsing error.
|
|
Auxiliary routine to report a parsing error.
|
|
Checks whether an XML tag describes a valid matrix.
|
|
Checks whether an XML tag describes a valid scalar (int or double).
|
|
Checks whether an XML tag describes a valid vector.
|
|
Reads a file into memory.
|
|
Auxiliary routine to report an "unknown element" warning.
|
|
Writes an interger as an XML tag into a file.
|
|
Writes a matrix as an XML tag into a file.
|
|
Writes a receptive field structure as XML tags into a file.
|
|
Writes a scalar (double) as an XML tag into a file.
|
|
Writes a vector as an XML tag into a file.
|