org.encog.persist.persistors
Class PersistorUtil

java.lang.Object
  extended by org.encog.persist.persistors.PersistorUtil

public final class PersistorUtil
extends Object

This class contains some utilities for persisting objects.

Author:
jheaton

Field Summary
static String ATTRIBUTE_MATRIX_COLS
          The columns in the matrix.
static String ATTRIBUTE_MATRIX_ROWS
          The rows in the matrix.
static String ROW
          A matrix row.
 
Method Summary
static void beginEncogObject(String objectType, WriteXML out, EncogPersistedObject obj, boolean top)
          Write the beginning XML for an Encog object.
static Persistor createPersistor(String className)
          Create a persistor object.
static Matrix loadMatrix(ReadXML in)
          Load a matrix from the reader.
static void saveMatrix(Matrix matrix, WriteXML out)
          Save the specified matrix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTRIBUTE_MATRIX_ROWS

public static final String ATTRIBUTE_MATRIX_ROWS
The rows in the matrix.

See Also:
Constant Field Values

ATTRIBUTE_MATRIX_COLS

public static final String ATTRIBUTE_MATRIX_COLS
The columns in the matrix.

See Also:
Constant Field Values

ROW

public static final String ROW
A matrix row.

See Also:
Constant Field Values
Method Detail

beginEncogObject

public static void beginEncogObject(String objectType,
                                    WriteXML out,
                                    EncogPersistedObject obj,
                                    boolean top)
Write the beginning XML for an Encog object.

Parameters:
objectType - The object type to persist.
out - The object that is being persisted.
obj - The XML writer.
top - Is this a top-level object, that needs a name and description?

createPersistor

public static Persistor createPersistor(String className)
Create a persistor object. These objects know how to persist certain types of classes.

Parameters:
className - The name of the class to create a persistor for.
Returns:
The persistor for the specified class.

loadMatrix

public static Matrix loadMatrix(ReadXML in)
Load a matrix from the reader.

Parameters:
in - The XML reader.
Returns:
The loaded matrix.

saveMatrix

public static void saveMatrix(Matrix matrix,
                              WriteXML out)
Save the specified matrix.

Parameters:
matrix - The matrix to save.
out - The XML writer.


Copyright © 2011. All Rights Reserved.