Graphitti
A toolkit/software architecture to ease creating high-performance neural network simulators
Loading...
Searching...
No Matches
MatrixFactory Class Reference

Deserializes Matrix objects from XML. More...

#include <MatrixFactory.h>

Static Public Member Functions

static MatrixCreateMatrix (TiXmlElement *matElement)
 
static VectorMatrix CreateVector (TiXmlElement *matElement)
 
static CompleteMatrix CreateComplete (TiXmlElement *matElement)
 
static SparseMatrix CreateSparse (TiXmlElement *matElement)
 

Detailed Description

Deserializes Matrix objects from XML.

This class deserializes Matrix subclass objects from XML. It is a helper class with all static methods. MatrixFactory methods are used solely as class methods to create Matrix subclass objects. MatrixFactory instances are never created.

Definition at line 24 of file MatrixFactory.h.

Member Function Documentation

◆ CreateComplete()

CompleteMatrix MatrixFactory::CreateComplete ( TiXmlElement * matElement)
static

Create a CompleteMatrix, based on the XML attributes. The object is returned by value. Why is this here, rather than just an alternative CompleteMatrix constructor? To isolate the Matrix class hierarchy from tinyxml.

Exceptions
KII_invalid_argument
Parameters
matElementpointer to Matrix XML element
Returns
The CompleteMatrix object.
Exceptions
KII_invalid_argument

This function creates a CompleteMatrix from the given tinyxml Element and its children.

Input: matElement: tinyxml DOM node containing a Matrix element Postconditions" If no problems, CompleteMatrix subclass object created and initialized. Returns: CompleteMatrix object (will be empty if some failure occurs).

Definition at line 225 of file MatrixFactory.cpp.

◆ CreateMatrix()

Matrix * MatrixFactory::CreateMatrix ( TiXmlElement * matElement)
static

Create the appropriate type of subclass object, based on the XML attributes. The object is allocated on the heap, and it is the responsibility of the client to delete it.

Exceptions
KII_invalid_argument
Parameters
matElementpointer to Matrix XML element
Returns
A pointer to the Matrix subclass object.

This function creates a Matrix subclass element from the given tinyxml Element and its children. The class created is determined from the attributes of the Element

Input: matElement: tinyxml DOM node containing a Matrix element Postconditions" If no problems, correct Matrix subclass object created and initialized. Returns: Pointer to created Matrix (nullptr if failure).

Definition at line 90 of file MatrixFactory.cpp.

◆ CreateSparse()

SparseMatrix MatrixFactory::CreateSparse ( TiXmlElement * matElement)
static

Create a SparseMatrix, based on the XML attributes. The object is returned by value.

Exceptions
KII_invalid_argument
Parameters
matElementpointer to Matrix XML element
Returns
The SparseMatrix object.

Create a SparseMatrix, based on the XML attributes. The object is returned by value.

Exceptions
KII_invalid_argument
Parameters
matElementpointer to Matrix XML element
Returns
The SparseMatrix object.

Definition at line 273 of file MatrixFactory.cpp.

◆ CreateVector()

VectorMatrix MatrixFactory::CreateVector ( TiXmlElement * matElement)
static

Create a VectorMatrix, based on the XML attributes. The object is returned by value. Why is this here, rather than just an alternative CompleteMatrix constructor? To isolate the Matrix class hierarchy from tinyxml.

Exceptions
KII_invalid_argument
KII_domain_error
Parameters
matElementpointer to Matrix XML element
Returns
The VectorMatrix object.

This function creates a VectorMatrix from the given tinyxml Element and its children.

Input: matElement: tinyxml DOM node containing a Matrix element Postconditions" If no problems, VectorMatrix object created and initialized. Returns: VectorMatrix object (will be empty if some failure occurs).

Definition at line 169 of file MatrixFactory.cpp.


The documentation for this class was generated from the following files: