Copiste  0.1
 All Classes Functions Variables Enumerations Friends Pages
Public Member Functions
Corpus Class Reference

Stores a set of training examples for a neural net. More...

#include <corpus.h>

List of all members.

Public Member Functions

 Corpus (string file="")
 Construction, destruction.
 Corpus (int dim)
 Constructor, creating an empty corpus of dimension dim.
 Corpus (const Corpus &c, unsigned int keepOnly=-1)
 Copy constructor.
 ~Corpus ()
 Frees the memory.
void erase (int dimension=0)
 Erases the corpus and start a new one with the given dimension.
bool load (string file, bool verbose=false)
 Input, output.
void write (string file)
 Write the corpus to a file.
void display () const
 Writes to the standard output the set of elements.
unsigned int size () const
 Accessors.
unsigned int dimension () const
 Returns the number of inputs of each training example (i.e. the number of coordinates of each vector)
double * elem (unsigned int index) const
 Returns the elem pointed by the given index.
std::string name (unsigned int index) const
 Returns the name of the elem pointed by the given index.
void addElem (double *elem, std::string name="")
 Add a sample to the corpus.
std::vector< double > bounds () const
 Retuns the bounds of the corpus (the vector is : min_1 max_1 min_2 max_2 ... min_n max_n)

Detailed Description

Stores a set of training examples for a neural net.


Constructor & Destructor Documentation

Corpus::Corpus ( string  file = "")

Construction, destruction.

Default constructor. Loads a file if specified.


Member Function Documentation

void Corpus::display ( ) const

Writes to the standard output the set of elements.

Todo:
remove this, unused
bool Corpus::load ( string  file,
bool  verbose = false 
)

Input, output.

Loads the corpus from an XML file

unsigned int Corpus::size ( ) const

Accessors.

Returns the number of elements (i.e. vectors) contained in the corpus


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