From 7861e56f357097016053e8e66c80e300c8f99367 Mon Sep 17 00:00:00 2001 From: blacklight Date: Sun, 16 Aug 2009 20:57:15 +0200 Subject: [PATCH] Documentation re-generated, a lot of minor stuff --- ChangeLog | 1 + Makefile | 1 - README | 23 +- doc/html/Markup_8h-source.html | 3 +- doc/html/Markup_8h.html | 3 +- .../_2examples_2learnAdd_8cpp-example.html | 25 ++ doc/html/annotated.html | 8 +- doc/html/classCMarkup-members.html | 3 +- doc/html/classCMarkup.html | 3 +- ...alidSynapticalWeightException-members.html | 34 ++ ...p_1_1InvalidSynapticalWeightException.html | 91 ++++ ...uralpp_1_1InvalidXMLException-members.html | 34 ++ .../classneuralpp_1_1InvalidXMLException.html | 91 ++++ doc/html/classneuralpp_1_1Layer-members.html | 13 +- doc/html/classneuralpp_1_1Layer.html | 104 ++--- ...1NetworkFileNotFoundException-members.html | 34 ++ ...ralpp_1_1NetworkFileNotFoundException.html | 95 ++++ ..._1_1NetworkFileWriteException-members.html | 34 ++ ...neuralpp_1_1NetworkFileWriteException.html | 91 ++++ ...workIndexOutOfBoundsException-members.html | 34 ++ ...p_1_1NetworkIndexOutOfBoundsException.html | 91 ++++ .../classneuralpp_1_1NeuralNet-members.html | 32 +- doc/html/classneuralpp_1_1NeuralNet.html | 329 ++++++++------ doc/html/classneuralpp_1_1Neuron-members.html | 18 +- doc/html/classneuralpp_1_1Neuron.html | 97 +++-- .../classneuralpp_1_1Synapsis-members.html | 15 +- doc/html/classneuralpp_1_1Synapsis.html | 51 +-- doc/html/examples.html | 30 ++ ...amples_2adderFromScratch_8cpp-example.html | 66 +++ doc/html/examples_2doAdd_8cpp-example.html | 68 +++ doc/html/examples_2learnAdd_8cpp-example.html | 85 ++++ doc/html/files.html | 3 +- doc/html/functions.html | 3 +- doc/html/functions_0x63.html | 7 +- doc/html/functions_0x64.html | 3 +- doc/html/functions_0x65.html | 10 +- doc/html/functions_0x66.html | 3 +- doc/html/functions_0x67.html | 19 +- doc/html/functions_0x68.html | 3 +- doc/html/functions_0x69.html | 11 +- doc/html/functions_0x6c.html | 5 +- doc/html/functions_0x6d.html | 5 +- doc/html/functions_0x6e.html | 17 +- doc/html/functions_0x6f.html | 5 +- doc/html/functions_0x70.html | 9 +- doc/html/functions_0x72.html | 3 +- doc/html/functions_0x73.html | 18 +- doc/html/functions_0x74.html | 9 +- doc/html/functions_0x75.html | 3 +- doc/html/functions_0x77.html | 9 +- doc/html/functions_0x78.html | 5 +- doc/html/functions_0x7e.html | 3 +- doc/html/functions_enum.html | 3 +- doc/html/functions_eval.html | 3 +- doc/html/functions_func.html | 3 +- doc/html/functions_func_0x63.html | 7 +- doc/html/functions_func_0x64.html | 3 +- doc/html/functions_func_0x65.html | 5 +- doc/html/functions_func_0x66.html | 3 +- doc/html/functions_func_0x67.html | 19 +- doc/html/functions_func_0x69.html | 9 +- doc/html/functions_func_0x6c.html | 5 +- doc/html/functions_func_0x6d.html | 5 +- doc/html/functions_func_0x6e.html | 13 +- doc/html/functions_func_0x6f.html | 3 +- doc/html/functions_func_0x70.html | 9 +- doc/html/functions_func_0x72.html | 3 +- doc/html/functions_func_0x73.html | 18 +- doc/html/functions_func_0x74.html | 5 +- doc/html/functions_func_0x75.html | 3 +- doc/html/functions_func_0x77.html | 9 +- doc/html/functions_func_0x78.html | 5 +- doc/html/functions_func_0x7e.html | 3 +- doc/html/functions_vars.html | 21 +- doc/html/globals.html | 3 +- doc/html/globals_defs.html | 3 +- doc/html/index.html | 5 +- doc/html/namespacemembers.html | 5 +- doc/html/namespacemembers_func.html | 5 +- doc/html/namespaceneuralpp.html | 40 +- doc/html/namespaces.html | 3 +- doc/html/neural_09_09_8hpp-source.html | 408 +++++++++--------- doc/html/neural_09_09_8hpp.html | 9 +- .../neural_09_09__exception_8hpp-source.html | 88 ++-- doc/html/neural_09_09__exception_8hpp.html | 25 +- ...uctCMarkup_1_1ConvertEncoding-members.html | 3 +- .../structCMarkup_1_1ConvertEncoding.html | 3 +- .../structCMarkup_1_1ElemPos-members.html | 3 +- doc/html/structCMarkup_1_1ElemPos.html | 3 +- .../structCMarkup_1_1FilePos-members.html | 3 +- doc/html/structCMarkup_1_1FilePos.html | 3 +- .../structCMarkup_1_1NodePos-members.html | 3 +- doc/html/structCMarkup_1_1NodePos.html | 3 +- .../structCMarkup_1_1NodeStack-members.html | 3 +- doc/html/structCMarkup_1_1NodeStack.html | 3 +- .../structCMarkup_1_1PosArray-members.html | 3 +- doc/html/structCMarkup_1_1PosArray.html | 3 +- .../structCMarkup_1_1SavedPos-members.html | 3 +- doc/html/structCMarkup_1_1SavedPos.html | 3 +- .../structCMarkup_1_1SavedPosMap-members.html | 3 +- doc/html/structCMarkup_1_1SavedPosMap.html | 3 +- ...ctCMarkup_1_1SavedPosMapArray-members.html | 3 +- .../structCMarkup_1_1SavedPosMapArray.html | 3 +- .../structCMarkup_1_1TokenPos-members.html | 3 +- doc/html/structCMarkup_1_1TokenPos.html | 3 +- doc/html/structMCD__CSTR-members.html | 3 +- doc/html/structMCD__CSTR.html | 3 +- .../structneuralpp_1_1netrecord-members.html | 3 +- doc/html/structneuralpp_1_1netrecord.html | 3 +- ...tructneuralpp_1_1neuronrecord-members.html | 3 +- doc/html/structneuralpp_1_1neuronrecord.html | 3 +- .../structneuralpp_1_1synrecord-members.html | 3 +- doc/html/structneuralpp_1_1synrecord.html | 3 +- .../_2examples_2learnAdd_8cpp-example.tex | 6 + doc/latex/annotated.tex | 5 + ...pp_1_1InvalidSynapticalWeightException.tex | 38 ++ .../classneuralpp_1_1InvalidXMLException.tex | 38 ++ doc/latex/classneuralpp_1_1Layer.tex | 53 +-- ...uralpp_1_1NetworkFileNotFoundException.tex | 46 ++ ...sneuralpp_1_1NetworkFileWriteException.tex | 38 ++ ...pp_1_1NetworkIndexOutOfBoundsException.tex | 38 ++ doc/latex/classneuralpp_1_1NeuralNet.tex | 160 ++++--- doc/latex/classneuralpp_1_1Neuron.tex | 43 +- doc/latex/classneuralpp_1_1Synapsis.tex | 28 +- doc/latex/doxygen.sty | 4 +- doc/latex/examples.tex | 9 + ...xamples_2adderFromScratch_8cpp-example.tex | 48 +++ doc/latex/examples_2doAdd_8cpp-example.tex | 50 +++ doc/latex/examples_2learnAdd_8cpp-example.tex | 67 +++ doc/latex/namespaceneuralpp.tex | 19 +- doc/latex/neural_09_09_8hpp.tex | 6 +- doc/latex/neural_09_09__exception_8hpp.tex | 19 + doc/latex/refman.tex | 13 +- examples/README | 25 +- examples/adderFromScratch.cpp | 10 +- examples/doAdd.cpp | 8 +- examples/learnAdd.cpp | 32 +- include/Doxyfile | 4 +- include/neural++.hpp | 23 +- include/neural++_exception.hpp | 7 +- src/layer.cpp | 2 +- src/neuralnet.cpp | 2 +- src/neuron.cpp | 2 +- src/synapsis.cpp | 2 +- 144 files changed, 2589 insertions(+), 851 deletions(-) create mode 100644 doc/html/_2examples_2learnAdd_8cpp-example.html create mode 100644 doc/html/classneuralpp_1_1InvalidSynapticalWeightException-members.html create mode 100644 doc/html/classneuralpp_1_1InvalidSynapticalWeightException.html create mode 100644 doc/html/classneuralpp_1_1InvalidXMLException-members.html create mode 100644 doc/html/classneuralpp_1_1InvalidXMLException.html create mode 100644 doc/html/classneuralpp_1_1NetworkFileNotFoundException-members.html create mode 100644 doc/html/classneuralpp_1_1NetworkFileNotFoundException.html create mode 100644 doc/html/classneuralpp_1_1NetworkFileWriteException-members.html create mode 100644 doc/html/classneuralpp_1_1NetworkFileWriteException.html create mode 100644 doc/html/classneuralpp_1_1NetworkIndexOutOfBoundsException-members.html create mode 100644 doc/html/classneuralpp_1_1NetworkIndexOutOfBoundsException.html create mode 100644 doc/html/examples.html create mode 100644 doc/html/examples_2adderFromScratch_8cpp-example.html create mode 100644 doc/html/examples_2doAdd_8cpp-example.html create mode 100644 doc/html/examples_2learnAdd_8cpp-example.html create mode 100644 doc/latex/_2examples_2learnAdd_8cpp-example.tex create mode 100644 doc/latex/classneuralpp_1_1InvalidSynapticalWeightException.tex create mode 100644 doc/latex/classneuralpp_1_1InvalidXMLException.tex create mode 100644 doc/latex/classneuralpp_1_1NetworkFileNotFoundException.tex create mode 100644 doc/latex/classneuralpp_1_1NetworkFileWriteException.tex create mode 100644 doc/latex/classneuralpp_1_1NetworkIndexOutOfBoundsException.tex create mode 100644 doc/latex/examples.tex create mode 100644 doc/latex/examples_2adderFromScratch_8cpp-example.tex create mode 100644 doc/latex/examples_2doAdd_8cpp-example.tex create mode 100644 doc/latex/examples_2learnAdd_8cpp-example.tex diff --git a/ChangeLog b/ChangeLog index ba0df92..8eb7f8e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ neurons, in the output layer. Oh, and I've fixed too that nasty bug that made training from sets containing more than a single training set. + Added examples in the Doxygen documentation. * neuron.cpp: Fixing propagate() function 2009-08-15 BlackLight diff --git a/Makefile b/Makefile index 4986ed1..b46b6ee 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,6 @@ install: install -m 0644 lib${LIB}.a ${PREFIX}/lib/lib${LIB}.a install -m 0644 ${INCLUDEDIR}/${LIB}.hpp ${PREFIX}/${INCLUDEDIR} install -m 0644 ${INCLUDEDIR}/${LIB}_exception.hpp ${PREFIX}/${INCLUDEDIR} - install -m 0644 ${PREFIX}/share/${LIB}/README ln -sf ${PREFIX}/lib/lib${LIB}.so.0.0.0 ${PREFIX}/lib/lib${LIB}.so.0 uninstall: diff --git a/README b/README index a44c0d8..e496bbc 100644 --- a/README +++ b/README @@ -1,17 +1,28 @@ +======================================================= + _ _ _ _ _ _ + | (_) |__ | \ | | ___ _ _ _ __ __ _| | _ _ + | | | '_ \| \| |/ _ \ | | | '__/ _` | | _| |_ _| |_ + | | | |_) | |\ | __/ |_| | | | (_| | ||_ _||_ _| + |_|_|_.__/|_| \_|\___|\__,_|_| \__,_|_| |_| |_| +======================================================= + + C++ class for managing neural networks, by BlackLight < blacklight@autistici.org > Released under GNU GPL licence v.3, copyright 2008-2009 > To install: - $ make - # make install + -> goto INSTALL > To link programs with it: g++ -lneural++ > HOWTO: - # Take a look to the example in "example" directory to view it pratically. + # Take a look to the example in "examples" directory in the source package, in + $PREFIX/share/neural++ or at http://0x00.ath.cx/prog/neuralpp/examples . - # Take a look to documentation in "doc" directory to see how to use it. You can - also generate documentation on your own, moving to `include` directory and typing - `doxygen` + # Take a look to the example in "doc" directory in the source package, in + $PREFIX/share/neural++ or at http://0x00.ath.cx/prog/neuralpp/doc/index.html. + You can also generate the documentation on your own moving to include/ + directory in the source package and typing `doxygen`, if you've got doxygen + installed. diff --git a/doc/html/Markup_8h-source.html b/doc/html/Markup_8h-source.html index 88c2695..5e18d2a 100644 --- a/doc/html/Markup_8h-source.html +++ b/doc/html/Markup_8h-source.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • Markup.h

    Go to the documentation of this file.
    00001 // Markup.h: interface for the CMarkup class.
    @@ -660,7 +661,7 @@
     00644 
     00645 #endif // !defined(_MARKUP_H_INCLUDED_)
     
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/Markup_8h.html b/doc/html/Markup_8h.html index 12dfc5f..a3fa01e 100644 --- a/doc/html/Markup_8h.html +++ b/doc/html/Markup_8h.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -1031,7 +1032,7 @@

    -


    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/_2examples_2learnAdd_8cpp-example.html b/doc/html/_2examples_2learnAdd_8cpp-example.html new file mode 100644 index 0000000..46034d9 --- /dev/null +++ b/doc/html/_2examples_2learnAdd_8cpp-example.html @@ -0,0 +1,25 @@ + + +Neural++: /examples/learnAdd.cpp + + + + + +
    +

    /examples/learnAdd.cpp

    +
    Generated on Sun Aug 16 20:30:49 2009 for Neural++ by  + +doxygen 1.5.6
    + + diff --git a/doc/html/annotated.html b/doc/html/annotated.html index 6de75b8..b388204 100644 --- a/doc/html/annotated.html +++ b/doc/html/annotated.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -34,9 +35,14 @@ CMarkup::SavedPosMap CMarkup::SavedPosMapArray CMarkup::TokenPos + neuralpp::InvalidSynapticalWeightExceptionException raised when, while trying the network or directly, the weight of a synapsis is set to a value |w| > 1 + neuralpp::InvalidXMLExceptionException thrown when trying parsing an invalid XML neuralpp::LayerClass for managing layers of neurons MCD_CSTR neuralpp::netrecord + neuralpp::NetworkFileNotFoundExceptionException thrown when doing an attempt to load a network from an invalid file + neuralpp::NetworkFileWriteExceptionException thrown when trying to write the network's information to a file that cannot be written + neuralpp::NetworkIndexOutOfBoundsExceptionException raised when trying to access a neuron whose index is larger than the number of neurons in the network neuralpp::NeuralNetMain project's class neuralpp::NeuronClass for managing neurons neuralpp::neuronrecord @@ -44,7 +50,7 @@ neuralpp::synrecord
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/classCMarkup-members.html b/doc/html/classCMarkup-members.html index 70ba437..0d4ea15 100644 --- a/doc/html/classCMarkup-members.html +++ b/doc/html/classCMarkup-members.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -212,7 +213,7 @@ x_WriteText(const MCD_STR &strDoc, FilePos &file)CMarkup [protected, static] ~CMarkup()CMarkup [inline]
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/classCMarkup.html b/doc/html/classCMarkup.html index 38258f7..e7cb7b4 100644 --- a/doc/html/classCMarkup.html +++ b/doc/html/classCMarkup.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -4478,7 +4479,7 @@
    The documentation for this class was generated from the following file:
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/classneuralpp_1_1InvalidSynapticalWeightException-members.html b/doc/html/classneuralpp_1_1InvalidSynapticalWeightException-members.html new file mode 100644 index 0000000..13391d5 --- /dev/null +++ b/doc/html/classneuralpp_1_1InvalidSynapticalWeightException-members.html @@ -0,0 +1,34 @@ + + +Neural++: Member List + + + + + +
    +

    neuralpp::InvalidSynapticalWeightException Member List

    This is the complete list of members for neuralpp::InvalidSynapticalWeightException, including all inherited members.

    + + +
    InvalidSynapticalWeightException()neuralpp::InvalidSynapticalWeightException [inline]
    what() const neuralpp::InvalidSynapticalWeightException [inline]

    +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  + +doxygen 1.5.6
    + + diff --git a/doc/html/classneuralpp_1_1InvalidSynapticalWeightException.html b/doc/html/classneuralpp_1_1InvalidSynapticalWeightException.html new file mode 100644 index 0000000..403293b --- /dev/null +++ b/doc/html/classneuralpp_1_1InvalidSynapticalWeightException.html @@ -0,0 +1,91 @@ + + +Neural++: neuralpp::InvalidSynapticalWeightException Class Reference + + + + + +
    +

    neuralpp::InvalidSynapticalWeightException Class Reference

    Exception raised when, while trying the network or directly, the weight of a synapsis is set to a value |w| > 1. +More... +

    +#include <neural++_exception.hpp> +

    + +

    +List of all members. + + + + + + +

    Public Member Functions

     InvalidSynapticalWeightException ()
    const char * what () const throw ()
    +


    Detailed Description

    +Exception raised when, while trying the network or directly, the weight of a synapsis is set to a value |w| > 1.

    Constructor & Destructor Documentation

    + +
    +
    + + + + + + + + +
    neuralpp::InvalidSynapticalWeightException::InvalidSynapticalWeightException (  )  [inline]
    +
    +
    + +

    + +

    +

    +


    Member Function Documentation

    + +
    +
    + + + + + + + + +
    const char* neuralpp::InvalidSynapticalWeightException::what (  )  const throw () [inline]
    +
    +
    + +

    + +

    +

    +


    The documentation for this class was generated from the following file: +
    +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  + +doxygen 1.5.6
    + + diff --git a/doc/html/classneuralpp_1_1InvalidXMLException-members.html b/doc/html/classneuralpp_1_1InvalidXMLException-members.html new file mode 100644 index 0000000..bc02a4f --- /dev/null +++ b/doc/html/classneuralpp_1_1InvalidXMLException-members.html @@ -0,0 +1,34 @@ + + +Neural++: Member List + + + + + +
    +

    neuralpp::InvalidXMLException Member List

    This is the complete list of members for neuralpp::InvalidXMLException, including all inherited members.

    + + +
    InvalidXMLException()neuralpp::InvalidXMLException [inline]
    what() const neuralpp::InvalidXMLException [inline]

    +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  + +doxygen 1.5.6
    + + diff --git a/doc/html/classneuralpp_1_1InvalidXMLException.html b/doc/html/classneuralpp_1_1InvalidXMLException.html new file mode 100644 index 0000000..dd32eb0 --- /dev/null +++ b/doc/html/classneuralpp_1_1InvalidXMLException.html @@ -0,0 +1,91 @@ + + +Neural++: neuralpp::InvalidXMLException Class Reference + + + + + +
    +

    neuralpp::InvalidXMLException Class Reference

    Exception thrown when trying parsing an invalid XML. +More... +

    +#include <neural++_exception.hpp> +

    + +

    +List of all members. + + + + + + +

    Public Member Functions

     InvalidXMLException ()
    const char * what () const throw ()
    +


    Detailed Description

    +Exception thrown when trying parsing an invalid XML.

    Constructor & Destructor Documentation

    + +
    +
    + + + + + + + + +
    neuralpp::InvalidXMLException::InvalidXMLException (  )  [inline]
    +
    +
    + +

    + +

    +

    +


    Member Function Documentation

    + +
    +
    + + + + + + + + +
    const char* neuralpp::InvalidXMLException::what (  )  const throw () [inline]
    +
    +
    + +

    + +

    +

    +


    The documentation for this class was generated from the following file: +
    +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  + +doxygen 1.5.6
    + + diff --git a/doc/html/classneuralpp_1_1Layer-members.html b/doc/html/classneuralpp_1_1Layer-members.html index e5a5529..8f7142b 100644 --- a/doc/html/classneuralpp_1_1Layer-members.html +++ b/doc/html/classneuralpp_1_1Layer-members.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -24,18 +25,18 @@

    neuralpp::Layer Member List

    This is the complete list of members for neuralpp::Layer, including all inherited members.

    - - - + + + - - + +
    actv_fneuralpp::Layer [private]
    elementsneuralpp::Layer [private]
    Layer(size_t sz, double(*a)(double))neuralpp::Layer
    Layer(vector< Neuron > &neurons, double(*a)(double))neuralpp::Layer
    elementsneuralpp::Layer [private]
    Layer(size_t sz, double(*a)(double), double th=0.0)neuralpp::Layer
    Layer(std::vector< Neuron > &neurons, double(*a)(double), double th=0.0)neuralpp::Layer
    link(Layer &l)neuralpp::Layer
    operator[](size_t i)neuralpp::Layer
    propagate()neuralpp::Layer
    setActv(vector< double > &v)neuralpp::Layer
    setProp(vector< double > &v)neuralpp::Layer
    setInput(std::vector< double > v)neuralpp::Layer
    size() const neuralpp::Layer
    thresholdneuralpp::Layer [private]
    update_weightsneuralpp::Layer [private]

    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/classneuralpp_1_1Layer.html b/doc/html/classneuralpp_1_1Layer.html index 36687c6..05e2f25 100644 --- a/doc/html/classneuralpp_1_1Layer.html +++ b/doc/html/classneuralpp_1_1Layer.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -34,31 +35,30 @@ List of all members. - + - - + + - + - + - - - - + - + + + @@ -69,7 +69,7 @@ Class for managing layers of neurons.

    Don't use this class directly unless you know what you're doing, use NeuralNet instead


    Constructor & Destructor Documentation

    - +

    Public Member Functions

     Layer (size_t sz, double(*a)(double))
     Layer (size_t sz, double(*a)(double), double th=0.0)
     Constructor.
     Layer (vector< Neuron > &neurons, double(*a)(double))
     Constructor.
     Layer (std::vector< Neuron > &neurons, double(*a)(double), double th=0.0)
     Alternative constructor.
     Alternative constructor.
    Neuronoperator[] (size_t i) throw (NetworkIndexOutOfBoundsException)
     Redefinition for operator [].
    void link (Layer &l)
     It links a layer to another.
    void setProp (vector< double > &v)
    void setInput (std::vector< double > v)
     It sets a vector of propagation values to all its neurons.
    void setActv (vector< double > &v)
     It sets a vector of activation values to all its neurons.
     Set the input values for the neurons of the layer (just use it for the input layer).
    void propagate ()
     It propagates its activation values to the output layers.
    size_t size () const

    Private Attributes

    vector< Neuronelements
    std::vector< Neuronelements
    double threshold
    void(* update_weights )()
    @@ -83,7 +83,13 @@ Don't use this class directly unless you know what you're doing, use - + + + + + + + @@ -101,26 +107,33 @@ Constructor.
    double(*)(double)  a  a,
    double  th = 0.0 
    +
    sz Size of the layer
    a Activation function
    th Threshold, value in [0,1] that establishes how much a neuron must be 'sensitive' on variations of the input values

    - +

    - + - + + + + + + + @@ -138,6 +151,7 @@ It directly gets a vector of neurons to build the layer
    Param
    neuralpp::Layer::Layer (vector< Neuron > & std::vector< Neuron > &  neurons,
    double(*)(double)  a  a,
    double  th = 0.0 
    +
    neurons Vector of neurons to be included in the layer
    a Activation function
    th Threshold, value in [0,1] that establishes how much a neuron must be 'sensitive' on variations of the input values
    @@ -154,7 +168,7 @@ It directly gets a vector of neurons to build the layer
    Param size_t  i  )  - throw (NetworkIndexOutOfBoundsException) + throw (NetworkIndexOutOfBoundsException)
    @@ -199,14 +213,14 @@ It links a layer to another.

    - +

    - + - + @@ -216,38 +230,11 @@ It links a layer to another.

    -It sets a vector of propagation values to all its neurons. +Set the input values for the neurons of the layer (just use it for the input layer).

    Parameters:
    void neuralpp::Layer::setProp void neuralpp::Layer::setInput (vector< double > & std::vector< double >  v  ) 
    - -
    v Vector of values to write as propagation values
    - - -
    -

    - -

    -
    - - - - - - - - - -
    void neuralpp::Layer::setActv (vector< double > &  v  ) 
    -
    -
    - -

    -It sets a vector of activation values to all its neurons. -

    -

    Parameters:
    - - +
    v Vector of values to write as activation values
    v Vector containing the input values
    @@ -295,12 +282,27 @@ It propagates its activation values to the output layers.


    Member Data Documentation

    - +
    - + + +
    vector<Neuron> neuralpp::Layer::elements [private] std::vector<Neuron> neuralpp::Layer::elements [private]
    +
    +
    + +

    + +

    +

    + +

    +
    + + +
    double neuralpp::Layer::threshold [private]
    @@ -343,7 +345,7 @@ It propagates its activation values to the output layers.
    The documentation for this class was generated from the following file:
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/classneuralpp_1_1NetworkFileNotFoundException-members.html b/doc/html/classneuralpp_1_1NetworkFileNotFoundException-members.html new file mode 100644 index 0000000..263f3c3 --- /dev/null +++ b/doc/html/classneuralpp_1_1NetworkFileNotFoundException-members.html @@ -0,0 +1,34 @@ + + +Neural++: Member List + + + + + +
    +

    neuralpp::NetworkFileNotFoundException Member List

    This is the complete list of members for neuralpp::NetworkFileNotFoundException, including all inherited members.

    + + +
    NetworkFileNotFoundException()neuralpp::NetworkFileNotFoundException [inline]
    what() const neuralpp::NetworkFileNotFoundException [inline]

    +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  + +doxygen 1.5.6
    + + diff --git a/doc/html/classneuralpp_1_1NetworkFileNotFoundException.html b/doc/html/classneuralpp_1_1NetworkFileNotFoundException.html new file mode 100644 index 0000000..e9598a5 --- /dev/null +++ b/doc/html/classneuralpp_1_1NetworkFileNotFoundException.html @@ -0,0 +1,95 @@ + + +Neural++: neuralpp::NetworkFileNotFoundException Class Reference + + + + + +
    +

    neuralpp::NetworkFileNotFoundException Class Reference

    Exception thrown when doing an attempt to load a network from an invalid file. +More... +

    +#include <neural++_exception.hpp> +

    + +

    +List of all members. + + + + + + +

    Public Member Functions

     NetworkFileNotFoundException ()
    const char * what () const throw ()
    +


    Detailed Description

    +Exception thrown when doing an attempt to load a network from an invalid file.
    Examples:
    + +

    +examples/doAdd.cpp.


    Constructor & Destructor Documentation

    + +
    +
    + + + + + + + + +
    neuralpp::NetworkFileNotFoundException::NetworkFileNotFoundException (  )  [inline]
    +
    +
    + +

    + +

    +

    +


    Member Function Documentation

    + +
    +
    + + + + + + + + +
    const char* neuralpp::NetworkFileNotFoundException::what (  )  const throw () [inline]
    +
    +
    + +

    +

    Examples:
    +examples/doAdd.cpp.
    +
    +

    +


    The documentation for this class was generated from the following file: +
    +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  + +doxygen 1.5.6
    + + diff --git a/doc/html/classneuralpp_1_1NetworkFileWriteException-members.html b/doc/html/classneuralpp_1_1NetworkFileWriteException-members.html new file mode 100644 index 0000000..5041be2 --- /dev/null +++ b/doc/html/classneuralpp_1_1NetworkFileWriteException-members.html @@ -0,0 +1,34 @@ + + +Neural++: Member List + + + + + +
    +

    neuralpp::NetworkFileWriteException Member List

    This is the complete list of members for neuralpp::NetworkFileWriteException, including all inherited members.

    + + +
    NetworkFileWriteException()neuralpp::NetworkFileWriteException [inline]
    what() const neuralpp::NetworkFileWriteException [inline]

    +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  + +doxygen 1.5.6
    + + diff --git a/doc/html/classneuralpp_1_1NetworkFileWriteException.html b/doc/html/classneuralpp_1_1NetworkFileWriteException.html new file mode 100644 index 0000000..83044d6 --- /dev/null +++ b/doc/html/classneuralpp_1_1NetworkFileWriteException.html @@ -0,0 +1,91 @@ + + +Neural++: neuralpp::NetworkFileWriteException Class Reference + + + + + +
    +

    neuralpp::NetworkFileWriteException Class Reference

    Exception thrown when trying to write the network's information to a file that cannot be written. +More... +

    +#include <neural++_exception.hpp> +

    + +

    +List of all members. + + + + + + +

    Public Member Functions

     NetworkFileWriteException ()
    const char * what () const throw ()
    +


    Detailed Description

    +Exception thrown when trying to write the network's information to a file that cannot be written.

    Constructor & Destructor Documentation

    + +
    +
    + + + + + + + + +
    neuralpp::NetworkFileWriteException::NetworkFileWriteException (  )  [inline]
    +
    +
    + +

    + +

    +

    +


    Member Function Documentation

    + +
    +
    + + + + + + + + +
    const char* neuralpp::NetworkFileWriteException::what (  )  const throw () [inline]
    +
    +
    + +

    + +

    +

    +


    The documentation for this class was generated from the following file: +
    +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  + +doxygen 1.5.6
    + + diff --git a/doc/html/classneuralpp_1_1NetworkIndexOutOfBoundsException-members.html b/doc/html/classneuralpp_1_1NetworkIndexOutOfBoundsException-members.html new file mode 100644 index 0000000..9f56122 --- /dev/null +++ b/doc/html/classneuralpp_1_1NetworkIndexOutOfBoundsException-members.html @@ -0,0 +1,34 @@ + + +Neural++: Member List + + + + + +
    +

    neuralpp::NetworkIndexOutOfBoundsException Member List

    This is the complete list of members for neuralpp::NetworkIndexOutOfBoundsException, including all inherited members.

    + + +
    NetworkIndexOutOfBoundsException()neuralpp::NetworkIndexOutOfBoundsException [inline]
    what() const neuralpp::NetworkIndexOutOfBoundsException [inline]

    +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  + +doxygen 1.5.6
    + + diff --git a/doc/html/classneuralpp_1_1NetworkIndexOutOfBoundsException.html b/doc/html/classneuralpp_1_1NetworkIndexOutOfBoundsException.html new file mode 100644 index 0000000..617e786 --- /dev/null +++ b/doc/html/classneuralpp_1_1NetworkIndexOutOfBoundsException.html @@ -0,0 +1,91 @@ + + +Neural++: neuralpp::NetworkIndexOutOfBoundsException Class Reference + + + + + +
    +

    neuralpp::NetworkIndexOutOfBoundsException Class Reference

    Exception raised when trying to access a neuron whose index is larger than the number of neurons in the network. +More... +

    +#include <neural++_exception.hpp> +

    + +

    +List of all members. + + + + + + +

    Public Member Functions

     NetworkIndexOutOfBoundsException ()
    const char * what () const throw ()
    +


    Detailed Description

    +Exception raised when trying to access a neuron whose index is larger than the number of neurons in the network.

    Constructor & Destructor Documentation

    + +
    +
    + + + + + + + + +
    neuralpp::NetworkIndexOutOfBoundsException::NetworkIndexOutOfBoundsException (  )  [inline]
    +
    +
    + +

    + +

    +

    +


    Member Function Documentation

    + +
    +
    + + + + + + + + +
    const char* neuralpp::NetworkIndexOutOfBoundsException::what (  )  const throw () [inline]
    +
    +
    + +

    + +

    +

    +


    The documentation for this class was generated from the following file: +
    +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  + +doxygen 1.5.6
    + + diff --git a/doc/html/classneuralpp_1_1NeuralNet-members.html b/doc/html/classneuralpp_1_1NeuralNet-members.html index 9b22c03..2c506ff 100644 --- a/doc/html/classneuralpp_1_1NeuralNet-members.html +++ b/doc/html/classneuralpp_1_1NeuralNet-members.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -24,39 +25,42 @@

    neuralpp::NeuralNet Member List

    This is the complete list of members for neuralpp::NeuralNet, including all inherited members.

    - - + + - - + + + - + + - + - - - + + - + + - + - + + - +
    actv_fneuralpp::NeuralNet [private]
    closeXML(string &xml)neuralpp::NeuralNet [static]
    commitChanges(Layer *l)neuralpp::NeuralNet [private]
    closeXML(std::string &xml)neuralpp::NeuralNet [static]
    commitChanges(Layer &l)neuralpp::NeuralNet [private]
    epochsneuralpp::NeuralNet [private]
    error(double ex) const neuralpp::NeuralNet [private]
    exneuralpp::NeuralNet [private]
    error(double ex)neuralpp::NeuralNet [private]
    expectneuralpp::NeuralNet [private]
    expected() const neuralpp::NeuralNet
    file enum valueneuralpp::NeuralNet
    getExpected() const neuralpp::NeuralNet
    getOutput() const neuralpp::NeuralNet
    getOutputs()neuralpp::NeuralNet
    getOutputs()neuralpp::NeuralNet
    getThreshold() const neuralpp::NeuralNet
    hiddenneuralpp::NeuralNet
    initXML(string &xml)neuralpp::NeuralNet [static]
    initXML(std::string &xml)neuralpp::NeuralNet [static]
    inputneuralpp::NeuralNet
    l_rateneuralpp::NeuralNet [private]
    link()neuralpp::NeuralNet
    NeuralNet()neuralpp::NeuralNet [inline]
    NeuralNet(size_t in_size, size_t hidden_size, size_t out_size, double l, int e)neuralpp::NeuralNet
    NeuralNet(const string file)neuralpp::NeuralNet
    NeuralNet(size_t in_size, size_t hidden_size, size_t out_size, double(*actv)(double), double l, int e)neuralpp::NeuralNet
    NeuralNet(size_t in_size, size_t hidden_size, size_t out_size, double l, int e, double th=0.0, double(*a)(double)=__actv)neuralpp::NeuralNet
    NeuralNet(const std::string file)neuralpp::NeuralNet
    outputneuralpp::NeuralNet
    propagate()neuralpp::NeuralNet
    ref_epochsneuralpp::NeuralNet [private]
    save(const char *fname)neuralpp::NeuralNet
    setExpected(double ex)neuralpp::NeuralNet
    setInput(vector< double > &v)neuralpp::NeuralNet
    setExpected(std::vector< double > ex)neuralpp::NeuralNet
    setInput(std::vector< double > v)neuralpp::NeuralNet
    source enum nameneuralpp::NeuralNet
    split(char delim, string str)neuralpp::NeuralNet [static]
    split(char delim, std::string str)neuralpp::NeuralNet [static]
    str enum valueneuralpp::NeuralNet
    train(string xml, source src)neuralpp::NeuralNet
    thresholdneuralpp::NeuralNet [private]
    train(std::string xml, source src)neuralpp::NeuralNet
    update()neuralpp::NeuralNet
    updateWeights()neuralpp::NeuralNet [private]
    XMLFromSet(int id, string set)neuralpp::NeuralNet [static]
    XMLFromSet(int &id, std::string set)neuralpp::NeuralNet [static]

    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/classneuralpp_1_1NeuralNet.html b/doc/html/classneuralpp_1_1NeuralNet.html index 19474f0..b2b2f79 100644 --- a/doc/html/classneuralpp_1_1NeuralNet.html +++ b/doc/html/classneuralpp_1_1NeuralNet.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -43,58 +44,64 @@  NeuralNet ()  Empty constructor for the class - it just makes nothing.
    NeuralNet (size_t in_size, size_t hidden_size, size_t out_size, double l, int e) + NeuralNet (size_t in_size, size_t hidden_size, size_t out_size, double l, int e, double th=0.0, double(*a)(double)=__actv) - Constructor.
    NeuralNet (const string file) throw (NetworkFileNotFoundException) + Constructor.
    NeuralNet (const std::string file) throw (NetworkFileNotFoundException) - Constructor.
    NeuralNet (size_t in_size, size_t hidden_size, size_t out_size, double(*actv)(double), double l, int e) - - Constructor.
    + Constructor.
    double getOutput () const  It gets the output of the network (note: the layer output should contain an only neuron).
    -vector< double > getOutputs () +double getThreshold () const - It gets the output of the network in case the output layer contains more neurons.
    + Get the threshold of the neurons in the network.
    +std::vector< double > getOutputs () + + It gets the output of the network in case the output layer contains more neurons.
    double expected () const - It gets the value expected.
    -void setExpected (double ex) + Get the expected value (in case you have an only neuron in output layer).
    +std::vector< double > getExpected () const - It sets the value you expect from your network.
    + Get the expected value (in case you have an only neuron in output layer).
    +void setExpected (double ex) + + It sets the value you expect from your network (in case the network has an only neuron in its output layer).
    +void setExpected (std::vector< double > ex) + + Set the values you expect from your network.
    void update ()  It updates through back-propagation the weights of the synapsis and computes again the output value for epochs times, calling back updateWeights and commitChanges functions.
    void propagate ()  It propagates values through the network.
    -void setInput (vector< double > &v) +void setInput (std::vector< double > v) - It sets the input for the network.
    + It sets the input for the network.
    void link ()  It links the layers of the network (input, hidden, output).
    void save (const char *fname) throw (NetworkFileWriteException)  Save a trained neural network to a binary file.
    -void train (string xml, source src) throw (InvalidXMLException) +void train (std::string xml, source src) throw (InvalidXMLException) - Train a network using a training set loaded from an XML file.
    + Train a network using a training set loaded from an XML file.

    Static Public Member Functions

    -static void initXML (string &xml) +static void initXML (std::string &xml) - Initialize the training XML for the neural network.
    -static vector< double > split (char delim, string str) + Initialize the training XML for the neural network.
    +static std::vector< double > split (char delim, std::string str) - Splits a string into a vector of doubles, given a delimitator.
    -static string XMLFromSet (int id, string set) + Splits a string into a vector of doubles, given a delimitator.
    +static std::string XMLFromSet (int &id, std::string set) - Get a training set from a string and copies it to an XML For example, these strings could be training sets for making sums: "2,3;5" - "5,6;11" - "2,2;4" - "4,5:9" This method called on the first string will return an XML such this: '<training id="0"><input id="0">2</input><input id="1">3</input><output id="0">5</output> &lt/training>'.
    -static void closeXML (string &xml) + Get a training set from a string and copies it to an XML For example, these strings could be training sets for making sums: "2,3;5" - "5,6;11" - "2,2;4" - "4,5:9" This method called on the first string will return an XML such this: '<training id="0"><input id="0">2</input><input id="1">3</input><output id="0">5</output> &lt/training>'.
    +static void closeXML (std::string &xml) - Closes an open XML document generated by "initXML" and "XMLFromSet".
    + Closes an open XML document generated by "initXML" and "XMLFromSet".

    Public Attributes

    Layerinput @@ -106,12 +113,12 @@ void updateWeights ()  It updates the weights of the net's synapsis through back-propagation.
    -void commitChanges (Layer *l) +void commitChanges (Layer &l) - It commits the changes made by updateWeights() to the layer l.
    -double error (double ex) const + It commits the changes made by updateWeights() to the layer l.
    +double error (double ex) - Get the error made on the expected result as |v-v'|/v.
    + Get the error made on the expected result as squared deviance.

    Private Attributes

    int epochs @@ -119,7 +126,9 @@ double l_rate -double ex +double threshold + +std::vector< double > expect double(* actv_f )(double) @@ -128,7 +137,10 @@

    Detailed Description

    Main project's class.

    -Use *ONLY* this class, unless you know what you're doing


    Member Enumeration Documentation

    +Use *ONLY* this class, unless you know what you're doing
    Examples:
    + +

    +examples/adderFromScratch.cpp, examples/doAdd.cpp, and examples/learnAdd.cpp.


    Member Enumeration Documentation

    @@ -176,7 +188,7 @@ Empty constructor for the class - it just makes nothing.

    - +

    @@ -208,7 +220,19 @@ Empty constructor for the class - it just makes nothing. - + + + + + + + + + + + + + @@ -229,22 +253,24 @@ Constructor. + +
    int  e  e,
    double  th = 0.0,
    double(*)(double)  a = __actv 
    out_size Size of the output layer
    l learn rate (get it after doing some experiments, but generally try to keep its value quite low to be more accurate)
    e Epochs (cycles) to execute (the most you execute, the most the network can be accurate for its purpose)
    th Threshold, value in [0,1] that establishes how much a neuron must be 'sensitive' on variations of the input values
    a Activation function to use (default: f(x)=x)

    - +

    - + - +
    neuralpp::NeuralNet::NeuralNet (const string const std::string  file  )  throw (NetworkFileNotFoundException) throw (NetworkFileNotFoundException)
    @@ -260,72 +286,7 @@ Constructor.
    Exceptions:
    - -
    NetworkFileNotFoundException 
    -
    - -
    -

    - -

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    neuralpp::NeuralNet::NeuralNet (size_t  in_size,
    size_t  hidden_size,
    size_t  out_size,
    double(*)(double)  actv,
    double  l,
    int  e 
    )
    -
    -
    - -

    -Constructor. -

    -

    Parameters:
    - - - - - - - +
    in_size Size of the input layer
    hidden_size Size of the hidden layer
    out_size Size of the output layer
    actv Activation function to use (default: f(x)=x)
    l learn rate (get it after doing some experiments, but generally try to keep its value quite low to be more accurate)
    e Epochs (cycles) to execute (the most you execute, the most the network can be accurate for its purpose)
    NetworkFileNotFoundException 
    @@ -353,14 +314,14 @@ It updates the weights of the net's synapsis through back-propagation. In-class use only

    - +

    - + @@ -380,7 +341,7 @@ In-class use only
    Parameters:

    - +

    void neuralpp::NeuralNet::commitChanges (LayerLayer l  )  [private]
    @@ -390,14 +351,14 @@ In-class use only
    Parameters:
    - +
    double  ex  )  const [private] [private]

    -Get the error made on the expected result as |v-v'|/v. +Get the error made on the expected result as squared deviance.

    Parameters:
    @@ -427,15 +388,38 @@ Get the error made on the expected result as |v-v'|/v. It gets the output of the network (note: the layer output should contain an only neuron).

    Returns:
    The output value of the network
    - +
    Examples:
    +examples/doAdd.cpp.

    - +

    - + + + + + + +
    vector<double> neuralpp::NeuralNet::getOutputs double neuralpp::NeuralNet::getThreshold (  )  const
    +
    +
    + +

    +Get the threshold of the neurons in the network. +

    +

    Returns:
    The threshold of the neurons
    + +
    +

    + +

    +
    + + + @@ -449,7 +433,8 @@ It gets the output of the network (note: the layer output should contain an only It gets the output of the network in case the output layer contains more neurons.

    Returns:
    A vector containing the output values of the network
    - +
    Examples:
    +examples/adderFromScratch.cpp.

    @@ -468,7 +453,29 @@ It gets the output of the network in case the output layer contains more neurons

    -It gets the value expected. +Get the expected value (in case you have an only neuron in output layer). +

    +Of course you should specify this when you build your network by using setExpected.

    Returns:
    The expected output value for a certain training phase
    + +
    +

    + +

    +
    +
    std::vector<double> neuralpp::NeuralNet::getOutputs (  ) 
    + + + + + + + +
    std::vector<double> neuralpp::NeuralNet::getExpected (  )  const
    +
    +
    + +

    +Get the expected value (in case you have an only neuron in output layer).

    Of course you should specify this when you build your network by using setExpected.

    Returns:
    The expected output value for a certain training phase
    @@ -491,7 +498,7 @@ Of course you should specify this when you build your network by using setExpect

    -It sets the value you expect from your network. +It sets the value you expect from your network (in case the network has an only neuron in its output layer).

    Parameters:
    @@ -499,6 +506,33 @@ It sets the value you expect from your network.
    +
    +

    + +

    +
    + + + + + + + + + +
    void neuralpp::NeuralNet::setExpected (std::vector< double >  ex  ) 
    +
    +
    + +

    +Set the values you expect from your network. +

    +

    Parameters:
    + + +
    ex Expected output values
    +
    +

    @@ -540,17 +574,18 @@ It updates through back-propagation the weights of the synapsis and computes aga

    It propagates values through the network.

    -Use this when you want to give an already trained network some new values the get to the output +Use this when you want to give an already trained network some new values the get to the output

    Examples:
    +examples/adderFromScratch.cpp, and examples/doAdd.cpp.

    - +

    - + @@ -567,7 +602,8 @@ It sets the input for the network.
    void neuralpp::NeuralNet::setInput (vector< double > & std::vector< double >  v  ) 
    v Vector of doubles, containing the values to give to your network
    - +
    Examples:
    +examples/adderFromScratch.cpp, and examples/doAdd.cpp.

    @@ -601,7 +637,7 @@ Don't use unless you exactly know what you're doing, it is already called by the const char *  fname  )  - throw (NetworkFileWriteException) + throw (NetworkFileWriteException) @@ -617,20 +653,21 @@ Save a trained neural network to a binary file.

    Exceptions:
    - +
    NetworkFileWriteException When you get an error writing the network's information to a file
    NetworkFileWriteException When you get an error writing the network's information to a file
    - +
    Examples:
    +examples/learnAdd.cpp.

    - +

    - + @@ -642,7 +679,7 @@ Save a trained neural network to a binary file. - +
    void neuralpp::NeuralNet::train (string std::string  xml,
    ) throw (InvalidXMLException) throw (InvalidXMLException)
    @@ -659,20 +696,21 @@ A sample XML file is available in examples/adder.xml
    Paramete
    Exceptions:
    - +
    InvalidXMLException 
    InvalidXMLException 
    - +
    Examples:
    +examples/adderFromScratch.cpp, and examples/learnAdd.cpp.

    - +

    - + @@ -692,12 +730,12 @@ Initialize the training XML for the neural network.

    - +

    static void neuralpp::NeuralNet::initXML (string & std::string &  xml  )  [static]
    - + @@ -705,7 +743,7 @@ Initialize the training XML for the neural network. - + @@ -730,20 +768,20 @@ Splits a string into a vector of doubles, given a delimitator.

    - +

    static vector<double> neuralpp::NeuralNet::split static std::vector<double> neuralpp::NeuralNet::split ( char  delim,
    string std::string  str 
    - + - + - + @@ -768,14 +806,14 @@ Get a training set from a string and copies it to an XML For example, these stri

    - +

    static string neuralpp::NeuralNet::XMLFromSet static std::string neuralpp::NeuralNet::XMLFromSet (int int &  id,
    string std::string  set 
    - + @@ -841,12 +879,27 @@ Closes an open XML document generated by "initXML" and "XMLFromSet".

    - +

    static void neuralpp::NeuralNet::closeXML (string & std::string &  xml  )  [static]
    - + + +
    double neuralpp::NeuralNet::ex [private] double neuralpp::NeuralNet::threshold [private]
    +
    +
    + +

    + +

    +

    + +

    +
    + + +
    std::vector<double> neuralpp::NeuralNet::expect [private]
    @@ -921,7 +974,7 @@ Private pointer to function, containing the function to be used as activation fu
    The documentation for this class was generated from the following file:
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/classneuralpp_1_1Neuron-members.html b/doc/html/classneuralpp_1_1Neuron-members.html index 9cf0b19..87dfe46 100644 --- a/doc/html/classneuralpp_1_1Neuron-members.html +++ b/doc/html/classneuralpp_1_1Neuron-members.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -27,23 +28,24 @@ actv_valneuralpp::Neuron [private] getActv()neuralpp::Neuron getProp()neuralpp::Neuron - inneuralpp::Neuron [private] - Neuron(double(*a)(double))neuralpp::Neuron - Neuron(vector< Synapsis > in, vector< Synapsis > out, double(*a)(double))neuralpp::Neuron + inneuralpp::Neuron [private] + Neuron(double(*a)(double), double th=0.0)neuralpp::Neuron + Neuron(std::vector< Synapsis > in, std::vector< Synapsis > out, double(*a)(double), double th=0.0)neuralpp::Neuron nIn()neuralpp::Neuron nOut()neuralpp::Neuron - outneuralpp::Neuron [private] + outneuralpp::Neuron [private] prop_valneuralpp::Neuron [private] - propagate()neuralpp::Neuron - push_in(Synapsis &s)neuralpp::Neuron - push_out(Synapsis &s)neuralpp::Neuron + propagate()neuralpp::Neuron + push_in(Synapsis s)neuralpp::Neuron + push_out(Synapsis s)neuralpp::Neuron setActv(double a)neuralpp::Neuron setProp(double p)neuralpp::Neuron synClear()neuralpp::Neuron synIn(size_t i)neuralpp::Neuron synOut(size_t i)neuralpp::Neuron + thresholdneuralpp::Neuron [private]
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/classneuralpp_1_1Neuron.html b/doc/html/classneuralpp_1_1Neuron.html index 7876daf..f7d733f 100644 --- a/doc/html/classneuralpp_1_1Neuron.html +++ b/doc/html/classneuralpp_1_1Neuron.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -34,24 +35,24 @@ List of all members. - + - - + + - + - + - - + + - + @@ -64,9 +65,9 @@ - + - + @@ -81,9 +82,11 @@ - + - + + + @@ -92,7 +95,7 @@ Class for managing neurons.

    Don't use this class directly unless you know what you're doing, use NeuralNet instead


    Constructor & Destructor Documentation

    - +

    Public Member Functions

     Neuron (double(*a)(double))
     Neuron (double(*a)(double), double th=0.0)
     Constructor.
     Neuron (vector< Synapsis > in, vector< Synapsis > out, double(*a)(double))
     Constructor.
     Neuron (std::vector< Synapsis > in, std::vector< Synapsis > out, double(*a)(double), double th=0.0)
     Alternative constructor, that gets also the synapsis linked to the neuron.
     Alternative constructor, that gets also the synapsis linked to the neuron.
    SynapsissynIn (size_t i)
     Get the i-th synapsis connected on the input of the neuron.
    SynapsissynOut (size_t i)
     Get the i-th synapsis connected on the output of the neuron.
    void push_in (Synapsis &s)
    void push_in (Synapsis s)
     It pushes a new input synapsis.
    void push_out (Synapsis &s)
     It pushes a new input synapsis.
    void push_out (Synapsis s)
     It pushes a new output synapsis.
     It pushes a new output synapsis.
    void setActv (double a)
     Change the activation value of the neuron.
    double getProp ()
     Get the propagation value of the neuron.
    double propagate ()
    void propagate ()
     It propagates its activation value to the connected neurons.
     Compute the propagation value of the neuron and set it.
    size_t nIn ()
     Get the number of input synapsis for the neuron.
    double prop_val
    vector< Synapsisin
    double threshold
    vector< Synapsisout
    std::vector< Synapsisin
    std::vector< Synapsisout
    double(* actv_f )(double)
    @@ -100,9 +103,18 @@ Don't use this class directly unless you know what you're doing, use neuralpp::Neuron::Neuron - - + + + + + + + + + + +
    ( double(*)(double)  a  )  a,
    double  th = 0.0 
    )
    @@ -114,32 +126,39 @@ Constructor.
    Parameters:
    +
    a Activation function
    th Threshold, value in [0,1] that establishes how much a neuron must be 'sensitive' on variations of the input values

    - +

    - + - + - + + + + + + + @@ -158,6 +177,7 @@ Alternative constructor, that gets also the synapsis linked to the neuron. +
    neuralpp::Neuron::Neuron (vector< Synapsisstd::vector< Synapsis in,
    vector< Synapsisstd::vector< Synapsis out,
    double(*)(double)  a  a,
    double  th = 0.0 
    in Input synapses
    out Output synapses
    a Activation function
    th Threshold, value in [0,1] that establishes how much a neuron must be 'sensitive' on variations of the input values
    @@ -220,14 +240,14 @@ Get the i-th synapsis connected on the output of the neuron.

    - +

    - + @@ -247,14 +267,14 @@ It pushes a new input synapsis.

    - +

    void neuralpp::Neuron::push_in (SynapsisSynapsis  s  ) 
    - + @@ -372,12 +392,12 @@ Get the propagation value of the neuron.

    - +

    void neuralpp::Neuron::push_out (SynapsisSynapsis  s  ) 
    - + @@ -388,7 +408,7 @@ Get the propagation value of the neuron.

    -It propagates its activation value to the connected neurons. +Compute the propagation value of the neuron and set it.

    @@ -489,12 +509,12 @@ Remove input and output synapsis from a neuron.

    - +

    double neuralpp::Neuron::propagate void neuralpp::Neuron::propagate (  ) 
    - +
    vector< Synapsis > neuralpp::Neuron::in [private] double neuralpp::Neuron::threshold [private]
    @@ -504,12 +524,27 @@ Remove input and output synapsis from a neuron.

    - +

    - + + +
    vector< Synapsis > neuralpp::Neuron::out [private] std::vector< Synapsis > neuralpp::Neuron::in [private]
    +
    +
    + +

    + +

    +

    + +

    +
    + + +
    std::vector< Synapsis > neuralpp::Neuron::out [private]
    @@ -537,7 +572,7 @@ Remove input and output synapsis from a neuron.
    The documentation for this class was generated from the following file:
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/classneuralpp_1_1Synapsis-members.html b/doc/html/classneuralpp_1_1Synapsis-members.html index 8ac38b0..95d5289 100644 --- a/doc/html/classneuralpp_1_1Synapsis-members.html +++ b/doc/html/classneuralpp_1_1Synapsis-members.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -25,13 +26,13 @@

    neuralpp::Synapsis Member List

    This is the complete list of members for neuralpp::Synapsis, including all inherited members.

    - - - - - + + + + + - + @@ -41,7 +42,7 @@
    actv_fneuralpp::Synapsis [private]
    deltaneuralpp::Synapsis [private]
    getDelta()neuralpp::Synapsis
    getIn()neuralpp::Synapsis
    getOut()neuralpp::Synapsis
    getPrevDelta()neuralpp::Synapsis
    getWeight()neuralpp::Synapsis
    getDelta() const neuralpp::Synapsis
    getIn() const neuralpp::Synapsis
    getOut() const neuralpp::Synapsis
    getPrevDelta() const neuralpp::Synapsis
    getWeight() const neuralpp::Synapsis
    inneuralpp::Synapsis [private]
    momentum(int N, int x)neuralpp::Synapsis
    momentum(int N, int x) const neuralpp::Synapsis
    outneuralpp::Synapsis [private]
    prev_deltaneuralpp::Synapsis [private]
    setDelta(double d)neuralpp::Synapsis
    Synapsis(Neuron *i, Neuron *o, double w, double(*a)(double))neuralpp::Synapsis
    weightneuralpp::Synapsis [private]

    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/classneuralpp_1_1Synapsis.html b/doc/html/classneuralpp_1_1Synapsis.html index 699c724..98cb71e 100644 --- a/doc/html/classneuralpp_1_1Synapsis.html +++ b/doc/html/classneuralpp_1_1Synapsis.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -43,9 +44,9 @@  Synapsis (Neuron *i, Neuron *o, double w, double(*a)(double))  Constructor.
    -NeurongetIn () +NeurongetIn () const -NeurongetOut () +NeurongetOut () const void setWeight (double w) throw (InvalidSynapticalWeightException) @@ -53,18 +54,18 @@ void setDelta (double d) throw (InvalidSynapticalWeightException)  It sets the delta (how much to change the weight after an update) of the synapsis.
    -double getWeight () +double getWeight () const - Return the weight of the synapsis.
    -double getDelta () + Return the weight of the synapsis.
    +double getDelta () const - Return the delta of the synapsis.
    -double getPrevDelta () + Return the delta of the synapsis.
    +double getPrevDelta () const - Get the delta of the synapsis at the previous iteration.
    -double momentum (int N, int x) + Get the delta of the synapsis at the previous iteration.
    +double momentum (int N, int x) const - Get the inertial momentum of a synapsis.
    + Get the inertial momentum of a synapsis.

    Private Attributes

    double delta @@ -230,7 +231,7 @@ Constructor.


    Member Function Documentation

    - +
    @@ -239,7 +240,7 @@ Constructor. - +
    (  )  const
    @@ -250,7 +251,7 @@ Constructor.

    - +

    @@ -259,7 +260,7 @@ Constructor. - +
    (  )  const
    @@ -280,7 +281,7 @@ Constructor. double  w  )  - throw (InvalidSynapticalWeightException) + throw (InvalidSynapticalWeightException)
    @@ -307,7 +308,7 @@ Set the weight of the synapsis. double  d  )  - throw (InvalidSynapticalWeightException) + throw (InvalidSynapticalWeightException) @@ -324,7 +325,7 @@ It sets the delta (how much to change the weight after an update) of the synapsi

    - +

    @@ -333,7 +334,7 @@ It sets the delta (how much to change the weight after an update) of the synapsi - +
    (  )  const
    @@ -346,7 +347,7 @@ Return the weight of the synapsis.

    - +

    @@ -355,7 +356,7 @@ Return the weight of the synapsis. - +
    (  )  const
    @@ -368,7 +369,7 @@ Return the delta of the synapsis.

    - +

    @@ -377,7 +378,7 @@ Return the delta of the synapsis. - +
    (  )  const
    @@ -390,7 +391,7 @@ Get the delta of the synapsis at the previous iteration.

    - +

    @@ -409,7 +410,7 @@ Get the delta of the synapsis at the previous iteration. - +
    ) const
    @@ -522,7 +523,7 @@ This value is inversely proportional to the number of steps done in the learning
    The documentation for this class was generated from the following file:
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/examples.html b/doc/html/examples.html new file mode 100644 index 0000000..f8793be --- /dev/null +++ b/doc/html/examples.html @@ -0,0 +1,30 @@ + + +Neural++: Examples + + + + + +
    +

    Examples

    Here is a list of all examples: +
    +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  + +doxygen 1.5.6
    + + diff --git a/doc/html/examples_2adderFromScratch_8cpp-example.html b/doc/html/examples_2adderFromScratch_8cpp-example.html new file mode 100644 index 0000000..50ee45a --- /dev/null +++ b/doc/html/examples_2adderFromScratch_8cpp-example.html @@ -0,0 +1,66 @@ + + +Neural++: examples/adderFromScratch.cpp + + + + + +
    +

    examples/adderFromScratch.cpp

    Similar to learnAdd.cpp, but this time the training XML is generated as a string and not saved to a file, and parsed by the program itself to build the network. Then, the program asks two real numbers, and performs both the sum and the difference between them, putting the sum's output on the first output neuron and the difference's on the second output neuron. Anyway, using more than one neuron in the output layer is strongly discouraged, as the network usually won't set correctly the synaptical weights to give satisfying and accurate answers for all of the operations.

    +

    +#include <iostream>
    +#include <neural++.hpp>
    +
    +using namespace std;
    +using namespace neuralpp;
    +
    +int main()  {
    +        NeuralNet net(2, 2, 2, 0.005, 100);
    +        string xml;
    +        double tmp;
    +        int id = 0;
    +
    +        // XML initialization. Then, I say XML that 2+3=5, 3+3=6, 5+4=9
    +        // Strings' format is "input1,input2,...,inputn;output1,output2,...,outputm
    +        NeuralNet::initXML(xml);
    +        xml += NeuralNet::XMLFromSet(id, "3,2;5,1");
    +        xml += NeuralNet::XMLFromSet(id, "4,2;6,2");
    +        xml += NeuralNet::XMLFromSet(id, "6,3;9,3");
    +        NeuralNet::closeXML(xml);
    +        cout << xml << endl;
    +        
    +        net.train(xml, NeuralNet::str);
    +        vector<double> v;
    +        cout << "Network status: trained\n\n";
    +
    +        cout << "First number to add: ";
    +        cin >> tmp;
    +        v.push_back(tmp);
    +
    +        cout << "Second number to add: ";
    +        cin >> tmp;
    +        v.push_back(tmp);
    +
    +        net.setInput(v);
    +        net.propagate();
    +        cout << "Output: " << net.getOutputs()[0] << "; " << net.getOutputs()[1] << endl;
    +        return 0;
    +}
    +
    +
    +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  + +doxygen 1.5.6
    + + diff --git a/doc/html/examples_2doAdd_8cpp-example.html b/doc/html/examples_2doAdd_8cpp-example.html new file mode 100644 index 0000000..4bd7c74 --- /dev/null +++ b/doc/html/examples_2doAdd_8cpp-example.html @@ -0,0 +1,68 @@ + + +Neural++: examples/doAdd.cpp + + + + + +
    +

    examples/doAdd.cpp

    Show how to use a network already trained and saved to a binary file. In this case, a network trained to simply perform sums between two real numbers, that should have already been created using learnAdd.

    +

    +#include <iostream>
    +#include <neural++.hpp>
    +
    +using namespace std;
    +using namespace neuralpp;
    +
    +#define NETFILE "adder.net"
    +
    +int main()  {
    +        double a,b;
    +        NeuralNet net;
    +
    +        // Load the pre-trained network from "adder.net" file
    +        try  {
    +                net = NeuralNet(NETFILE);
    +        }
    +
    +        catch (NetworkFileNotFoundException e)  {
    +                cerr << "Fatal error while opening " << NETFILE << ": " << e.what();
    +                return 1;
    +        }
    +
    +        cout << "First number to add: ";
    +        cin >> a;
    +
    +        cout << "Second number to add: ";
    +        cin >> b;
    +
    +        vector<double> v;
    +        v.push_back(a);
    +        v.push_back(b);
    +
    +        // Set the numbers just read as input values, propagate those values, and get
    +        // the output
    +        net.setInput(v);
    +        net.propagate();
    +        cout << "Neural net output: " << net.getOutput() << endl;
    +
    +        return 0;
    +}
    +
    +
    +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  + +doxygen 1.5.6
    + + diff --git a/doc/html/examples_2learnAdd_8cpp-example.html b/doc/html/examples_2learnAdd_8cpp-example.html new file mode 100644 index 0000000..42a06c9 --- /dev/null +++ b/doc/html/examples_2learnAdd_8cpp-example.html @@ -0,0 +1,85 @@ + + +Neural++: examples/learnAdd.cpp + + + + + +
    +

    examples/learnAdd.cpp

    Show how to train a network that performs sums between two real numbers. The training XML is built from scratch, then saved to a file, then the network is initialized using that XML file, trained, and the resulting trained network is saved to adder.net. Then, you should take a look at doAdd.cpp to see how to use that file to use the network.

    +

    +#include <iostream>
    +#include <fstream>
    +#include <ctime>
    +#include <neural++.hpp>
    +
    +using namespace std;
    +using namespace neuralpp;
    +
    +int main()  {
    +        int id = 0;
    +        string xml;
    +        time_t t1, t2;
    +
    +        // Create the neural network. The network is going to have
    +        // => 2 neurons for the input layer
    +        // => 2 neurons for the hidden layer
    +        // => 1 neuron  for the output layer
    +        // => a learning rate == 0.005 (just get it doing some tests until satisfied)
    +        // => 1000 learning steps (i.e. the network will be ready after 1000 training steps to adjust the synaptical weights
    +        // => 0.1 as neural threshold (the threshold above which a neuron activates)
    +        NeuralNet net(2, 2, 1, 0.005, 1000, 0.1);
    +
    +        // Initialize a training XML as a string in 'xml'
    +        NeuralNet::initXML(xml);
    +
    +        // Build some training sets for the XML. The format is:
    +        // "input1,input2,...,inputn;output1,output2,...,outputn
    +        // The 'id' variable is passed as reference, starting from 0,
    +        // and it's used to enumerate the sets in the XML file.
    +        xml += NeuralNet::XMLFromSet(id, "2,3;5");
    +        xml += NeuralNet::XMLFromSet(id, "3,2;5");
    +        xml += NeuralNet::XMLFromSet(id, "6,2;8");
    +        xml += NeuralNet::XMLFromSet(id, "2,2;4");
    +        xml += NeuralNet::XMLFromSet(id, "1,2;3");
    +        xml += NeuralNet::XMLFromSet(id, "-1,-2;-3");
    +        xml += NeuralNet::XMLFromSet(id, "8,9;17");
    +        xml += NeuralNet::XMLFromSet(id, "10,10;20");
    +        NeuralNet::closeXML(xml);
    +
    +        // Save the XML string just created to a file
    +        ofstream out("adder.xml");
    +        out << xml;
    +        out.close();
    +        cout << "Training file adder.xml has been written\n";
    +
    +        // Start the training from the XML file
    +        t1 = time(NULL);
    +        cout << "Training in progress - This may take a while...\n";
    +        net.train("adder.xml", NeuralNet::file);
    +        t2 = time(NULL);
    +
    +        // Save the trained network to a binary file, that can be reloaded from any
    +        // application that is going to use that network
    +        net.save("adder.net");
    +        cout << "Network trained in " << (t2-t1) << " seconds. You can use adder.net file now to load this network\n";
    +        return 0;
    +}
    +
    +
    +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  + +doxygen 1.5.6
    + + diff --git a/doc/html/files.html b/doc/html/files.html index c4ab411..47d4825 100644 --- a/doc/html/files.html +++ b/doc/html/files.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -28,7 +29,7 @@ neural++_exception.hpp [code]
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions.html b/doc/html/functions.html index 9227a96..560d017 100644 --- a/doc/html/functions.html +++ b/doc/html/functions.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -93,7 +94,7 @@ Here is a list of all class members with links to the classes they belong to: : CMarkup
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x63.html b/doc/html/functions_0x63.html index 1888fac..97f2db7 100644 --- a/doc/html/functions_0x63.html +++ b/doc/html/functions_0x63.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -64,11 +65,11 @@ Here is a list of all class members with links to the classes they belong to:
  • ClearVirtualParent() : CMarkup::ElemPos
  • closeXML() -: neuralpp::NeuralNet +: neuralpp::NeuralNet
  • CMarkup() : CMarkup
  • commitChanges() -: neuralpp::NeuralNet +: neuralpp::NeuralNet
  • ContentLen() : CMarkup::ElemPos
  • ConvertEncoding() @@ -77,7 +78,7 @@ Here is a list of all class members with links to the classes they belong to: : CMarkup::NodeStack
  • -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x64.html b/doc/html/functions_0x64.html index c45f500..bd78e0a 100644 --- a/doc/html/functions_0x64.html +++ b/doc/html/functions_0x64.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -70,7 +71,7 @@ Here is a list of all class members with links to the classes they belong to: : CMarkup
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x65.html b/doc/html/functions_0x65.html index 7d6dd04..f733c8f 100644 --- a/doc/html/functions_0x65.html +++ b/doc/html/functions_0x65.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -59,7 +60,7 @@ Here is a list of all class members with links to the classes they belong to:

    - e -

    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x66.html b/doc/html/functions_0x66.html index 2695797..c8f46db 100644 --- a/doc/html/functions_0x66.html +++ b/doc/html/functions_0x66.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -72,7 +73,7 @@ Here is a list of all class members with links to the classes they belong to: : CMarkup::FilePos
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x67.html b/doc/html/functions_0x67.html index 3d6fb23..f915335 100644 --- a/doc/html/functions_0x67.html +++ b/doc/html/functions_0x67.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -77,7 +78,7 @@ Here is a list of all class members with links to the classes they belong to:
  • GetDeclaredEncoding() : CMarkup
  • getDelta() -: neuralpp::Synapsis +: neuralpp::Synapsis
  • GetDoc() : CMarkup
  • GetDocFlags() @@ -86,18 +87,20 @@ Here is a list of all class members with links to the classes they belong to: : CMarkup
  • GetError() : CMarkup +
  • getExpected() +: neuralpp::NeuralNet
  • getIn() -: neuralpp::Synapsis +: neuralpp::Synapsis
  • GetNodeType() : CMarkup
  • getOut() -: neuralpp::Synapsis +: neuralpp::Synapsis
  • getOutput() : neuralpp::NeuralNet
  • getOutputs() -: neuralpp::NeuralNet +: neuralpp::NeuralNet
  • getPrevDelta() -: neuralpp::Synapsis +: neuralpp::Synapsis
  • getProp() : neuralpp::Neuron
  • GetSize() @@ -106,11 +109,13 @@ Here is a list of all class members with links to the classes they belong to: : CMarkup
  • GetTagName() : CMarkup +
  • getThreshold() +: neuralpp::NeuralNet
  • getWeight() -: neuralpp::Synapsis +: neuralpp::Synapsis
  • -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x68.html b/doc/html/functions_0x68.html index befbb28..b90465b 100644 --- a/doc/html/functions_0x68.html +++ b/doc/html/functions_0x68.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -64,7 +65,7 @@ Here is a list of all class members with links to the classes they belong to: : neuralpp::netrecord
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x69.html b/doc/html/functions_0x69.html index 17e83c2..dcfc975 100644 --- a/doc/html/functions_0x69.html +++ b/doc/html/functions_0x69.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -68,11 +69,11 @@ Here is a list of all class members with links to the classes they belong to: : CMarkup::ElemPos
  • in : neuralpp::Synapsis -, neuralpp::Neuron +, neuralpp::Neuron
  • InitDocFlags() : CMarkup
  • initXML() -: neuralpp::NeuralNet +: neuralpp::NeuralNet
  • input : neuralpp::NeuralNet
  • input_size @@ -89,6 +90,10 @@ Here is a list of all class members with links to the classes they belong to: : CMarkup
  • IntoElem() : CMarkup +
  • InvalidSynapticalWeightException() +: neuralpp::InvalidSynapticalWeightException +
  • InvalidXMLException() +: neuralpp::InvalidXMLException
  • iPos : CMarkup::SavedPos
  • IsEmptyElement() @@ -97,7 +102,7 @@ Here is a list of all class members with links to the classes they belong to: : CMarkup
  • -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x6c.html b/doc/html/functions_0x6c.html index 7503cb1..186aac3 100644 --- a/doc/html/functions_0x6c.html +++ b/doc/html/functions_0x6c.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -62,7 +63,7 @@ Here is a list of all class members with links to the classes they belong to: : neuralpp::NeuralNet , neuralpp::netrecord
  • Layer() -: neuralpp::Layer +: neuralpp::Layer
  • Length() : CMarkup::TokenPos
  • Level() @@ -74,7 +75,7 @@ Here is a list of all class members with links to the classes they belong to: : CMarkup
  • -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x6d.html b/doc/html/functions_0x6d.html index c8d4e38..901ed6a 100644 --- a/doc/html/functions_0x6d.html +++ b/doc/html/functions_0x6d.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -167,10 +168,10 @@ Here is a list of all class members with links to the classes they belong to:
  • MNT_WHITESPACE : CMarkup
  • momentum() -: neuralpp::Synapsis +: neuralpp::Synapsis
  • -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x6e.html b/doc/html/functions_0x6e.html index 08f395e..4db9890 100644 --- a/doc/html/functions_0x6e.html +++ b/doc/html/functions_0x6e.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -62,10 +63,16 @@ Here is a list of all class members with links to the classes they belong to: : CMarkup::FilePos
  • nEndTagLen : CMarkup::ElemPos +
  • NetworkFileNotFoundException() +: neuralpp::NetworkFileNotFoundException +
  • NetworkFileWriteException() +: neuralpp::NetworkFileWriteException +
  • NetworkIndexOutOfBoundsException() +: neuralpp::NetworkIndexOutOfBoundsException
  • NeuralNet() -: neuralpp::NeuralNet +: neuralpp::NeuralNet
  • Neuron() -: neuralpp::Neuron +: neuralpp::Neuron
  • nFailedChars : CMarkup::ConvertEncoding
  • nFileByteLen @@ -112,8 +119,8 @@ Here is a list of all class members with links to the classes they belong to:
  • nSegs : CMarkup::PosArray
  • nSize -: CMarkup::PosArray -, CMarkup::NodeStack +: CMarkup::NodeStack +, CMarkup::PosArray
  • nStart : CMarkup::NodePos , CMarkup::ElemPos @@ -127,7 +134,7 @@ Here is a list of all class members with links to the classes they belong to: : CMarkup::NodeStack
  • -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x6f.html b/doc/html/functions_0x6f.html index 905845c..1c8a17b 100644 --- a/doc/html/functions_0x6f.html +++ b/doc/html/functions_0x6f.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -67,7 +68,7 @@ Here is a list of all class members with links to the classes they belong to: , CMarkup::PosArray
  • out : neuralpp::Synapsis -, neuralpp::Neuron +, neuralpp::Neuron
  • OutOfElem() : CMarkup
  • output @@ -76,7 +77,7 @@ Here is a list of all class members with links to the classes they belong to: : neuralpp::netrecord
  • -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x70.html b/doc/html/functions_0x70.html index d173003..84a5d96 100644 --- a/doc/html/functions_0x70.html +++ b/doc/html/functions_0x70.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -81,7 +82,7 @@ Here is a list of all class members with links to the classes they belong to:
  • prop_val : neuralpp::Neuron
  • propagate() -: neuralpp::Neuron +: neuralpp::Neuron , neuralpp::Layer , neuralpp::NeuralNet
  • pSegs @@ -89,12 +90,12 @@ Here is a list of all class members with links to the classes they belong to:
  • pTable : CMarkup::SavedPosMap
  • push_in() -: neuralpp::Neuron +: neuralpp::Neuron
  • push_out() -: neuralpp::Neuron +: neuralpp::Neuron
  • -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x72.html b/doc/html/functions_0x72.html index bd2f8c0..839fd40 100644 --- a/doc/html/functions_0x72.html +++ b/doc/html/functions_0x72.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -85,7 +86,7 @@ Here is a list of all class members with links to the classes they belong to: : CMarkup
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x73.html b/doc/html/functions_0x73.html index d37dc35..d9d49c6 100644 --- a/doc/html/functions_0x73.html +++ b/doc/html/functions_0x73.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -58,10 +59,10 @@ Here is a list of all class members with links to the classes they belong to:

    - s -

    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x74.html b/doc/html/functions_0x74.html index a3b2fd4..7ee0df2 100644 --- a/doc/html/functions_0x74.html +++ b/doc/html/functions_0x74.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -58,6 +59,10 @@ Here is a list of all class members with links to the classes they belong to:

    - t -

    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x75.html b/doc/html/functions_0x75.html index b054513..2cdfba0 100644 --- a/doc/html/functions_0x75.html +++ b/doc/html/functions_0x75.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -74,7 +75,7 @@ Here is a list of all class members with links to the classes they belong to: : CMarkup
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x77.html b/doc/html/functions_0x77.html index e5741db..359d56f 100644 --- a/doc/html/functions_0x77.html +++ b/doc/html/functions_0x77.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -62,11 +63,17 @@ Here is a list of all class members with links to the classes they belong to: : neuralpp::synrecord
  • weight : neuralpp::Synapsis +
  • what() +: neuralpp::InvalidSynapticalWeightException +, neuralpp::NetworkIndexOutOfBoundsException +, neuralpp::InvalidXMLException +, neuralpp::NetworkFileWriteException +, neuralpp::NetworkFileNotFoundException
  • WriteTextFile() : CMarkup
  • -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x78.html b/doc/html/functions_0x78.html index 1bca7ae..1f2beee 100644 --- a/doc/html/functions_0x78.html +++ b/doc/html/functions_0x78.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -161,10 +162,10 @@ Here is a list of all class members with links to the classes they belong to:
  • x_WriteText() : CMarkup
  • XMLFromSet() -: neuralpp::NeuralNet +: neuralpp::NeuralNet
  • -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x7e.html b/doc/html/functions_0x7e.html index c88e001..4f6c270 100644 --- a/doc/html/functions_0x7e.html +++ b/doc/html/functions_0x7e.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -70,7 +71,7 @@ Here is a list of all class members with links to the classes they belong to: : CMarkup::SavedPosMapArray
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_enum.html b/doc/html/functions_enum.html index 8af47f7..a0d861e 100644 --- a/doc/html/functions_enum.html +++ b/doc/html/functions_enum.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -46,7 +47,7 @@ : neuralpp::NeuralNet
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_eval.html b/doc/html/functions_eval.html index ac681b4..cb3e3af 100644 --- a/doc/html/functions_eval.html +++ b/doc/html/functions_eval.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -136,7 +137,7 @@ : neuralpp::NeuralNet
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func.html b/doc/html/functions_func.html index dfc1784..d48e878 100644 --- a/doc/html/functions_func.html +++ b/doc/html/functions_func.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -83,7 +84,7 @@ : CMarkup
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x63.html b/doc/html/functions_func_0x63.html index 92c9702..96f411e 100644 --- a/doc/html/functions_func_0x63.html +++ b/doc/html/functions_func_0x63.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -63,11 +64,11 @@
  • ClearVirtualParent() : CMarkup::ElemPos
  • closeXML() -: neuralpp::NeuralNet +: neuralpp::NeuralNet
  • CMarkup() : CMarkup
  • commitChanges() -: neuralpp::NeuralNet +: neuralpp::NeuralNet
  • ContentLen() : CMarkup::ElemPos
  • ConvertEncoding() @@ -76,7 +77,7 @@ : CMarkup::NodeStack
  • -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x64.html b/doc/html/functions_func_0x64.html index 5c1e1d5..22d262d 100644 --- a/doc/html/functions_func_0x64.html +++ b/doc/html/functions_func_0x64.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -65,7 +66,7 @@ : CMarkup
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x65.html b/doc/html/functions_func_0x65.html index c85e630..c12f282 100644 --- a/doc/html/functions_func_0x65.html +++ b/doc/html/functions_func_0x65.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -66,14 +67,14 @@
  • EndTagLen() : CMarkup::ElemPos
  • error() -: neuralpp::NeuralNet +: neuralpp::NeuralNet
  • EscapeText() : CMarkup
  • expected() : neuralpp::NeuralNet
  • -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x66.html b/doc/html/functions_func_0x66.html index 9b049d2..4ee0407 100644 --- a/doc/html/functions_func_0x66.html +++ b/doc/html/functions_func_0x66.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -67,7 +68,7 @@ : CMarkup
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x67.html b/doc/html/functions_func_0x67.html index 15bf42a..2fc538c 100644 --- a/doc/html/functions_func_0x67.html +++ b/doc/html/functions_func_0x67.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -76,7 +77,7 @@
  • GetDeclaredEncoding() : CMarkup
  • getDelta() -: neuralpp::Synapsis +: neuralpp::Synapsis
  • GetDoc() : CMarkup
  • GetDocFlags() @@ -85,18 +86,20 @@ : CMarkup
  • GetError() : CMarkup +
  • getExpected() +: neuralpp::NeuralNet
  • getIn() -: neuralpp::Synapsis +: neuralpp::Synapsis
  • GetNodeType() : CMarkup
  • getOut() -: neuralpp::Synapsis +: neuralpp::Synapsis
  • getOutput() : neuralpp::NeuralNet
  • getOutputs() -: neuralpp::NeuralNet +: neuralpp::NeuralNet
  • getPrevDelta() -: neuralpp::Synapsis +: neuralpp::Synapsis
  • getProp() : neuralpp::Neuron
  • GetSize() @@ -105,11 +108,13 @@ : CMarkup
  • GetTagName() : CMarkup +
  • getThreshold() +: neuralpp::NeuralNet
  • getWeight() -: neuralpp::Synapsis +: neuralpp::Synapsis
  • -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x69.html b/doc/html/functions_func_0x69.html index cd11add..5c00476 100644 --- a/doc/html/functions_func_0x69.html +++ b/doc/html/functions_func_0x69.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -60,7 +61,7 @@
  • InitDocFlags() : CMarkup
  • initXML() -: neuralpp::NeuralNet +: neuralpp::NeuralNet
  • InsertChildElem() : CMarkup
  • InsertChildSubDoc() @@ -73,13 +74,17 @@ : CMarkup
  • IntoElem() : CMarkup +
  • InvalidSynapticalWeightException() +: neuralpp::InvalidSynapticalWeightException +
  • InvalidXMLException() +: neuralpp::InvalidXMLException
  • IsEmptyElement() : CMarkup::ElemPos
  • IsWellFormed() : CMarkup
  • -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x6c.html b/doc/html/functions_func_0x6c.html index 50c4e98..7190d8a 100644 --- a/doc/html/functions_func_0x6c.html +++ b/doc/html/functions_func_0x6c.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -58,7 +59,7 @@

    - l -

    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x6d.html b/doc/html/functions_func_0x6d.html index 8c69c88..8691ead 100644 --- a/doc/html/functions_func_0x6d.html +++ b/doc/html/functions_func_0x6d.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -62,10 +63,10 @@
  • MCD_CSTR() : MCD_CSTR
  • momentum() -: neuralpp::Synapsis +: neuralpp::Synapsis
  • -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x6e.html b/doc/html/functions_func_0x6e.html index 8b34015..cb10d03 100644 --- a/doc/html/functions_func_0x6e.html +++ b/doc/html/functions_func_0x6e.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -57,21 +58,27 @@  

    - n -

    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x6f.html b/doc/html/functions_func_0x6f.html index b366bff..2c7ef99 100644 --- a/doc/html/functions_func_0x6f.html +++ b/doc/html/functions_func_0x6f.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -68,7 +69,7 @@ : CMarkup
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x70.html b/doc/html/functions_func_0x70.html index f9dc823..55da19b 100644 --- a/doc/html/functions_func_0x70.html +++ b/doc/html/functions_func_0x70.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x72.html b/doc/html/functions_func_0x72.html index 999fdfc..c68c290 100644 --- a/doc/html/functions_func_0x72.html +++ b/doc/html/functions_func_0x72.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -82,7 +83,7 @@ : CMarkup
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x73.html b/doc/html/functions_func_0x73.html index 45bf1f0..c270c56 100644 --- a/doc/html/functions_func_0x73.html +++ b/doc/html/functions_func_0x73.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -57,10 +58,10 @@  

    - s -

    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x74.html b/doc/html/functions_func_0x74.html index 7b2b557..39bfda9 100644 --- a/doc/html/functions_func_0x74.html +++ b/doc/html/functions_func_0x74.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -64,10 +65,10 @@
  • TopIndex() : CMarkup::NodeStack
  • train() -: neuralpp::NeuralNet +: neuralpp::NeuralNet
  • -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x75.html b/doc/html/functions_func_0x75.html index 3073477..81e36b4 100644 --- a/doc/html/functions_func_0x75.html +++ b/doc/html/functions_func_0x75.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -71,7 +72,7 @@ : CMarkup
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x77.html b/doc/html/functions_func_0x77.html index 1606d66..1dfeb64 100644 --- a/doc/html/functions_func_0x77.html +++ b/doc/html/functions_func_0x77.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x78.html b/doc/html/functions_func_0x78.html index 6812e18..70093ab 100644 --- a/doc/html/functions_func_0x78.html +++ b/doc/html/functions_func_0x78.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -160,10 +161,10 @@
  • x_WriteText() : CMarkup
  • XMLFromSet() -: neuralpp::NeuralNet +: neuralpp::NeuralNet
  • -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x7e.html b/doc/html/functions_func_0x7e.html index 6d80d8e..8c9c166 100644 --- a/doc/html/functions_func_0x7e.html +++ b/doc/html/functions_func_0x7e.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -69,7 +70,7 @@ : CMarkup::SavedPosMapArray
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_vars.html b/doc/html/functions_vars.html index 50f9515..0f04d28 100644 --- a/doc/html/functions_vars.html +++ b/doc/html/functions_vars.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -44,6 +45,7 @@
  • p
  • r
  • s
  • +
  • t
  • u
  • w
  • @@ -71,13 +73,14 @@

    - e -

    - f -

    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/globals.html b/doc/html/globals.html index e18a74b..9ab8579 100644 --- a/doc/html/globals.html +++ b/doc/html/globals.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -145,7 +146,7 @@ Here is a list of all file members with links to the files they belong to: : neural++.hpp
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/globals_defs.html b/doc/html/globals_defs.html index 2dfe2ba..4d82616 100644 --- a/doc/html/globals_defs.html +++ b/doc/html/globals_defs.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -145,7 +146,7 @@ : neural++.hpp
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/index.html b/doc/html/index.html index 4a42ce6..7a4de1e 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -12,14 +12,15 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • Neural++ Documentation

    -

    0.3

    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +

    0.4

    +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/namespacemembers.html b/doc/html/namespacemembers.html index 6b935e3..79480c6 100644 --- a/doc/html/namespacemembers.html +++ b/doc/html/namespacemembers.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -31,11 +32,13 @@ Here is a list of all namespace members with links to the namespace documentation for each member:

    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/namespacemembers_func.html b/doc/html/namespacemembers_func.html index 1d5ce33..d4e9d6a 100644 --- a/doc/html/namespacemembers_func.html +++ b/doc/html/namespacemembers_func.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -31,11 +32,13 @@  

    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/namespaceneuralpp.html b/doc/html/namespaceneuralpp.html index a3bc563..1af6f2e 100644 --- a/doc/html/namespaceneuralpp.html +++ b/doc/html/namespaceneuralpp.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -46,12 +47,49 @@ struct  synrecord +class  NetworkFileNotFoundException + + Exception thrown when doing an attempt to load a network from an invalid file. More...
    +class  NetworkFileWriteException + + Exception thrown when trying to write the network's information to a file that cannot be written. More...
    +class  InvalidXMLException + + Exception thrown when trying parsing an invalid XML. More...
    +class  NetworkIndexOutOfBoundsException + + Exception raised when trying to access a neuron whose index is larger than the number of neurons in the network. More...
    +class  InvalidSynapticalWeightException + + Exception raised when, while trying the network or directly, the weight of a synapsis is set to a value |w| > 1. More...

    Functions

    double df (double(*f)(double), double x) +double __actv (double prop) +

    Detailed Description

    Main namespace for the library.

    Function Documentation

    + +
    +
    + + + + + + + + + +
    double neuralpp::__actv (double  prop  ) 
    +
    +
    + +

    + +

    +

    @@ -82,7 +120,7 @@ Main namespace for the library.

    Function Documentation

    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/namespaces.html b/doc/html/namespaces.html index 72c7d9c..380d4cd 100644 --- a/doc/html/namespaces.html +++ b/doc/html/namespaces.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -26,7 +27,7 @@ neuralppMain namespace for the library
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/neural_09_09_8hpp-source.html b/doc/html/neural_09_09_8hpp-source.html index a3e4922..e657264 100644 --- a/doc/html/neural_09_09_8hpp-source.html +++ b/doc/html/neural_09_09_8hpp-source.html @@ -12,10 +12,11 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • neural++.hpp

    Go to the documentation of this file.
    00001 /**************************************************************************************************
    -00002  * LibNeural++ v.0.2 - All-purpose library for managing neural networks                           *
    +00002  * LibNeural++ v.0.4 - All-purpose library for managing neural networks                           *
     00003  * Copyright (C) 2009, BlackLight                                                                 *
     00004  *                                                                                                *
     00005  * This program is free software: you can redistribute it and/or modify it under the terms of the *
    @@ -27,217 +28,216 @@
     00011  * this program. If not, see <http://www.gnu.org/licenses/>.                                      *
     00012  **************************************************************************************************/
     00013 
    -00014 //#ifndef __cplusplus
    -00015 //#error "This is a C++ library, you know, so you'd better use a C++ compiler to compile it"
    -00016 //#else
    -00017 
    -00018 #ifndef __NEURALPP
    -00019 #define __NEURALPP
    -00020 
    -00021 #include <vector>
    -00022 #include <string>
    -00023 #include <cmath>
    -00024 
    -00025 #include "neural++_exception.hpp"
    -00026 using namespace std;
    -00027 
    -00029 #define         RAND    (double) ( (rand() / (RAND_MAX/2)) - 1)
    -00030 
    -00032 #define         BETA0   0.8
    -00033 
    -00038 namespace neuralpp  {
    -00039         class Synapsis;
    -00040         class Neuron;
    -00041         class Layer;
    -00042         class NeuralNet;
    -00043 
    -00044         double df (double (*f)(double), double x);
    -00045 
    -00050         class NeuralNet  {
    -00051                 int epochs;
    -00052                 int ref_epochs;
    -00053                 double l_rate;
    -00054                 double ex;
    -00055 
    -00060                 void updateWeights();
    -00061 
    -00067                 void commitChanges (Layer *l);
    -00068 
    -00074                 double error(double ex) const;
    -00075                 
    -00080                 double (*actv_f)(double);
    -00081 
    -00082         public:
    -00083                 Layer* input;
    -00084                 Layer* hidden;
    -00085                 Layer* output;
    -00086 
    -00090                 typedef enum  { file, str } source;
    -00091 
    -00095                 NeuralNet()  {}
    +00014 #ifndef __NEURALPP
    +00015 #define __NEURALPP
    +00016 
    +00017 #include <vector>
    +00018 #include <string>
    +00019 #include <cmath>
    +00020 
    +00021 #include "neural++_exception.hpp"
    +00022 
    +00024 #define         RAND    (double) ( (rand() / (RAND_MAX/2)) - 1)
    +00025 
    +00027 #define         BETA0   1.0
    +00028 
    +00033 namespace neuralpp  {
    +00034         class Synapsis;
    +00035         class Neuron;
    +00036         class Layer;
    +00037         class NeuralNet;
    +00038 
    +00039         double df (double (*f)(double), double x);
    +00040         double __actv(double prop);
    +00041 
    +00064         class NeuralNet  {
    +00065                 int epochs;
    +00066                 int ref_epochs;
    +00067                 double l_rate;
    +00068                 double threshold;
    +00069                 std::vector<double> expect;
    +00070 
    +00075                 void updateWeights();
    +00076 
    +00082                 void commitChanges (Layer& l);
    +00083 
    +00089                 double error (double ex);
    +00090                 
    +00095                 double (*actv_f)(double);
     00096 
    -00107                 NeuralNet (size_t in_size, size_t hidden_size, size_t out_size, double l, int e);
    -00108 
    -00114                 NeuralNet (const string file) throw(NetworkFileNotFoundException);
    -00115                 
    -00116                 
    -00128                 NeuralNet (size_t in_size, size_t hidden_size, size_t out_size,
    -00129                                 double(*actv)(double), double l, int e);
    -00130 
    -00136                 double getOutput() const;
    -00137 
    -00142                 vector<double> getOutputs();
    -00143 
    -00149                 double expected() const;
    -00150 
    -00155                 void setExpected(double ex);
    -00156 
    -00162                 void update();
    -00163 
    -00168                 void propagate();
    -00169 
    -00174                 void setInput (vector<double>& v);
    -00175 
    -00180                 void link();
    -00181 
    -00188                 void save(const char* fname) throw(NetworkFileWriteException);
    -00189 
    -00197                 void train (string xml, source src) throw(InvalidXMLException);
    +00097         public:
    +00098                 Layer* input;
    +00099                 Layer* hidden;
    +00100                 Layer* output;
    +00101 
    +00105                 typedef enum  { file, str } source;
    +00106 
    +00110                 NeuralNet()  {}
    +00111 
    +00125                 NeuralNet (size_t in_size, size_t hidden_size, size_t out_size, double l,
    +00126                                 int e, double th = 0.0, double (*a)(double) = __actv);
    +00127 
    +00133                 NeuralNet (const std::string file) throw(NetworkFileNotFoundException);
    +00134                 
    +00140                 double getOutput() const;
    +00141 
    +00146                 double getThreshold() const;
    +00147 
    +00152                 std::vector<double> getOutputs();
    +00153 
    +00159                 double expected() const;
    +00160 
    +00166                 std::vector<double> getExpected() const;
    +00167 
    +00172                 void setExpected(double ex);
    +00173 
    +00178                 void setExpected(std::vector<double> ex);
    +00179 
    +00185                 void update();
    +00186 
    +00191                 void propagate();
    +00192 
    +00197                 void setInput (std::vector<double> v);
     00198 
    -00203                 static void initXML (string& xml);
    +00203                 void link();
     00204 
    -00211                 static vector<double> split (char delim, string str);
    +00211                 void save (const char* fname) throw(NetworkFileWriteException);
     00212 
    -00225                 static string XMLFromSet (int id, string set);
    -00226 
    -00231                 static void closeXML(string& xml);
    -00232         };
    -00233 
    -00239         class Synapsis  {
    -00240                 double delta;
    -00241                 double prev_delta;
    -00242                 double weight;
    -00243 
    -00244                 Neuron *in;
    -00245                 Neuron *out;
    -00246                 
    -00247                 double (*actv_f)(double);
    -00248 
    -00249         public:
    -00257                 Synapsis(Neuron* i, Neuron* o, double w, double d);
    -00258 
    -00265                 Synapsis (Neuron* i, Neuron* o, double(*a)(double));
    -00266                 
    -00274                 Synapsis (Neuron* i, Neuron* o,
    -00275                                 double w, double(*a)(double));
    -00276         
    -00280                 Neuron* getIn();
    -00281                 
    -00285                 Neuron* getOut();
    -00286 
    -00291                 void setWeight(double w) throw(InvalidSynapticalWeightException);
    -00292                 
    -00298                 void setDelta(double d) throw(InvalidSynapticalWeightException);
    -00299 
    -00304                 double getWeight();
    -00305                 
    -00310                 double getDelta();
    -00311                 
    -00316                 double getPrevDelta();
    -00317 
    -00328                 double momentum (int N, int x);
    -00329         };
    -00330 
    -00336         class Neuron  {
    -00337                 double actv_val;
    -00338                 double prop_val;
    -00339 
    -00340                 vector< Synapsis > in;
    -00341                 vector< Synapsis > out;
    -00342 
    -00343                 double (*actv_f)(double);
    -00344         
    -00345         public:
    -00350                 Neuron (double (*a)(double));
    -00351 
    -00358                 Neuron (vector<Synapsis> in, vector<Synapsis> out,
    -00359                                 double (*a)(double));
    -00360 
    -00366                 Synapsis& synIn (size_t i);
    -00367                 
    -00373                 Synapsis& synOut (size_t i);
    -00374 
    -00379                 void push_in (Synapsis& s);
    -00380                 
    -00385                 void push_out (Synapsis& s);
    -00386 
    -00391                 void setActv (double a);
    -00392 
    -00397                 void setProp (double p);
    -00398 
    -00403                 double getActv();
    -00404                 
    -00409                 double getProp();
    -00410 
    -00414                 double propagate();
    -00415 
    -00420                 size_t nIn();
    -00421                 
    -00426                 size_t nOut();
    -00427 
    -00431                 void synClear();
    -00432         };
    -00433 
    -00439         class Layer  {
    -00440                 vector<Neuron> elements;
    -00441 
    -00442                 void (*update_weights)();
    -00443                 double (*actv_f)(double);
    -00444 
    -00445         public:
    -00451                 Layer (size_t sz, double (*a)(double));
    -00452 
    -00459                 Layer (vector<Neuron>& neurons, double(*a)(double));
    -00460 
    -00466                 Neuron& operator[] (size_t i) throw(NetworkIndexOutOfBoundsException);
    -00467 
    -00472                 void link (Layer& l);
    +00220                 void train (std::string xml, source src) throw(InvalidXMLException);
    +00221 
    +00226                 static void initXML (std::string& xml);
    +00227 
    +00234                 static std::vector<double> split (char delim, std::string str);
    +00235 
    +00248                 static std::string XMLFromSet (int& id, std::string set);
    +00249 
    +00254                 static void closeXML(std::string& xml);
    +00255         };
    +00256 
    +00262         class Synapsis  {
    +00263                 double delta;
    +00264                 double prev_delta;
    +00265                 double weight;
    +00266 
    +00267                 Neuron *in;
    +00268                 Neuron *out;
    +00269                 
    +00270                 double (*actv_f)(double);
    +00271 
    +00272         public:
    +00280                 Synapsis(Neuron* i, Neuron* o, double w, double d);
    +00281 
    +00288                 Synapsis (Neuron* i, Neuron* o, double(*a)(double));
    +00289                 
    +00297                 Synapsis (Neuron* i, Neuron* o,
    +00298                                 double w, double(*a)(double));
    +00299         
    +00303                 Neuron* getIn() const;
    +00304                 
    +00308                 Neuron* getOut() const;
    +00309 
    +00314                 void setWeight(double w) throw(InvalidSynapticalWeightException);
    +00315                 
    +00321                 void setDelta(double d) throw(InvalidSynapticalWeightException);
    +00322 
    +00327                 double getWeight() const;
    +00328                 
    +00333                 double getDelta() const;
    +00334                 
    +00339                 double getPrevDelta() const;
    +00340 
    +00351                 double momentum (int N, int x) const;
    +00352         };
    +00353 
    +00359         class Neuron  {
    +00360                 double actv_val;
    +00361                 double prop_val;
    +00362                 double threshold;
    +00363 
    +00364                 std::vector< Synapsis > in;
    +00365                 std::vector< Synapsis > out;
    +00366 
    +00367                 double (*actv_f)(double);
    +00368         
    +00369         public:
    +00376                 Neuron (double (*a)(double), double th = 0.0);
    +00377 
    +00386                 Neuron (std::vector<Synapsis> in, std::vector<Synapsis> out,
    +00387                                 double (*a)(double), double th = 0.0);
    +00388 
    +00394                 Synapsis& synIn (size_t i);
    +00395                 
    +00401                 Synapsis& synOut (size_t i);
    +00402 
    +00407                 void push_in (Synapsis s);
    +00408                 
    +00413                 void push_out (Synapsis s);
    +00414 
    +00419                 void setActv (double a);
    +00420 
    +00425                 void setProp (double p);
    +00426 
    +00431                 double getActv();
    +00432                 
    +00437                 double getProp();
    +00438 
    +00442                 void propagate();
    +00443 
    +00448                 size_t nIn();
    +00449                 
    +00454                 size_t nOut();
    +00455 
    +00459                 void synClear();
    +00460         };
    +00461 
    +00467         class Layer  {
    +00468                 std::vector<Neuron> elements;
    +00469                 double threshold;
    +00470 
    +00471                 void (*update_weights)();
    +00472                 double (*actv_f)(double);
     00473 
    -00478                 void setProp (vector<double>& v);
    -00479                  
    -00484                 void setActv (vector<double>& v);
    -00485 
    -00489                 void propagate();
    -00490 
    -00494                 size_t size() const;
    -00495         };
    -00496 
    -00497         struct netrecord  {
    -00498                 int input_size;
    -00499                 int hidden_size;
    -00500                 int output_size;
    -00501 
    -00502                 int epochs;
    -00503                 double l_rate;
    -00504                 double ex;
    -00505         };
    +00474         public:
    +00482                 Layer (size_t sz, double (*a)(double), double th = 0.0);
    +00483 
    +00492                 Layer (std::vector<Neuron>& neurons, double(*a)(double), double th = 0.0);
    +00493 
    +00499                 Neuron& operator[] (size_t i) throw(NetworkIndexOutOfBoundsException);
    +00500 
    +00505                 void link (Layer& l);
     00506 
    -00507         struct neuronrecord  {
    -00508                 double prop;
    -00509                 double actv;
    -00510         };
    -00511 
    -00512         struct synrecord  {
    -00513                 double w;
    -00514                 double d;
    -00515         };
    -00516 }
    +00511                 void setInput (std::vector<double> v);
    +00512 
    +00516                 void propagate();
     00517 
    -00518 //#endif
    -00519 #endif
    -00520 
    +00521                 size_t size() const;
    +00522         };
    +00523 
    +00524         struct netrecord  {
    +00525                 int input_size;
    +00526                 int hidden_size;
    +00527                 int output_size;
    +00528 
    +00529                 int epochs;
    +00530                 double l_rate;
    +00531                 double ex;
    +00532         };
    +00533 
    +00534         struct neuronrecord  {
    +00535                 double prop;
    +00536                 double actv;
    +00537         };
    +00538 
    +00539         struct synrecord  {
    +00540                 double w;
    +00541                 double d;
    +00542         };
    +00543 }
    +00544 
    +00545 #endif
    +00546 
     
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/neural_09_09_8hpp.html b/doc/html/neural_09_09_8hpp.html index 762cba0..2b17f33 100644 --- a/doc/html/neural_09_09_8hpp.html +++ b/doc/html/neural_09_09_8hpp.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -50,12 +51,14 @@ #define RAND   (double) ( (rand() / (RAND_MAX/2)) - 1)  Default rand value: |sin(rand)|, always >= 0 and <= 1.
    -#define BETA0   0.8 +#define BETA0   1.0  Initial value for the inertial momentum of the synapses.

    Functions

    double neuralpp::df (double(*f)(double), double x) +double neuralpp::__actv (double prop) +

    Define Documentation

    @@ -63,7 +66,7 @@
    - +
    #define BETA0   0.8 #define BETA0   1.0
    @@ -93,7 +96,7 @@ Default rand value: |sin(rand)|, always >= 0 and <= 1.

    -


    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/neural_09_09__exception_8hpp-source.html b/doc/html/neural_09_09__exception_8hpp-source.html index 043f639..3818972 100644 --- a/doc/html/neural_09_09__exception_8hpp-source.html +++ b/doc/html/neural_09_09__exception_8hpp-source.html @@ -12,10 +12,11 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • neural++_exception.hpp

    Go to the documentation of this file.
    00001 /**************************************************************************************************
    -00002  * LibNeural++ v.0.2 - All-purpose library for managing neural networks                           *
    +00002  * LibNeural++ v.0.4 - All-purpose library for managing neural networks                           *
     00003  * Copyright (C) 2009, BlackLight                                                                 *
     00004  *                                                                                                *
     00005  * This program is free software: you can redistribute it and/or modify it under the terms of the *
    @@ -27,52 +28,47 @@
     00011  * this program. If not, see <http://www.gnu.org/licenses/>.                                      *
     00012  **************************************************************************************************/
     00013 
    -00014 #ifndef __cplusplus
    -00015 #error "This is a C++ library, you know, so you'd better use a C++ compiler to compile it"
    -00016 #else
    -00017 
    -00018 #ifndef __NEURALPP_EXCEPTION
    -00019 #define __NEURALPP_EXCEPTION
    -00020 
    -00021 #include <exception>
    -00022 
    -00023 namespace neuralpp  {
    -00028         class NetworkFileNotFoundException : public std::exception  {
    -00029         public:
    -00030                 NetworkFileNotFoundException()  {}
    -00031                 const char* what() const throw() { return "Attempt to load a neural network from an invalid network file"; }
    -00032         };
    -00033 
    -00039         class NetworkFileWriteException : public std::exception  {
    -00040         public:
    -00041                 NetworkFileWriteException()  {}
    -00042                 const char* what() const throw()  { return "There was an error while writing the network file"; }
    -00043         };
    -00044 
    -00049         class InvalidXMLException : public std::exception  {
    -00050         public:
    -00051                 InvalidXMLException()  {}
    -00052                 const char* what() const throw() { return "Attempt to load an invalid XML file"; }
    -00053         };
    -00054 
    -00060         class NetworkIndexOutOfBoundsException : public std::exception  {
    -00061         public:
    -00062                 NetworkIndexOutOfBoundsException()  {}
    -00063                 const char* what() const throw()  { return "Attempt to access a non-existing neuron"; }
    -00064         };
    -00065 
    -00071         class InvalidSynapticalWeightException : public std::exception  {
    -00072         public:
    -00073                 InvalidSynapticalWeightException()  {}
    -00074                 const char* what() const throw()  { return "Attempt to set an invalid weight for the synapsis"; }
    -00075         };
    -00076 }
    -00077 
    -00078 #endif
    -00079 #endif
    -00080 
    +00014 #ifndef __NEURALPP_EXCEPTION
    +00015 #define __NEURALPP_EXCEPTION
    +00016 
    +00017 #include <exception>
    +00018 
    +00019 namespace neuralpp  {
    +00024         class NetworkFileNotFoundException : public std::exception  {
    +00025         public:
    +00026                 NetworkFileNotFoundException()  {}
    +00027                 const char* what() const throw() { return "Attempt to load a neural network from an invalid network file"; }
    +00028         };
    +00029 
    +00035         class NetworkFileWriteException : public std::exception  {
    +00036         public:
    +00037                 NetworkFileWriteException()  {}
    +00038                 const char* what() const throw()  { return "There was an error while writing the network file"; }
    +00039         };
    +00040 
    +00045         class InvalidXMLException : public std::exception  {
    +00046         public:
    +00047                 InvalidXMLException()  {}
    +00048                 const char* what() const throw() { return "Attempt to load an invalid XML file"; }
    +00049         };
    +00050 
    +00056         class NetworkIndexOutOfBoundsException : public std::exception  {
    +00057         public:
    +00058                 NetworkIndexOutOfBoundsException()  {}
    +00059                 const char* what() const throw()  { return "Attempt to access a non-existing neuron"; }
    +00060         };
    +00061 
    +00067         class InvalidSynapticalWeightException : public std::exception  {
    +00068         public:
    +00069                 InvalidSynapticalWeightException()  {}
    +00070                 const char* what() const throw()  { return "Attempt to set an invalid weight for the synapsis"; }
    +00071         };
    +00072 }
    +00073 
    +00074 #endif
    +00075 
     
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/neural_09_09__exception_8hpp.html b/doc/html/neural_09_09__exception_8hpp.html index 8f1cd5a..751129f 100644 --- a/doc/html/neural_09_09__exception_8hpp.html +++ b/doc/html/neural_09_09__exception_8hpp.html @@ -12,17 +12,38 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • -

    neural++_exception.hpp File Reference

    +

    neural++_exception.hpp File Reference

    #include <exception>
    +

    Go to the source code of this file. + + + + + + + + + + + + + + + + + + +

    Namespaces

    namespace  neuralpp

    Classes

    class  neuralpp::NetworkFileNotFoundException
     Exception thrown when doing an attempt to load a network from an invalid file. More...
    class  neuralpp::NetworkFileWriteException
     Exception thrown when trying to write the network's information to a file that cannot be written. More...
    class  neuralpp::InvalidXMLException
     Exception thrown when trying parsing an invalid XML. More...
    class  neuralpp::NetworkIndexOutOfBoundsException
     Exception raised when trying to access a neuron whose index is larger than the number of neurons in the network. More...
    class  neuralpp::InvalidSynapticalWeightException
     Exception raised when, while trying the network or directly, the weight of a synapsis is set to a value |w| > 1. More...

    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1ConvertEncoding-members.html b/doc/html/structCMarkup_1_1ConvertEncoding-members.html index f7dedc1..3a282cb 100644 --- a/doc/html/structCMarkup_1_1ConvertEncoding-members.html +++ b/doc/html/structCMarkup_1_1ConvertEncoding-members.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1ConvertEncoding.html b/doc/html/structCMarkup_1_1ConvertEncoding.html index 01239de..3a21a55 100644 --- a/doc/html/structCMarkup_1_1ConvertEncoding.html +++ b/doc/html/structCMarkup_1_1ConvertEncoding.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -197,7 +198,7 @@
    The documentation for this struct was generated from the following file:
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1ElemPos-members.html b/doc/html/structCMarkup_1_1ElemPos-members.html index d3dc0d5..9974420 100644 --- a/doc/html/structCMarkup_1_1ElemPos-members.html +++ b/doc/html/structCMarkup_1_1ElemPos-members.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -47,7 +48,7 @@ StartContent() const CMarkup::ElemPos [inline] StartTagLen() const CMarkup::ElemPos [inline]
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1ElemPos.html b/doc/html/structCMarkup_1_1ElemPos.html index eb3fcf6..4c72ed7 100644 --- a/doc/html/structCMarkup_1_1ElemPos.html +++ b/doc/html/structCMarkup_1_1ElemPos.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -527,7 +528,7 @@
    The documentation for this struct was generated from the following file:
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1FilePos-members.html b/doc/html/structCMarkup_1_1FilePos-members.html index b95b624..994a117 100644 --- a/doc/html/structCMarkup_1_1FilePos-members.html +++ b/doc/html/structCMarkup_1_1FilePos-members.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1FilePos.html b/doc/html/structCMarkup_1_1FilePos.html index 1c8ab38..7e38b66 100644 --- a/doc/html/structCMarkup_1_1FilePos.html +++ b/doc/html/structCMarkup_1_1FilePos.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -195,7 +196,7 @@
    The documentation for this struct was generated from the following file:
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1NodePos-members.html b/doc/html/structCMarkup_1_1NodePos-members.html index 4c80962..96c128a 100644 --- a/doc/html/structCMarkup_1_1NodePos-members.html +++ b/doc/html/structCMarkup_1_1NodePos-members.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1NodePos.html b/doc/html/structCMarkup_1_1NodePos.html index 1f691eb..49ac3bc 100644 --- a/doc/html/structCMarkup_1_1NodePos.html +++ b/doc/html/structCMarkup_1_1NodePos.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -176,7 +177,7 @@
    The documentation for this struct was generated from the following file:
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1NodeStack-members.html b/doc/html/structCMarkup_1_1NodeStack-members.html index 1e7c27d..cc770e2 100644 --- a/doc/html/structCMarkup_1_1NodeStack-members.html +++ b/doc/html/structCMarkup_1_1NodeStack-members.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -36,7 +37,7 @@ TopIndex()CMarkup::NodeStack [inline] ~NodeStack()CMarkup::NodeStack [inline]
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1NodeStack.html b/doc/html/structCMarkup_1_1NodeStack.html index 9274dea..d3e1bc7 100644 --- a/doc/html/structCMarkup_1_1NodeStack.html +++ b/doc/html/structCMarkup_1_1NodeStack.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -309,7 +310,7 @@
    The documentation for this struct was generated from the following file:
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1PosArray-members.html b/doc/html/structCMarkup_1_1PosArray-members.html index e33c402..aa8c5c5 100644 --- a/doc/html/structCMarkup_1_1PosArray-members.html +++ b/doc/html/structCMarkup_1_1PosArray-members.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -37,7 +38,7 @@ SegsUsed() const CMarkup::PosArray [inline] ~PosArray()CMarkup::PosArray [inline]
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1PosArray.html b/doc/html/structCMarkup_1_1PosArray.html index f955be2..10f1254 100644 --- a/doc/html/structCMarkup_1_1PosArray.html +++ b/doc/html/structCMarkup_1_1PosArray.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -316,7 +317,7 @@
    The documentation for this struct was generated from the following file:
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1SavedPos-members.html b/doc/html/structCMarkup_1_1SavedPos-members.html index e8229f4..03405d9 100644 --- a/doc/html/structCMarkup_1_1SavedPos-members.html +++ b/doc/html/structCMarkup_1_1SavedPos-members.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1SavedPos.html b/doc/html/structCMarkup_1_1SavedPos.html index d5a98a7..d371a5c 100644 --- a/doc/html/structCMarkup_1_1SavedPos.html +++ b/doc/html/structCMarkup_1_1SavedPos.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -145,7 +146,7 @@
    The documentation for this struct was generated from the following file:
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1SavedPosMap-members.html b/doc/html/structCMarkup_1_1SavedPosMap-members.html index 1f5b12d..eec355c 100644 --- a/doc/html/structCMarkup_1_1SavedPosMap-members.html +++ b/doc/html/structCMarkup_1_1SavedPosMap-members.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -28,7 +29,7 @@ SavedPosMap(int nSize)CMarkup::SavedPosMap [inline] ~SavedPosMap()CMarkup::SavedPosMap [inline]
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1SavedPosMap.html b/doc/html/structCMarkup_1_1SavedPosMap.html index a001d66..81cf427 100644 --- a/doc/html/structCMarkup_1_1SavedPosMap.html +++ b/doc/html/structCMarkup_1_1SavedPosMap.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -123,7 +124,7 @@
    The documentation for this struct was generated from the following file:
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1SavedPosMapArray-members.html b/doc/html/structCMarkup_1_1SavedPosMapArray-members.html index e56796e..87be25d 100644 --- a/doc/html/structCMarkup_1_1SavedPosMapArray-members.html +++ b/doc/html/structCMarkup_1_1SavedPosMapArray-members.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1SavedPosMapArray.html b/doc/html/structCMarkup_1_1SavedPosMapArray.html index 1552b42..8b93392 100644 --- a/doc/html/structCMarkup_1_1SavedPosMapArray.html +++ b/doc/html/structCMarkup_1_1SavedPosMapArray.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -129,7 +130,7 @@
    The documentation for this struct was generated from the following file:
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1TokenPos-members.html b/doc/html/structCMarkup_1_1TokenPos-members.html index b9cf0f0..5b3e30b 100644 --- a/doc/html/structCMarkup_1_1TokenPos-members.html +++ b/doc/html/structCMarkup_1_1TokenPos-members.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -36,7 +37,7 @@ StrNIACmp(MCD_PCSZ p1, MCD_PCSZ p2, int n)CMarkup::TokenPos [inline] TokenPos(MCD_CSTR sz, int n)CMarkup::TokenPos [inline]
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1TokenPos.html b/doc/html/structCMarkup_1_1TokenPos.html index dfc28d1..3c9ed47 100644 --- a/doc/html/structCMarkup_1_1TokenPos.html +++ b/doc/html/structCMarkup_1_1TokenPos.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -314,7 +315,7 @@
    The documentation for this struct was generated from the following file:
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structMCD__CSTR-members.html b/doc/html/structMCD__CSTR-members.html index 09d60a8..b308a85 100644 --- a/doc/html/structMCD__CSTR-members.html +++ b/doc/html/structMCD__CSTR-members.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -29,7 +30,7 @@ operator MCD_PCSZ() const MCD_CSTR [inline] pcszMCD_CSTR
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structMCD__CSTR.html b/doc/html/structMCD__CSTR.html index c59df78..d794817 100644 --- a/doc/html/structMCD__CSTR.html +++ b/doc/html/structMCD__CSTR.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -148,7 +149,7 @@
    The documentation for this struct was generated from the following file:
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structneuralpp_1_1netrecord-members.html b/doc/html/structneuralpp_1_1netrecord-members.html index ab530fb..f207ba9 100644 --- a/doc/html/structneuralpp_1_1netrecord-members.html +++ b/doc/html/structneuralpp_1_1netrecord-members.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structneuralpp_1_1netrecord.html b/doc/html/structneuralpp_1_1netrecord.html index 7311371..1067452 100644 --- a/doc/html/structneuralpp_1_1netrecord.html +++ b/doc/html/structneuralpp_1_1netrecord.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -138,7 +139,7 @@
    The documentation for this struct was generated from the following file:
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structneuralpp_1_1neuronrecord-members.html b/doc/html/structneuralpp_1_1neuronrecord-members.html index 249d14e..97153a6 100644 --- a/doc/html/structneuralpp_1_1neuronrecord-members.html +++ b/doc/html/structneuralpp_1_1neuronrecord-members.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structneuralpp_1_1neuronrecord.html b/doc/html/structneuralpp_1_1neuronrecord.html index dca1bde..ba87269 100644 --- a/doc/html/structneuralpp_1_1neuronrecord.html +++ b/doc/html/structneuralpp_1_1neuronrecord.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -70,7 +71,7 @@
    The documentation for this struct was generated from the following file:
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structneuralpp_1_1synrecord-members.html b/doc/html/structneuralpp_1_1synrecord-members.html index 624237b..e553f48 100644 --- a/doc/html/structneuralpp_1_1synrecord-members.html +++ b/doc/html/structneuralpp_1_1synrecord-members.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structneuralpp_1_1synrecord.html b/doc/html/structneuralpp_1_1synrecord.html index 4999ce1..b19c30e 100644 --- a/doc/html/structneuralpp_1_1synrecord.html +++ b/doc/html/structneuralpp_1_1synrecord.html @@ -12,6 +12,7 @@
  • Namespaces
  • Classes
  • Files
  • +
  • Examples
  • @@ -70,7 +71,7 @@
    The documentation for this struct was generated from the following file:
    -
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  +
    Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/latex/_2examples_2learnAdd_8cpp-example.tex b/doc/latex/_2examples_2learnAdd_8cpp-example.tex new file mode 100644 index 0000000..14180d3 --- /dev/null +++ b/doc/latex/_2examples_2learnAdd_8cpp-example.tex @@ -0,0 +1,6 @@ +\section{/examples/learnAdd.cpp} + + +\begin{DocInclude}\begin{verbatim}\end{verbatim} +\end{DocInclude} + \ No newline at end of file diff --git a/doc/latex/annotated.tex b/doc/latex/annotated.tex index cfd080f..dc989a8 100644 --- a/doc/latex/annotated.tex +++ b/doc/latex/annotated.tex @@ -11,9 +11,14 @@ Here are the classes, structs, unions and interfaces with brief descriptions:\be \item\contentsline{section}{{\bf CMarkup::SavedPosMap} }{\pageref{structCMarkup_1_1SavedPosMap}}{} \item\contentsline{section}{{\bf CMarkup::SavedPosMapArray} }{\pageref{structCMarkup_1_1SavedPosMapArray}}{} \item\contentsline{section}{{\bf CMarkup::TokenPos} }{\pageref{structCMarkup_1_1TokenPos}}{} +\item\contentsline{section}{{\bf neuralpp::InvalidSynapticalWeightException} (Exception raised when, while trying the network or directly, the weight of a synapsis is set to a value $|$w$|$ $>$ 1 )}{\pageref{classneuralpp_1_1InvalidSynapticalWeightException}}{} +\item\contentsline{section}{{\bf neuralpp::InvalidXMLException} (Exception thrown when trying parsing an invalid XML )}{\pageref{classneuralpp_1_1InvalidXMLException}}{} \item\contentsline{section}{{\bf neuralpp::Layer} (Class for managing layers of neurons )}{\pageref{classneuralpp_1_1Layer}}{} \item\contentsline{section}{{\bf MCD\_\-CSTR} }{\pageref{structMCD__CSTR}}{} \item\contentsline{section}{{\bf neuralpp::netrecord} }{\pageref{structneuralpp_1_1netrecord}}{} +\item\contentsline{section}{{\bf neuralpp::NetworkFileNotFoundException} (Exception thrown when doing an attempt to load a network from an invalid file )}{\pageref{classneuralpp_1_1NetworkFileNotFoundException}}{} +\item\contentsline{section}{{\bf neuralpp::NetworkFileWriteException} (Exception thrown when trying to write the network's information to a file that cannot be written )}{\pageref{classneuralpp_1_1NetworkFileWriteException}}{} +\item\contentsline{section}{{\bf neuralpp::NetworkIndexOutOfBoundsException} (Exception raised when trying to access a neuron whose index is larger than the number of neurons in the network )}{\pageref{classneuralpp_1_1NetworkIndexOutOfBoundsException}}{} \item\contentsline{section}{{\bf neuralpp::NeuralNet} (Main project's class )}{\pageref{classneuralpp_1_1NeuralNet}}{} \item\contentsline{section}{{\bf neuralpp::Neuron} (Class for managing neurons )}{\pageref{classneuralpp_1_1Neuron}}{} \item\contentsline{section}{{\bf neuralpp::neuronrecord} }{\pageref{structneuralpp_1_1neuronrecord}}{} diff --git a/doc/latex/classneuralpp_1_1InvalidSynapticalWeightException.tex b/doc/latex/classneuralpp_1_1InvalidSynapticalWeightException.tex new file mode 100644 index 0000000..0030b26 --- /dev/null +++ b/doc/latex/classneuralpp_1_1InvalidSynapticalWeightException.tex @@ -0,0 +1,38 @@ +\section{neuralpp::InvalidSynapticalWeightException Class Reference} +\label{classneuralpp_1_1InvalidSynapticalWeightException}\index{neuralpp::InvalidSynapticalWeightException@{neuralpp::InvalidSynapticalWeightException}} +Exception raised when, while trying the network or directly, the weight of a synapsis is set to a value $|$w$|$ $>$ 1. + + +{\tt \#include $<$neural++\_\-exception.hpp$>$} + +\subsection*{Public Member Functions} +\begin{CompactItemize} +\item +{\bf InvalidSynapticalWeightException} () +\item +const char $\ast$ {\bf what} () const throw () +\end{CompactItemize} + + +\subsection{Detailed Description} +Exception raised when, while trying the network or directly, the weight of a synapsis is set to a value $|$w$|$ $>$ 1. + +\subsection{Constructor \& Destructor Documentation} +\index{neuralpp::InvalidSynapticalWeightException@{neuralpp::InvalidSynapticalWeightException}!InvalidSynapticalWeightException@{InvalidSynapticalWeightException}} +\index{InvalidSynapticalWeightException@{InvalidSynapticalWeightException}!neuralpp::InvalidSynapticalWeightException@{neuralpp::InvalidSynapticalWeightException}} +\subsubsection[InvalidSynapticalWeightException]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::InvalidSynapticalWeightException::InvalidSynapticalWeightException ()\hspace{0.3cm}{\tt [inline]}}\label{classneuralpp_1_1InvalidSynapticalWeightException_42e54de0ef9d9f711a483287f4f95916} + + + + +\subsection{Member Function Documentation} +\index{neuralpp::InvalidSynapticalWeightException@{neuralpp::InvalidSynapticalWeightException}!what@{what}} +\index{what@{what}!neuralpp::InvalidSynapticalWeightException@{neuralpp::InvalidSynapticalWeightException}} +\subsubsection[what]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ neuralpp::InvalidSynapticalWeightException::what () const throw ()\hspace{0.3cm}{\tt [inline]}}\label{classneuralpp_1_1InvalidSynapticalWeightException_8d374dd7e8363b2551ae6e306b11473a} + + + + +The documentation for this class was generated from the following file:\begin{CompactItemize} +\item +{\bf neural++\_\-exception.hpp}\end{CompactItemize} diff --git a/doc/latex/classneuralpp_1_1InvalidXMLException.tex b/doc/latex/classneuralpp_1_1InvalidXMLException.tex new file mode 100644 index 0000000..9622c60 --- /dev/null +++ b/doc/latex/classneuralpp_1_1InvalidXMLException.tex @@ -0,0 +1,38 @@ +\section{neuralpp::InvalidXMLException Class Reference} +\label{classneuralpp_1_1InvalidXMLException}\index{neuralpp::InvalidXMLException@{neuralpp::InvalidXMLException}} +Exception thrown when trying parsing an invalid XML. + + +{\tt \#include $<$neural++\_\-exception.hpp$>$} + +\subsection*{Public Member Functions} +\begin{CompactItemize} +\item +{\bf InvalidXMLException} () +\item +const char $\ast$ {\bf what} () const throw () +\end{CompactItemize} + + +\subsection{Detailed Description} +Exception thrown when trying parsing an invalid XML. + +\subsection{Constructor \& Destructor Documentation} +\index{neuralpp::InvalidXMLException@{neuralpp::InvalidXMLException}!InvalidXMLException@{InvalidXMLException}} +\index{InvalidXMLException@{InvalidXMLException}!neuralpp::InvalidXMLException@{neuralpp::InvalidXMLException}} +\subsubsection[InvalidXMLException]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::InvalidXMLException::InvalidXMLException ()\hspace{0.3cm}{\tt [inline]}}\label{classneuralpp_1_1InvalidXMLException_10279e6f42a1ccb934afcfef2770c537} + + + + +\subsection{Member Function Documentation} +\index{neuralpp::InvalidXMLException@{neuralpp::InvalidXMLException}!what@{what}} +\index{what@{what}!neuralpp::InvalidXMLException@{neuralpp::InvalidXMLException}} +\subsubsection[what]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ neuralpp::InvalidXMLException::what () const throw ()\hspace{0.3cm}{\tt [inline]}}\label{classneuralpp_1_1InvalidXMLException_4a8b81678ed0c319e1715ab5ef9112da} + + + + +The documentation for this class was generated from the following file:\begin{CompactItemize} +\item +{\bf neural++\_\-exception.hpp}\end{CompactItemize} diff --git a/doc/latex/classneuralpp_1_1Layer.tex b/doc/latex/classneuralpp_1_1Layer.tex index 22b3e76..fec5a05 100644 --- a/doc/latex/classneuralpp_1_1Layer.tex +++ b/doc/latex/classneuralpp_1_1Layer.tex @@ -8,18 +8,16 @@ Class for managing layers of neurons. \subsection*{Public Member Functions} \begin{CompactItemize} \item -{\bf Layer} (size\_\-t sz, double($\ast$a)(double)) +{\bf Layer} (size\_\-t sz, double($\ast$a)(double), double th=0.0) \begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item -{\bf Layer} (vector$<$ {\bf Neuron} $>$ \&neurons, double($\ast$a)(double)) +{\bf Layer} (std::vector$<$ {\bf Neuron} $>$ \&neurons, double($\ast$a)(double), double th=0.0) \begin{CompactList}\small\item\em Alternative constructor. \item\end{CompactList}\item {\bf Neuron} \& {\bf operator[$\,$]} (size\_\-t i) throw (NetworkIndexOutOfBoundsException) \begin{CompactList}\small\item\em Redefinition for operator []. \item\end{CompactList}\item void {\bf link} ({\bf Layer} \&l) \begin{CompactList}\small\item\em It links a layer to another. \item\end{CompactList}\item -void {\bf setProp} (vector$<$ double $>$ \&v) -\begin{CompactList}\small\item\em It sets a vector of propagation values to all its neurons. \item\end{CompactList}\item -void {\bf setActv} (vector$<$ double $>$ \&v) -\begin{CompactList}\small\item\em It sets a vector of activation values to all its neurons. \item\end{CompactList}\item +void {\bf setInput} (std::vector$<$ double $>$ v) +\begin{CompactList}\small\item\em Set the input values for the neurons of the layer (just use it for the input layer). \item\end{CompactList}\item void {\bf propagate} () \begin{CompactList}\small\item\em It propagates its activation values to the output layers. \item\end{CompactList}\item size\_\-t {\bf size} () const @@ -27,7 +25,9 @@ size\_\-t {\bf size} () const \subsection*{Private Attributes} \begin{CompactItemize} \item -vector$<$ {\bf Neuron} $>$ {\bf elements} +std::vector$<$ {\bf Neuron} $>$ {\bf elements} +\item +double {\bf threshold} \item void($\ast$ {\bf update\_\-weights} )() \item @@ -43,7 +43,7 @@ Don't use this class directly unless you know what you're doing, use \doxyref{Ne \subsection{Constructor \& Destructor Documentation} \index{neuralpp::Layer@{neuralpp::Layer}!Layer@{Layer}} \index{Layer@{Layer}!neuralpp::Layer@{neuralpp::Layer}} -\subsubsection[Layer]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::Layer::Layer (size\_\-t {\em sz}, \/ double($\ast$)(double) {\em a})}\label{classneuralpp_1_1Layer_fb08bddd85d36570dabfe915461f07c5} +\subsubsection[Layer]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::Layer::Layer (size\_\-t {\em sz}, \/ double($\ast$)(double) {\em a}, \/ double {\em th} = {\tt 0.0})}\label{classneuralpp_1_1Layer_a235767701b5e9dcf28c5e9e0d04cb0b} Constructor. @@ -51,11 +51,11 @@ Constructor. \begin{Desc} \item[Parameters:] \begin{description} -\item[{\em sz}]Size of the layer \item[{\em a}]Activation function \end{description} +\item[{\em sz}]Size of the layer \item[{\em a}]Activation function \item[{\em th}]Threshold, value in [0,1] that establishes how much a neuron must be 'sensitive' on variations of the input values \end{description} \end{Desc} \index{neuralpp::Layer@{neuralpp::Layer}!Layer@{Layer}} \index{Layer@{Layer}!neuralpp::Layer@{neuralpp::Layer}} -\subsubsection[Layer]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::Layer::Layer (vector$<$ {\bf Neuron} $>$ \& {\em neurons}, \/ double($\ast$)(double) {\em a})}\label{classneuralpp_1_1Layer_609ed16b8d79dc384b01ba7d16b72bd1} +\subsubsection[Layer]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::Layer::Layer (std::vector$<$ {\bf Neuron} $>$ \& {\em neurons}, \/ double($\ast$)(double) {\em a}, \/ double {\em th} = {\tt 0.0})}\label{classneuralpp_1_1Layer_d79f684523f8a6e086b962c8eef37623} Alternative constructor. @@ -63,14 +63,14 @@ Alternative constructor. It directly gets a vector of neurons to build the layer \begin{Desc} \item[Parameters:] \begin{description} -\item[{\em neurons}]Vector of neurons to be included in the layer \item[{\em a}]Activation function \end{description} +\item[{\em neurons}]Vector of neurons to be included in the layer \item[{\em a}]Activation function \item[{\em th}]Threshold, value in [0,1] that establishes how much a neuron must be 'sensitive' on variations of the input values \end{description} \end{Desc} \subsection{Member Function Documentation} \index{neuralpp::Layer@{neuralpp::Layer}!operator[]@{operator[]}} \index{operator[]@{operator[]}!neuralpp::Layer@{neuralpp::Layer}} -\subsubsection[operator[]]{\setlength{\rightskip}{0pt plus 5cm}{\bf Neuron}\& neuralpp::Layer::operator[$\,$] (size\_\-t {\em i}) throw (NetworkIndexOutOfBoundsException)}\label{classneuralpp_1_1Layer_45ff7554830558155c6fbce3b6827122} +\subsubsection[operator[]]{\setlength{\rightskip}{0pt plus 5cm}{\bf Neuron}\& neuralpp::Layer::operator[$\,$] (size\_\-t {\em i}) throw ({\bf NetworkIndexOutOfBoundsException})}\label{classneuralpp_1_1Layer_45ff7554830558155c6fbce3b6827122} Redefinition for operator []. @@ -94,29 +94,17 @@ It links a layer to another. \begin{description} \item[{\em l}]\doxyref{Layer}{p.}{classneuralpp_1_1Layer} to connect to the current as input layer \end{description} \end{Desc} -\index{neuralpp::Layer@{neuralpp::Layer}!setProp@{setProp}} -\index{setProp@{setProp}!neuralpp::Layer@{neuralpp::Layer}} -\subsubsection[setProp]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::Layer::setProp (vector$<$ double $>$ \& {\em v})}\label{classneuralpp_1_1Layer_dbad95f635343a2998794113d7762cf7} +\index{neuralpp::Layer@{neuralpp::Layer}!setInput@{setInput}} +\index{setInput@{setInput}!neuralpp::Layer@{neuralpp::Layer}} +\subsubsection[setInput]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::Layer::setInput (std::vector$<$ double $>$ {\em v})}\label{classneuralpp_1_1Layer_88ceffc23f02a9dc24d4355767b7cca7} -It sets a vector of propagation values to all its neurons. +Set the input values for the neurons of the layer (just use it for the input layer). \begin{Desc} \item[Parameters:] \begin{description} -\item[{\em v}]Vector of values to write as propagation values \end{description} -\end{Desc} -\index{neuralpp::Layer@{neuralpp::Layer}!setActv@{setActv}} -\index{setActv@{setActv}!neuralpp::Layer@{neuralpp::Layer}} -\subsubsection[setActv]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::Layer::setActv (vector$<$ double $>$ \& {\em v})}\label{classneuralpp_1_1Layer_98f79281b680b1d18fd91fa5794c0899} - - -It sets a vector of activation values to all its neurons. - -\begin{Desc} -\item[Parameters:] -\begin{description} -\item[{\em v}]Vector of values to write as activation values \end{description} +\item[{\em v}]Vector containing the input values \end{description} \end{Desc} \index{neuralpp::Layer@{neuralpp::Layer}!propagate@{propagate}} \index{propagate@{propagate}!neuralpp::Layer@{neuralpp::Layer}} @@ -137,7 +125,12 @@ It propagates its activation values to the output layers. \subsection{Member Data Documentation} \index{neuralpp::Layer@{neuralpp::Layer}!elements@{elements}} \index{elements@{elements}!neuralpp::Layer@{neuralpp::Layer}} -\subsubsection[elements]{\setlength{\rightskip}{0pt plus 5cm}vector$<${\bf Neuron}$>$ {\bf neuralpp::Layer::elements}\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1Layer_855685c9da56b06b629e13a2f8c719ce} +\subsubsection[elements]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<${\bf Neuron}$>$ {\bf neuralpp::Layer::elements}\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1Layer_8188cb5c264e6021cee9979b968a0305} + + +\index{neuralpp::Layer@{neuralpp::Layer}!threshold@{threshold}} +\index{threshold@{threshold}!neuralpp::Layer@{neuralpp::Layer}} +\subsubsection[threshold]{\setlength{\rightskip}{0pt plus 5cm}double {\bf neuralpp::Layer::threshold}\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1Layer_02cf4efe1da02a7404d25375c85ed71f} \index{neuralpp::Layer@{neuralpp::Layer}!update\_\-weights@{update\_\-weights}} diff --git a/doc/latex/classneuralpp_1_1NetworkFileNotFoundException.tex b/doc/latex/classneuralpp_1_1NetworkFileNotFoundException.tex new file mode 100644 index 0000000..4349976 --- /dev/null +++ b/doc/latex/classneuralpp_1_1NetworkFileNotFoundException.tex @@ -0,0 +1,46 @@ +\section{neuralpp::NetworkFileNotFoundException Class Reference} +\label{classneuralpp_1_1NetworkFileNotFoundException}\index{neuralpp::NetworkFileNotFoundException@{neuralpp::NetworkFileNotFoundException}} +Exception thrown when doing an attempt to load a network from an invalid file. + + +{\tt \#include $<$neural++\_\-exception.hpp$>$} + +\subsection*{Public Member Functions} +\begin{CompactItemize} +\item +{\bf NetworkFileNotFoundException} () +\item +const char $\ast$ {\bf what} () const throw () +\end{CompactItemize} + + +\subsection{Detailed Description} +Exception thrown when doing an attempt to load a network from an invalid file. \begin{Desc} +\item[Examples: ]\par + + +{\bf examples/doAdd.cpp}.\end{Desc} + + +\subsection{Constructor \& Destructor Documentation} +\index{neuralpp::NetworkFileNotFoundException@{neuralpp::NetworkFileNotFoundException}!NetworkFileNotFoundException@{NetworkFileNotFoundException}} +\index{NetworkFileNotFoundException@{NetworkFileNotFoundException}!neuralpp::NetworkFileNotFoundException@{neuralpp::NetworkFileNotFoundException}} +\subsubsection[NetworkFileNotFoundException]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::NetworkFileNotFoundException::NetworkFileNotFoundException ()\hspace{0.3cm}{\tt [inline]}}\label{classneuralpp_1_1NetworkFileNotFoundException_9603eebdb841f06c9b1007e65cba60f6} + + + + +\subsection{Member Function Documentation} +\index{neuralpp::NetworkFileNotFoundException@{neuralpp::NetworkFileNotFoundException}!what@{what}} +\index{what@{what}!neuralpp::NetworkFileNotFoundException@{neuralpp::NetworkFileNotFoundException}} +\subsubsection[what]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ neuralpp::NetworkFileNotFoundException::what () const throw ()\hspace{0.3cm}{\tt [inline]}}\label{classneuralpp_1_1NetworkFileNotFoundException_24cde7729ab22d343f36e638cfc40702} + + +\begin{Desc} +\item[Examples: ]\par +{\bf examples/doAdd.cpp}.\end{Desc} + + +The documentation for this class was generated from the following file:\begin{CompactItemize} +\item +{\bf neural++\_\-exception.hpp}\end{CompactItemize} diff --git a/doc/latex/classneuralpp_1_1NetworkFileWriteException.tex b/doc/latex/classneuralpp_1_1NetworkFileWriteException.tex new file mode 100644 index 0000000..d2f7a9b --- /dev/null +++ b/doc/latex/classneuralpp_1_1NetworkFileWriteException.tex @@ -0,0 +1,38 @@ +\section{neuralpp::NetworkFileWriteException Class Reference} +\label{classneuralpp_1_1NetworkFileWriteException}\index{neuralpp::NetworkFileWriteException@{neuralpp::NetworkFileWriteException}} +Exception thrown when trying to write the network's information to a file that cannot be written. + + +{\tt \#include $<$neural++\_\-exception.hpp$>$} + +\subsection*{Public Member Functions} +\begin{CompactItemize} +\item +{\bf NetworkFileWriteException} () +\item +const char $\ast$ {\bf what} () const throw () +\end{CompactItemize} + + +\subsection{Detailed Description} +Exception thrown when trying to write the network's information to a file that cannot be written. + +\subsection{Constructor \& Destructor Documentation} +\index{neuralpp::NetworkFileWriteException@{neuralpp::NetworkFileWriteException}!NetworkFileWriteException@{NetworkFileWriteException}} +\index{NetworkFileWriteException@{NetworkFileWriteException}!neuralpp::NetworkFileWriteException@{neuralpp::NetworkFileWriteException}} +\subsubsection[NetworkFileWriteException]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::NetworkFileWriteException::NetworkFileWriteException ()\hspace{0.3cm}{\tt [inline]}}\label{classneuralpp_1_1NetworkFileWriteException_83bc897b0ea11a384e0839a39e9fdb48} + + + + +\subsection{Member Function Documentation} +\index{neuralpp::NetworkFileWriteException@{neuralpp::NetworkFileWriteException}!what@{what}} +\index{what@{what}!neuralpp::NetworkFileWriteException@{neuralpp::NetworkFileWriteException}} +\subsubsection[what]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ neuralpp::NetworkFileWriteException::what () const throw ()\hspace{0.3cm}{\tt [inline]}}\label{classneuralpp_1_1NetworkFileWriteException_c8802852cb38d5edf6f490ff3acb6078} + + + + +The documentation for this class was generated from the following file:\begin{CompactItemize} +\item +{\bf neural++\_\-exception.hpp}\end{CompactItemize} diff --git a/doc/latex/classneuralpp_1_1NetworkIndexOutOfBoundsException.tex b/doc/latex/classneuralpp_1_1NetworkIndexOutOfBoundsException.tex new file mode 100644 index 0000000..41eee3e --- /dev/null +++ b/doc/latex/classneuralpp_1_1NetworkIndexOutOfBoundsException.tex @@ -0,0 +1,38 @@ +\section{neuralpp::NetworkIndexOutOfBoundsException Class Reference} +\label{classneuralpp_1_1NetworkIndexOutOfBoundsException}\index{neuralpp::NetworkIndexOutOfBoundsException@{neuralpp::NetworkIndexOutOfBoundsException}} +Exception raised when trying to access a neuron whose index is larger than the number of neurons in the network. + + +{\tt \#include $<$neural++\_\-exception.hpp$>$} + +\subsection*{Public Member Functions} +\begin{CompactItemize} +\item +{\bf NetworkIndexOutOfBoundsException} () +\item +const char $\ast$ {\bf what} () const throw () +\end{CompactItemize} + + +\subsection{Detailed Description} +Exception raised when trying to access a neuron whose index is larger than the number of neurons in the network. + +\subsection{Constructor \& Destructor Documentation} +\index{neuralpp::NetworkIndexOutOfBoundsException@{neuralpp::NetworkIndexOutOfBoundsException}!NetworkIndexOutOfBoundsException@{NetworkIndexOutOfBoundsException}} +\index{NetworkIndexOutOfBoundsException@{NetworkIndexOutOfBoundsException}!neuralpp::NetworkIndexOutOfBoundsException@{neuralpp::NetworkIndexOutOfBoundsException}} +\subsubsection[NetworkIndexOutOfBoundsException]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::NetworkIndexOutOfBoundsException::NetworkIndexOutOfBoundsException ()\hspace{0.3cm}{\tt [inline]}}\label{classneuralpp_1_1NetworkIndexOutOfBoundsException_07141d2225ea9f2d486e755a3660d594} + + + + +\subsection{Member Function Documentation} +\index{neuralpp::NetworkIndexOutOfBoundsException@{neuralpp::NetworkIndexOutOfBoundsException}!what@{what}} +\index{what@{what}!neuralpp::NetworkIndexOutOfBoundsException@{neuralpp::NetworkIndexOutOfBoundsException}} +\subsubsection[what]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ neuralpp::NetworkIndexOutOfBoundsException::what () const throw ()\hspace{0.3cm}{\tt [inline]}}\label{classneuralpp_1_1NetworkIndexOutOfBoundsException_8b65d77cb375a0aa40d5a9ea692bd5c3} + + + + +The documentation for this class was generated from the following file:\begin{CompactItemize} +\item +{\bf neural++\_\-exception.hpp}\end{CompactItemize} diff --git a/doc/latex/classneuralpp_1_1NeuralNet.tex b/doc/latex/classneuralpp_1_1NeuralNet.tex index 9db1493..512fcdc 100644 --- a/doc/latex/classneuralpp_1_1NeuralNet.tex +++ b/doc/latex/classneuralpp_1_1NeuralNet.tex @@ -17,42 +17,46 @@ enum {\bf source} \{ {\bf file}, \item {\bf NeuralNet} () \begin{CompactList}\small\item\em Empty constructor for the class - it just makes nothing. \item\end{CompactList}\item -{\bf NeuralNet} (size\_\-t in\_\-size, size\_\-t hidden\_\-size, size\_\-t out\_\-size, double l, int e) +{\bf NeuralNet} (size\_\-t in\_\-size, size\_\-t hidden\_\-size, size\_\-t out\_\-size, double l, int e, double th=0.0, double($\ast$a)(double)=\_\-\_\-actv) \begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item -{\bf NeuralNet} (const string file) throw (NetworkFileNotFoundException) -\begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item -{\bf NeuralNet} (size\_\-t in\_\-size, size\_\-t hidden\_\-size, size\_\-t out\_\-size, double($\ast$actv)(double), double l, int e) +{\bf NeuralNet} (const std::string file) throw (NetworkFileNotFoundException) \begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item double {\bf getOutput} () const \begin{CompactList}\small\item\em It gets the output of the network (note: the layer output should contain an only neuron). \item\end{CompactList}\item -vector$<$ double $>$ {\bf getOutputs} () +double {\bf getThreshold} () const +\begin{CompactList}\small\item\em Get the threshold of the neurons in the network. \item\end{CompactList}\item +std::vector$<$ double $>$ {\bf getOutputs} () \begin{CompactList}\small\item\em It gets the output of the network in case the output layer contains more neurons. \item\end{CompactList}\item double {\bf expected} () const -\begin{CompactList}\small\item\em It gets the value expected. \item\end{CompactList}\item -void {\bf setExpected} (double {\bf ex}) -\begin{CompactList}\small\item\em It sets the value you expect from your network. \item\end{CompactList}\item +\begin{CompactList}\small\item\em Get the expected value (in case you have an only neuron in output layer). \item\end{CompactList}\item +std::vector$<$ double $>$ {\bf getExpected} () const +\begin{CompactList}\small\item\em Get the expected value (in case you have an only neuron in output layer). \item\end{CompactList}\item +void {\bf setExpected} (double ex) +\begin{CompactList}\small\item\em It sets the value you expect from your network (in case the network has an only neuron in its output layer). \item\end{CompactList}\item +void {\bf setExpected} (std::vector$<$ double $>$ ex) +\begin{CompactList}\small\item\em Set the values you expect from your network. \item\end{CompactList}\item void {\bf update} () \begin{CompactList}\small\item\em It updates through back-propagation the weights of the synapsis and computes again the output value for {\em epochs\/} times, calling back updateWeights and commitChanges functions. \item\end{CompactList}\item void {\bf propagate} () \begin{CompactList}\small\item\em It propagates values through the network. \item\end{CompactList}\item -void {\bf setInput} (vector$<$ double $>$ \&v) +void {\bf setInput} (std::vector$<$ double $>$ v) \begin{CompactList}\small\item\em It sets the input for the network. \item\end{CompactList}\item void {\bf link} () \begin{CompactList}\small\item\em It links the layers of the network (input, hidden, output). \item\end{CompactList}\item void {\bf save} (const char $\ast$fname) throw (NetworkFileWriteException) \begin{CompactList}\small\item\em Save a trained neural network to a binary file. \item\end{CompactList}\item -void {\bf train} (string xml, {\bf source} src) throw (InvalidXMLException) +void {\bf train} (std::string xml, {\bf source} src) throw (InvalidXMLException) \begin{CompactList}\small\item\em Train a network using a training set loaded from an XML file. \item\end{CompactList}\end{CompactItemize} \subsection*{Static Public Member Functions} \begin{CompactItemize} \item -static void {\bf initXML} (string \&xml) +static void {\bf initXML} (std::string \&xml) \begin{CompactList}\small\item\em Initialize the training XML for the neural network. \item\end{CompactList}\item -static vector$<$ double $>$ {\bf split} (char delim, string str) +static std::vector$<$ double $>$ {\bf split} (char delim, std::string str) \begin{CompactList}\small\item\em Splits a string into a vector of doubles, given a delimitator. \item\end{CompactList}\item -static string {\bf XMLFromSet} (int id, string set) +static std::string {\bf XMLFromSet} (int \&id, std::string set) \begin{CompactList}\small\item\em Get a training set from a string and copies it to an XML For example, these strings could be training sets for making sums: \char`\"{}2,3;5\char`\"{} - \char`\"{}5,6;11\char`\"{} - \char`\"{}2,2;4\char`\"{} - \char`\"{}4,5:9\char`\"{} This method called on the first string will return an XML such this: '$<$training id=\char`\"{}0\char`\"{}$>$$<$input id=\char`\"{}0\char`\"{}$>$2$<$/input$>$$<$input id=\char`\"{}1\char`\"{}$>$3$<$/input$>$$<$output id=\char`\"{}0\char`\"{}$>$5$<$/output$>$ \</training$>$'. \item\end{CompactList}\item -static void {\bf closeXML} (string \&xml) +static void {\bf closeXML} (std::string \&xml) \begin{CompactList}\small\item\em Closes an open XML document generated by \char`\"{}initXML\char`\"{} and \char`\"{}XMLFromSet\char`\"{}. \item\end{CompactList}\end{CompactItemize} \subsection*{Public Attributes} \begin{CompactItemize} @@ -68,10 +72,10 @@ static void {\bf closeXML} (string \&xml) \item void {\bf updateWeights} () \begin{CompactList}\small\item\em It updates the weights of the net's synapsis through back-propagation. \item\end{CompactList}\item -void {\bf commitChanges} ({\bf Layer} $\ast$l) +void {\bf commitChanges} ({\bf Layer} \&l) \begin{CompactList}\small\item\em It commits the changes made by \doxyref{updateWeights()}{p.}{classneuralpp_1_1NeuralNet_94169c89a7cd47122ab5dbf1d5c5e108} to the layer l. \item\end{CompactList}\item -double {\bf error} (double {\bf ex}) const -\begin{CompactList}\small\item\em Get the error made on the expected result as $|$v-v'$|$/v. \item\end{CompactList}\end{CompactItemize} +double {\bf error} (double ex) +\begin{CompactList}\small\item\em Get the error made on the expected result as squared deviance. \item\end{CompactList}\end{CompactItemize} \subsection*{Private Attributes} \begin{CompactItemize} \item @@ -81,7 +85,9 @@ int {\bf ref\_\-epochs} \item double {\bf l\_\-rate} \item -double {\bf ex} +double {\bf threshold} +\item +std::vector$<$ double $>$ {\bf expect} \item double($\ast$ {\bf actv\_\-f} )(double) \begin{CompactList}\small\item\em Private pointer to function, containing the function to be used as activation function. \item\end{CompactList}\end{CompactItemize} @@ -90,7 +96,12 @@ double($\ast$ {\bf actv\_\-f} )(double) \subsection{Detailed Description} Main project's class. -Use $\ast$ONLY$\ast$ this class, unless you know what you're doing +Use $\ast$ONLY$\ast$ this class, unless you know what you're doing \begin{Desc} +\item[Examples: ]\par + + +{\bf examples/adderFromScratch.cpp}, {\bf examples/doAdd.cpp}, and {\bf examples/learnAdd.cpp}.\end{Desc} + \subsection{Member Enumeration Documentation} \index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!source@{source}} @@ -122,7 +133,7 @@ Empty constructor for the class - it just makes nothing. \index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!NeuralNet@{NeuralNet}} \index{NeuralNet@{NeuralNet}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} -\subsubsection[NeuralNet]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::NeuralNet::NeuralNet (size\_\-t {\em in\_\-size}, \/ size\_\-t {\em hidden\_\-size}, \/ size\_\-t {\em out\_\-size}, \/ double {\em l}, \/ int {\em e})}\label{classneuralpp_1_1NeuralNet_c79534c7c0dfb20d1d03be2ad7569b78} +\subsubsection[NeuralNet]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::NeuralNet::NeuralNet (size\_\-t {\em in\_\-size}, \/ size\_\-t {\em hidden\_\-size}, \/ size\_\-t {\em out\_\-size}, \/ double {\em l}, \/ int {\em e}, \/ double {\em th} = {\tt 0.0}, \/ double($\ast$)(double) {\em a} = {\tt \_\-\_\-actv})}\label{classneuralpp_1_1NeuralNet_3d602f3988a9a3e2c77dc6955674f412} Constructor. @@ -130,11 +141,11 @@ Constructor. \begin{Desc} \item[Parameters:] \begin{description} -\item[{\em in\_\-size}]Size of the input layer \item[{\em hidden\_\-size}]Size of the hidden layer \item[{\em out\_\-size}]Size of the output layer \item[{\em l}]learn rate (get it after doing some experiments, but generally try to keep its value quite low to be more accurate) \item[{\em e}]Epochs (cycles) to execute (the most you execute, the most the network can be accurate for its purpose) \end{description} +\item[{\em in\_\-size}]Size of the input layer \item[{\em hidden\_\-size}]Size of the hidden layer \item[{\em out\_\-size}]Size of the output layer \item[{\em l}]learn rate (get it after doing some experiments, but generally try to keep its value quite low to be more accurate) \item[{\em e}]Epochs (cycles) to execute (the most you execute, the most the network can be accurate for its purpose) \item[{\em th}]Threshold, value in [0,1] that establishes how much a neuron must be 'sensitive' on variations of the input values \item[{\em a}]Activation function to use (default: f(x)=x) \end{description} \end{Desc} \index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!NeuralNet@{NeuralNet}} \index{NeuralNet@{NeuralNet}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} -\subsubsection[NeuralNet]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::NeuralNet::NeuralNet (const string {\em file}) throw (NetworkFileNotFoundException)}\label{classneuralpp_1_1NeuralNet_7fc7fc3e3220c138ffa5356fef6b9757} +\subsubsection[NeuralNet]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::NeuralNet::NeuralNet (const std::string {\em file}) throw ({\bf NetworkFileNotFoundException})}\label{classneuralpp_1_1NeuralNet_b4bfa407d28bb17abf7f735a049987d9} Constructor. @@ -147,19 +158,7 @@ Constructor. \begin{Desc} \item[Exceptions:] \begin{description} -\item[{\em NetworkFileNotFoundException}]\end{description} -\end{Desc} -\index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!NeuralNet@{NeuralNet}} -\index{NeuralNet@{NeuralNet}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} -\subsubsection[NeuralNet]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::NeuralNet::NeuralNet (size\_\-t {\em in\_\-size}, \/ size\_\-t {\em hidden\_\-size}, \/ size\_\-t {\em out\_\-size}, \/ double($\ast$)(double) {\em actv}, \/ double {\em l}, \/ int {\em e})}\label{classneuralpp_1_1NeuralNet_0c16df2e0701503052c63749930b238e} - - -Constructor. - -\begin{Desc} -\item[Parameters:] -\begin{description} -\item[{\em in\_\-size}]Size of the input layer \item[{\em hidden\_\-size}]Size of the hidden layer \item[{\em out\_\-size}]Size of the output layer \item[{\em actv}]Activation function to use (default: f(x)=x) \item[{\em l}]learn rate (get it after doing some experiments, but generally try to keep its value quite low to be more accurate) \item[{\em e}]Epochs (cycles) to execute (the most you execute, the most the network can be accurate for its purpose) \end{description} +\item[{\em \doxyref{NetworkFileNotFoundException}{p.}{classneuralpp_1_1NetworkFileNotFoundException}}]\end{description} \end{Desc} @@ -173,7 +172,7 @@ It updates the weights of the net's synapsis through back-propagation. In-class use only \index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!commitChanges@{commitChanges}} \index{commitChanges@{commitChanges}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} -\subsubsection[commitChanges]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::NeuralNet::commitChanges ({\bf Layer} $\ast$ {\em l})\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1NeuralNet_62695a82dfb1df758a44150921aec8e0} +\subsubsection[commitChanges]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::NeuralNet::commitChanges ({\bf Layer} \& {\em l})\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1NeuralNet_f697a8d9967ad8f03e5a16a42cd110c5} It commits the changes made by \doxyref{updateWeights()}{p.}{classneuralpp_1_1NeuralNet_94169c89a7cd47122ab5dbf1d5c5e108} to the layer l. @@ -185,10 +184,10 @@ In-class use only \begin{Desc} \end{Desc} \index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!error@{error}} \index{error@{error}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} -\subsubsection[error]{\setlength{\rightskip}{0pt plus 5cm}double neuralpp::NeuralNet::error (double {\em ex}) const\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1NeuralNet_0616c51404efaca2714e37dd7478997e} +\subsubsection[error]{\setlength{\rightskip}{0pt plus 5cm}double neuralpp::NeuralNet::error (double {\em ex})\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1NeuralNet_8a140d28e6dd4097470c7c138801ad01} -Get the error made on the expected result as $|$v-v'$|$/v. +Get the error made on the expected result as squared deviance. \begin{Desc} \item[Parameters:] @@ -206,21 +205,45 @@ It gets the output of the network (note: the layer output should contain an only \begin{Desc} \item[Returns:]The output value of the network \end{Desc} +\begin{Desc} +\item[Examples: ]\par +{\bf examples/doAdd.cpp}.\end{Desc} +\index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!getThreshold@{getThreshold}} +\index{getThreshold@{getThreshold}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} +\subsubsection[getThreshold]{\setlength{\rightskip}{0pt plus 5cm}double neuralpp::NeuralNet::getThreshold () const}\label{classneuralpp_1_1NeuralNet_e08cdcf4b70f987700e553d9914f6179} + + +Get the threshold of the neurons in the network. + +\begin{Desc} +\item[Returns:]The threshold of the neurons \end{Desc} \index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!getOutputs@{getOutputs}} \index{getOutputs@{getOutputs}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} -\subsubsection[getOutputs]{\setlength{\rightskip}{0pt plus 5cm}vector$<$double$>$ neuralpp::NeuralNet::getOutputs ()}\label{classneuralpp_1_1NeuralNet_a6b8bf3800b43b58843c65fc431207ae} +\subsubsection[getOutputs]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<$double$>$ neuralpp::NeuralNet::getOutputs ()}\label{classneuralpp_1_1NeuralNet_e6d2215ecc8b560db2f6797db642191c} It gets the output of the network in case the output layer contains more neurons. \begin{Desc} \item[Returns:]A vector containing the output values of the network \end{Desc} +\begin{Desc} +\item[Examples: ]\par +{\bf examples/adderFromScratch.cpp}.\end{Desc} \index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!expected@{expected}} \index{expected@{expected}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} \subsubsection[expected]{\setlength{\rightskip}{0pt plus 5cm}double neuralpp::NeuralNet::expected () const}\label{classneuralpp_1_1NeuralNet_562dfe9fb8d73bf25a23ce608451d3aa} -It gets the value expected. +Get the expected value (in case you have an only neuron in output layer). + +Of course you should specify this when you build your network by using setExpected. \begin{Desc} +\item[Returns:]The expected output value for a certain training phase \end{Desc} +\index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!getExpected@{getExpected}} +\index{getExpected@{getExpected}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} +\subsubsection[getExpected]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<$double$>$ neuralpp::NeuralNet::getExpected () const}\label{classneuralpp_1_1NeuralNet_51a1851ed07b85bec091c9053ae99cf7} + + +Get the expected value (in case you have an only neuron in output layer). Of course you should specify this when you build your network by using setExpected. \begin{Desc} \item[Returns:]The expected output value for a certain training phase \end{Desc} @@ -229,13 +252,25 @@ Of course you should specify this when you build your network by using setExpect \subsubsection[setExpected]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::NeuralNet::setExpected (double {\em ex})}\label{classneuralpp_1_1NeuralNet_b6475762b7e9eab086befdc511f7c236} -It sets the value you expect from your network. +It sets the value you expect from your network (in case the network has an only neuron in its output layer). \begin{Desc} \item[Parameters:] \begin{description} \item[{\em ex}]Expected output value \end{description} \end{Desc} +\index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!setExpected@{setExpected}} +\index{setExpected@{setExpected}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} +\subsubsection[setExpected]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::NeuralNet::setExpected (std::vector$<$ double $>$ {\em ex})}\label{classneuralpp_1_1NeuralNet_e649edc3d86bec7c0e178d5c892b4fd7} + + +Set the values you expect from your network. + +\begin{Desc} +\item[Parameters:] +\begin{description} +\item[{\em ex}]Expected output values \end{description} +\end{Desc} \index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!update@{update}} \index{update@{update}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} \subsubsection[update]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::NeuralNet::update ()}\label{classneuralpp_1_1NeuralNet_b0bd1daadb06980dff1f50d33a7c098e} @@ -250,9 +285,12 @@ It updates through back-propagation the weights of the synapsis and computes aga It propagates values through the network. -Use this when you want to give an already trained network some new values the get to the output \index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!setInput@{setInput}} +Use this when you want to give an already trained network some new values the get to the output \begin{Desc} +\item[Examples: ]\par +{\bf examples/adderFromScratch.cpp}, and {\bf examples/doAdd.cpp}.\end{Desc} +\index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!setInput@{setInput}} \index{setInput@{setInput}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} -\subsubsection[setInput]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::NeuralNet::setInput (vector$<$ double $>$ \& {\em v})}\label{classneuralpp_1_1NeuralNet_0de170e8ab561ad63d0739b4c4b74f68} +\subsubsection[setInput]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::NeuralNet::setInput (std::vector$<$ double $>$ {\em v})}\label{classneuralpp_1_1NeuralNet_405b32d2928344314ecf0469070b0f17} It sets the input for the network. @@ -262,6 +300,9 @@ It sets the input for the network. \begin{description} \item[{\em v}]Vector of doubles, containing the values to give to your network \end{description} \end{Desc} +\begin{Desc} +\item[Examples: ]\par +{\bf examples/adderFromScratch.cpp}, and {\bf examples/doAdd.cpp}.\end{Desc} \index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!link@{link}} \index{link@{link}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} \subsubsection[link]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::NeuralNet::link ()}\label{classneuralpp_1_1NeuralNet_46f23f462318a4ffc037a4e806364c3f} @@ -271,7 +312,7 @@ It links the layers of the network (input, hidden, output). Don't use unless you exactly know what you're doing, it is already called by the constructor \index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!save@{save}} \index{save@{save}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} -\subsubsection[save]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::NeuralNet::save (const char $\ast$ {\em fname}) throw (NetworkFileWriteException)}\label{classneuralpp_1_1NeuralNet_fdf94c276720c25e565cac834fe8a407} +\subsubsection[save]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::NeuralNet::save (const char $\ast$ {\em fname}) throw ({\bf NetworkFileWriteException})}\label{classneuralpp_1_1NeuralNet_fdf94c276720c25e565cac834fe8a407} Save a trained neural network to a binary file. @@ -284,11 +325,14 @@ Save a trained neural network to a binary file. \begin{Desc} \item[Exceptions:] \begin{description} -\item[{\em NetworkFileWriteException}]When you get an error writing the network's information to a file \end{description} +\item[{\em \doxyref{NetworkFileWriteException}{p.}{classneuralpp_1_1NetworkFileWriteException}}]When you get an error writing the network's information to a file \end{description} \end{Desc} +\begin{Desc} +\item[Examples: ]\par +{\bf examples/learnAdd.cpp}.\end{Desc} \index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!train@{train}} \index{train@{train}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} -\subsubsection[train]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::NeuralNet::train (string {\em xml}, \/ {\bf source} {\em src}) throw (InvalidXMLException)}\label{classneuralpp_1_1NeuralNet_ead4bdef0602a5cadbe3beb685e01f5f} +\subsubsection[train]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::NeuralNet::train (std::string {\em xml}, \/ {\bf source} {\em src}) throw ({\bf InvalidXMLException})}\label{classneuralpp_1_1NeuralNet_1c9e17437d41a7048611e21a3cc1c7dd} Train a network using a training set loaded from an XML file. @@ -301,11 +345,14 @@ A sample XML file is available in examples/adder.xml \begin{Desc} \begin{Desc} \item[Exceptions:] \begin{description} -\item[{\em InvalidXMLException}]\end{description} +\item[{\em \doxyref{InvalidXMLException}{p.}{classneuralpp_1_1InvalidXMLException}}]\end{description} \end{Desc} +\begin{Desc} +\item[Examples: ]\par +{\bf examples/adderFromScratch.cpp}, and {\bf examples/learnAdd.cpp}.\end{Desc} \index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!initXML@{initXML}} \index{initXML@{initXML}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} -\subsubsection[initXML]{\setlength{\rightskip}{0pt plus 5cm}static void neuralpp::NeuralNet::initXML (string \& {\em xml})\hspace{0.3cm}{\tt [static]}}\label{classneuralpp_1_1NeuralNet_45c7645d4affe65752d37cd230afba24} +\subsubsection[initXML]{\setlength{\rightskip}{0pt plus 5cm}static void neuralpp::NeuralNet::initXML (std::string \& {\em xml})\hspace{0.3cm}{\tt [static]}}\label{classneuralpp_1_1NeuralNet_96da6712a72051cf34ad961761ef6e08} Initialize the training XML for the neural network. @@ -317,7 +364,7 @@ Initialize the training XML for the neural network. \end{Desc} \index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!split@{split}} \index{split@{split}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} -\subsubsection[split]{\setlength{\rightskip}{0pt plus 5cm}static vector$<$double$>$ neuralpp::NeuralNet::split (char {\em delim}, \/ string {\em str})\hspace{0.3cm}{\tt [static]}}\label{classneuralpp_1_1NeuralNet_e07af23ceb8666518da0c035bf1e0376} +\subsubsection[split]{\setlength{\rightskip}{0pt plus 5cm}static std::vector$<$double$>$ neuralpp::NeuralNet::split (char {\em delim}, \/ std::string {\em str})\hspace{0.3cm}{\tt [static]}}\label{classneuralpp_1_1NeuralNet_83c6555520856d5867752904349ab6ca} Splits a string into a vector of doubles, given a delimitator. @@ -331,7 +378,7 @@ Splits a string into a vector of doubles, given a delimitator. \item[Returns:]Vector of doubles containing splitted values \end{Desc} \index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!XMLFromSet@{XMLFromSet}} \index{XMLFromSet@{XMLFromSet}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} -\subsubsection[XMLFromSet]{\setlength{\rightskip}{0pt plus 5cm}static string neuralpp::NeuralNet::XMLFromSet (int {\em id}, \/ string {\em set})\hspace{0.3cm}{\tt [static]}}\label{classneuralpp_1_1NeuralNet_4be31ecb0b543a192997bd83c6995ccb} +\subsubsection[XMLFromSet]{\setlength{\rightskip}{0pt plus 5cm}static std::string neuralpp::NeuralNet::XMLFromSet (int \& {\em id}, \/ std::string {\em set})\hspace{0.3cm}{\tt [static]}}\label{classneuralpp_1_1NeuralNet_0a2733037af912b3e6a10146e7b7172f} Get a training set from a string and copies it to an XML For example, these strings could be training sets for making sums: \char`\"{}2,3;5\char`\"{} - \char`\"{}5,6;11\char`\"{} - \char`\"{}2,2;4\char`\"{} - \char`\"{}4,5:9\char`\"{} This method called on the first string will return an XML such this: '$<$training id=\char`\"{}0\char`\"{}$>$$<$input id=\char`\"{}0\char`\"{}$>$2$<$/input$>$$<$input id=\char`\"{}1\char`\"{}$>$3$<$/input$>$$<$output id=\char`\"{}0\char`\"{}$>$5$<$/output$>$ \</training$>$'. @@ -345,7 +392,7 @@ Get a training set from a string and copies it to an XML For example, these stri \item[Returns:]XML string \end{Desc} \index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!closeXML@{closeXML}} \index{closeXML@{closeXML}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} -\subsubsection[closeXML]{\setlength{\rightskip}{0pt plus 5cm}static void neuralpp::NeuralNet::closeXML (string \& {\em xml})\hspace{0.3cm}{\tt [static]}}\label{classneuralpp_1_1NeuralNet_28b9966c5f197b8e86d57dd104aa32a6} +\subsubsection[closeXML]{\setlength{\rightskip}{0pt plus 5cm}static void neuralpp::NeuralNet::closeXML (std::string \& {\em xml})\hspace{0.3cm}{\tt [static]}}\label{classneuralpp_1_1NeuralNet_e17732ed578bc4bd6032bfae58a5cf51} Closes an open XML document generated by \char`\"{}initXML\char`\"{} and \char`\"{}XMLFromSet\char`\"{}. @@ -373,9 +420,14 @@ Closes an open XML document generated by \char`\"{}initXML\char`\"{} and \char`\ \subsubsection[l\_\-rate]{\setlength{\rightskip}{0pt plus 5cm}double {\bf neuralpp::NeuralNet::l\_\-rate}\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1NeuralNet_6bd7be443e46b2fdbf1da2edb8e611ab} -\index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!ex@{ex}} -\index{ex@{ex}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} -\subsubsection[ex]{\setlength{\rightskip}{0pt plus 5cm}double {\bf neuralpp::NeuralNet::ex}\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1NeuralNet_261f5f68fcc5be54250cfa03945266dd} +\index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!threshold@{threshold}} +\index{threshold@{threshold}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} +\subsubsection[threshold]{\setlength{\rightskip}{0pt plus 5cm}double {\bf neuralpp::NeuralNet::threshold}\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1NeuralNet_327dbfdd72b0a74293f8f29630525aa3} + + +\index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!expect@{expect}} +\index{expect@{expect}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} +\subsubsection[expect]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<$double$>$ {\bf neuralpp::NeuralNet::expect}\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1NeuralNet_a9e4ff43427f56663739c4c7450de8ee} \index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!actv\_\-f@{actv\_\-f}} diff --git a/doc/latex/classneuralpp_1_1Neuron.tex b/doc/latex/classneuralpp_1_1Neuron.tex index adcafd5..c6f0ba2 100644 --- a/doc/latex/classneuralpp_1_1Neuron.tex +++ b/doc/latex/classneuralpp_1_1Neuron.tex @@ -8,17 +8,17 @@ Class for managing neurons. \subsection*{Public Member Functions} \begin{CompactItemize} \item -{\bf Neuron} (double($\ast$a)(double)) +{\bf Neuron} (double($\ast$a)(double), double th=0.0) \begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item -{\bf Neuron} (vector$<$ {\bf Synapsis} $>$ {\bf in}, vector$<$ {\bf Synapsis} $>$ {\bf out}, double($\ast$a)(double)) +{\bf Neuron} (std::vector$<$ {\bf Synapsis} $>$ {\bf in}, std::vector$<$ {\bf Synapsis} $>$ {\bf out}, double($\ast$a)(double), double th=0.0) \begin{CompactList}\small\item\em Alternative constructor, that gets also the synapsis linked to the neuron. \item\end{CompactList}\item {\bf Synapsis} \& {\bf synIn} (size\_\-t i) \begin{CompactList}\small\item\em Get the i-th synapsis connected on the input of the neuron. \item\end{CompactList}\item {\bf Synapsis} \& {\bf synOut} (size\_\-t i) \begin{CompactList}\small\item\em Get the i-th synapsis connected on the output of the neuron. \item\end{CompactList}\item -void {\bf push\_\-in} ({\bf Synapsis} \&s) +void {\bf push\_\-in} ({\bf Synapsis} s) \begin{CompactList}\small\item\em It pushes a new input synapsis. \item\end{CompactList}\item -void {\bf push\_\-out} ({\bf Synapsis} \&s) +void {\bf push\_\-out} ({\bf Synapsis} s) \begin{CompactList}\small\item\em It pushes a new output synapsis. \item\end{CompactList}\item void {\bf setActv} (double a) \begin{CompactList}\small\item\em Change the activation value of the neuron. \item\end{CompactList}\item @@ -28,8 +28,8 @@ double {\bf getActv} () \begin{CompactList}\small\item\em Get the activation value of the neuron. \item\end{CompactList}\item double {\bf getProp} () \begin{CompactList}\small\item\em Get the propagation value of the neuron. \item\end{CompactList}\item -double {\bf propagate} () -\begin{CompactList}\small\item\em It propagates its activation value to the connected neurons. \item\end{CompactList}\item +void {\bf propagate} () +\begin{CompactList}\small\item\em Compute the propagation value of the neuron and set it. \item\end{CompactList}\item size\_\-t {\bf nIn} () \begin{CompactList}\small\item\em Get the number of input synapsis for the neuron. \item\end{CompactList}\item size\_\-t {\bf nOut} () @@ -43,9 +43,11 @@ double {\bf actv\_\-val} \item double {\bf prop\_\-val} \item -vector$<$ {\bf Synapsis} $>$ {\bf in} +double {\bf threshold} \item -vector$<$ {\bf Synapsis} $>$ {\bf out} +std::vector$<$ {\bf Synapsis} $>$ {\bf in} +\item +std::vector$<$ {\bf Synapsis} $>$ {\bf out} \item double($\ast$ {\bf actv\_\-f} )(double) \end{CompactItemize} @@ -59,7 +61,7 @@ Don't use this class directly unless you know what you're doing, use \doxyref{Ne \subsection{Constructor \& Destructor Documentation} \index{neuralpp::Neuron@{neuralpp::Neuron}!Neuron@{Neuron}} \index{Neuron@{Neuron}!neuralpp::Neuron@{neuralpp::Neuron}} -\subsubsection[Neuron]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::Neuron::Neuron (double($\ast$)(double) {\em a})}\label{classneuralpp_1_1Neuron_9863a08b73bc97c8b514aca6c580ff7b} +\subsubsection[Neuron]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::Neuron::Neuron (double($\ast$)(double) {\em a}, \/ double {\em th} = {\tt 0.0})}\label{classneuralpp_1_1Neuron_c9bd4f5f618fcf1adcebf1ab63ee0960} Constructor. @@ -67,11 +69,11 @@ Constructor. \begin{Desc} \item[Parameters:] \begin{description} -\item[{\em a}]Activation function \end{description} +\item[{\em a}]Activation function \item[{\em th}]Threshold, value in [0,1] that establishes how much a neuron must be 'sensitive' on variations of the input values \end{description} \end{Desc} \index{neuralpp::Neuron@{neuralpp::Neuron}!Neuron@{Neuron}} \index{Neuron@{Neuron}!neuralpp::Neuron@{neuralpp::Neuron}} -\subsubsection[Neuron]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::Neuron::Neuron (vector$<$ {\bf Synapsis} $>$ {\em in}, \/ vector$<$ {\bf Synapsis} $>$ {\em out}, \/ double($\ast$)(double) {\em a})}\label{classneuralpp_1_1Neuron_f1bf19ec93174f60b368ee4a91b03f46} +\subsubsection[Neuron]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::Neuron::Neuron (std::vector$<$ {\bf Synapsis} $>$ {\em in}, \/ std::vector$<$ {\bf Synapsis} $>$ {\em out}, \/ double($\ast$)(double) {\em a}, \/ double {\em th} = {\tt 0.0})}\label{classneuralpp_1_1Neuron_d15e96b0316d880953288cc6e2550bec} Alternative constructor, that gets also the synapsis linked to the neuron. @@ -79,7 +81,7 @@ Alternative constructor, that gets also the synapsis linked to the neuron. \begin{Desc} \item[Parameters:] \begin{description} -\item[{\em in}]Input synapses \item[{\em out}]Output synapses \item[{\em a}]Activation function \end{description} +\item[{\em in}]Input synapses \item[{\em out}]Output synapses \item[{\em a}]Activation function \item[{\em th}]Threshold, value in [0,1] that establishes how much a neuron must be 'sensitive' on variations of the input values \end{description} \end{Desc} @@ -114,7 +116,7 @@ Get the i-th synapsis connected on the output of the neuron. \item[Returns:]Reference to the i-th synapsis \end{Desc} \index{neuralpp::Neuron@{neuralpp::Neuron}!push\_\-in@{push\_\-in}} \index{push\_\-in@{push\_\-in}!neuralpp::Neuron@{neuralpp::Neuron}} -\subsubsection[push\_\-in]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::Neuron::push\_\-in ({\bf Synapsis} \& {\em s})}\label{classneuralpp_1_1Neuron_583ada6e1dd3f2e113415b4d89196e62} +\subsubsection[push\_\-in]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::Neuron::push\_\-in ({\bf Synapsis} {\em s})}\label{classneuralpp_1_1Neuron_4d252151c35839975838539d846d70be} It pushes a new input synapsis. @@ -126,7 +128,7 @@ It pushes a new input synapsis. \end{Desc} \index{neuralpp::Neuron@{neuralpp::Neuron}!push\_\-out@{push\_\-out}} \index{push\_\-out@{push\_\-out}!neuralpp::Neuron@{neuralpp::Neuron}} -\subsubsection[push\_\-out]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::Neuron::push\_\-out ({\bf Synapsis} \& {\em s})}\label{classneuralpp_1_1Neuron_bca65db84f56f9d40694bfbcd25812cb} +\subsubsection[push\_\-out]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::Neuron::push\_\-out ({\bf Synapsis} {\em s})}\label{classneuralpp_1_1Neuron_2c0acb0e6d413c4e0fc9e7939da1a684} It pushes a new output synapsis. @@ -180,10 +182,10 @@ Get the propagation value of the neuron. \item[Returns:]Propagation value for the neuron \end{Desc} \index{neuralpp::Neuron@{neuralpp::Neuron}!propagate@{propagate}} \index{propagate@{propagate}!neuralpp::Neuron@{neuralpp::Neuron}} -\subsubsection[propagate]{\setlength{\rightskip}{0pt plus 5cm}double neuralpp::Neuron::propagate ()}\label{classneuralpp_1_1Neuron_8b0ca61cd0e047c8691ab39aae56dbda} +\subsubsection[propagate]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::Neuron::propagate ()}\label{classneuralpp_1_1Neuron_928d9bf5aed600119c640779e4034f30} -It propagates its activation value to the connected neurons. +Compute the propagation value of the neuron and set it. \index{neuralpp::Neuron@{neuralpp::Neuron}!nIn@{nIn}} \index{nIn@{nIn}!neuralpp::Neuron@{neuralpp::Neuron}} @@ -223,14 +225,19 @@ Remove input and output synapsis from a neuron. \subsubsection[prop\_\-val]{\setlength{\rightskip}{0pt plus 5cm}double {\bf neuralpp::Neuron::prop\_\-val}\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1Neuron_da75259de98b1a893c736666af6bfdc3} +\index{neuralpp::Neuron@{neuralpp::Neuron}!threshold@{threshold}} +\index{threshold@{threshold}!neuralpp::Neuron@{neuralpp::Neuron}} +\subsubsection[threshold]{\setlength{\rightskip}{0pt plus 5cm}double {\bf neuralpp::Neuron::threshold}\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1Neuron_7b16632868821d73dedcb8edaf6dbbef} + + \index{neuralpp::Neuron@{neuralpp::Neuron}!in@{in}} \index{in@{in}!neuralpp::Neuron@{neuralpp::Neuron}} -\subsubsection[in]{\setlength{\rightskip}{0pt plus 5cm}vector$<$ {\bf Synapsis} $>$ {\bf neuralpp::Neuron::in}\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1Neuron_ead827210fa18c2baae03927b2c798ff} +\subsubsection[in]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<$ {\bf Synapsis} $>$ {\bf neuralpp::Neuron::in}\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1Neuron_bd07357465bb7b29bb344400e9e08710} \index{neuralpp::Neuron@{neuralpp::Neuron}!out@{out}} \index{out@{out}!neuralpp::Neuron@{neuralpp::Neuron}} -\subsubsection[out]{\setlength{\rightskip}{0pt plus 5cm}vector$<$ {\bf Synapsis} $>$ {\bf neuralpp::Neuron::out}\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1Neuron_82a4297f84d6403e52a8386d26117b4f} +\subsubsection[out]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<$ {\bf Synapsis} $>$ {\bf neuralpp::Neuron::out}\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1Neuron_982aceef324b7764e778d5949720bc55} \index{neuralpp::Neuron@{neuralpp::Neuron}!actv\_\-f@{actv\_\-f}} diff --git a/doc/latex/classneuralpp_1_1Synapsis.tex b/doc/latex/classneuralpp_1_1Synapsis.tex index 58272de..db47e64 100644 --- a/doc/latex/classneuralpp_1_1Synapsis.tex +++ b/doc/latex/classneuralpp_1_1Synapsis.tex @@ -14,21 +14,21 @@ Class for managing synapsis. \begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item {\bf Synapsis} ({\bf Neuron} $\ast$i, {\bf Neuron} $\ast$o, double w, double($\ast$a)(double)) \begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item -{\bf Neuron} $\ast$ {\bf getIn} () +{\bf Neuron} $\ast$ {\bf getIn} () const \item -{\bf Neuron} $\ast$ {\bf getOut} () +{\bf Neuron} $\ast$ {\bf getOut} () const \item void {\bf setWeight} (double w) throw (InvalidSynapticalWeightException) \begin{CompactList}\small\item\em Set the weight of the synapsis. \item\end{CompactList}\item void {\bf setDelta} (double d) throw (InvalidSynapticalWeightException) \begin{CompactList}\small\item\em It sets the delta (how much to change the weight after an update) of the synapsis. \item\end{CompactList}\item -double {\bf getWeight} () +double {\bf getWeight} () const \begin{CompactList}\small\item\em Return the weight of the synapsis. \item\end{CompactList}\item -double {\bf getDelta} () +double {\bf getDelta} () const \begin{CompactList}\small\item\em Return the delta of the synapsis. \item\end{CompactList}\item -double {\bf getPrevDelta} () +double {\bf getPrevDelta} () const \begin{CompactList}\small\item\em Get the delta of the synapsis at the previous iteration. \item\end{CompactList}\item -double {\bf momentum} (int N, int x) +double {\bf momentum} (int N, int x) const \begin{CompactList}\small\item\em Get the inertial momentum of a synapsis. \item\end{CompactList}\end{CompactItemize} \subsection*{Private Attributes} \begin{CompactItemize} @@ -94,21 +94,21 @@ Constructor. \subsection{Member Function Documentation} \index{neuralpp::Synapsis@{neuralpp::Synapsis}!getIn@{getIn}} \index{getIn@{getIn}!neuralpp::Synapsis@{neuralpp::Synapsis}} -\subsubsection[getIn]{\setlength{\rightskip}{0pt plus 5cm}{\bf Neuron}$\ast$ neuralpp::Synapsis::getIn ()}\label{classneuralpp_1_1Synapsis_5ba8a93a5741f4855390eb8a46e99435} +\subsubsection[getIn]{\setlength{\rightskip}{0pt plus 5cm}{\bf Neuron}$\ast$ neuralpp::Synapsis::getIn () const}\label{classneuralpp_1_1Synapsis_298fd3c7483ad572899fecec01ac8fdf} \begin{Desc} \item[Returns:]Reference to input neuron of the synapsis \end{Desc} \index{neuralpp::Synapsis@{neuralpp::Synapsis}!getOut@{getOut}} \index{getOut@{getOut}!neuralpp::Synapsis@{neuralpp::Synapsis}} -\subsubsection[getOut]{\setlength{\rightskip}{0pt plus 5cm}{\bf Neuron}$\ast$ neuralpp::Synapsis::getOut ()}\label{classneuralpp_1_1Synapsis_61c9a04e03291a01f44520cef143cbdd} +\subsubsection[getOut]{\setlength{\rightskip}{0pt plus 5cm}{\bf Neuron}$\ast$ neuralpp::Synapsis::getOut () const}\label{classneuralpp_1_1Synapsis_b46d876761a73a24db87f5a144a0e899} \begin{Desc} \item[Returns:]Reference to output neuron of the synapsis \end{Desc} \index{neuralpp::Synapsis@{neuralpp::Synapsis}!setWeight@{setWeight}} \index{setWeight@{setWeight}!neuralpp::Synapsis@{neuralpp::Synapsis}} -\subsubsection[setWeight]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::Synapsis::setWeight (double {\em w}) throw (InvalidSynapticalWeightException)}\label{classneuralpp_1_1Synapsis_acee77d0fdf9889464ab5ed27beae0ff} +\subsubsection[setWeight]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::Synapsis::setWeight (double {\em w}) throw ({\bf InvalidSynapticalWeightException})}\label{classneuralpp_1_1Synapsis_acee77d0fdf9889464ab5ed27beae0ff} Set the weight of the synapsis. @@ -120,7 +120,7 @@ Set the weight of the synapsis. \end{Desc} \index{neuralpp::Synapsis@{neuralpp::Synapsis}!setDelta@{setDelta}} \index{setDelta@{setDelta}!neuralpp::Synapsis@{neuralpp::Synapsis}} -\subsubsection[setDelta]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::Synapsis::setDelta (double {\em d}) throw (InvalidSynapticalWeightException)}\label{classneuralpp_1_1Synapsis_429ad5b25930faf436a9d725582802e1} +\subsubsection[setDelta]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::Synapsis::setDelta (double {\em d}) throw ({\bf InvalidSynapticalWeightException})}\label{classneuralpp_1_1Synapsis_429ad5b25930faf436a9d725582802e1} It sets the delta (how much to change the weight after an update) of the synapsis. @@ -132,7 +132,7 @@ It sets the delta (how much to change the weight after an update) of the synapsi \end{Desc} \index{neuralpp::Synapsis@{neuralpp::Synapsis}!getWeight@{getWeight}} \index{getWeight@{getWeight}!neuralpp::Synapsis@{neuralpp::Synapsis}} -\subsubsection[getWeight]{\setlength{\rightskip}{0pt plus 5cm}double neuralpp::Synapsis::getWeight ()}\label{classneuralpp_1_1Synapsis_aa79c16ec6b59949e5d2f75a3f10d530} +\subsubsection[getWeight]{\setlength{\rightskip}{0pt plus 5cm}double neuralpp::Synapsis::getWeight () const}\label{classneuralpp_1_1Synapsis_bcbf7228632ff4d6bbb67703323d2db0} Return the weight of the synapsis. @@ -141,7 +141,7 @@ Return the weight of the synapsis. \item[Returns:]Weight of the synapsis \end{Desc} \index{neuralpp::Synapsis@{neuralpp::Synapsis}!getDelta@{getDelta}} \index{getDelta@{getDelta}!neuralpp::Synapsis@{neuralpp::Synapsis}} -\subsubsection[getDelta]{\setlength{\rightskip}{0pt plus 5cm}double neuralpp::Synapsis::getDelta ()}\label{classneuralpp_1_1Synapsis_18f15b920609be8b818d43a0227aada5} +\subsubsection[getDelta]{\setlength{\rightskip}{0pt plus 5cm}double neuralpp::Synapsis::getDelta () const}\label{classneuralpp_1_1Synapsis_00c8e9c0804662f2b3247d6dddb4ca6c} Return the delta of the synapsis. @@ -150,7 +150,7 @@ Return the delta of the synapsis. \item[Returns:]Delta of the synapsis \end{Desc} \index{neuralpp::Synapsis@{neuralpp::Synapsis}!getPrevDelta@{getPrevDelta}} \index{getPrevDelta@{getPrevDelta}!neuralpp::Synapsis@{neuralpp::Synapsis}} -\subsubsection[getPrevDelta]{\setlength{\rightskip}{0pt plus 5cm}double neuralpp::Synapsis::getPrevDelta ()}\label{classneuralpp_1_1Synapsis_2fe3e9ec97542f1476d8b9306aa09756} +\subsubsection[getPrevDelta]{\setlength{\rightskip}{0pt plus 5cm}double neuralpp::Synapsis::getPrevDelta () const}\label{classneuralpp_1_1Synapsis_0148b9c8db870c928711168702ae51c5} Get the delta of the synapsis at the previous iteration. @@ -159,7 +159,7 @@ Get the delta of the synapsis at the previous iteration. \item[Returns:]The previous delta \end{Desc} \index{neuralpp::Synapsis@{neuralpp::Synapsis}!momentum@{momentum}} \index{momentum@{momentum}!neuralpp::Synapsis@{neuralpp::Synapsis}} -\subsubsection[momentum]{\setlength{\rightskip}{0pt plus 5cm}double neuralpp::Synapsis::momentum (int {\em N}, \/ int {\em x})}\label{classneuralpp_1_1Synapsis_ecdb17182de791f7fdd417232e184350} +\subsubsection[momentum]{\setlength{\rightskip}{0pt plus 5cm}double neuralpp::Synapsis::momentum (int {\em N}, \/ int {\em x}) const}\label{classneuralpp_1_1Synapsis_cff10a022d4c021688e4df944c05d8bd} Get the inertial momentum of a synapsis. diff --git a/doc/latex/doxygen.sty b/doc/latex/doxygen.sty index cdfa104..6fde198 100644 --- a/doc/latex/doxygen.sty +++ b/doc/latex/doxygen.sty @@ -10,8 +10,8 @@ {\fancyplain{}{\bfseries\rightmark}} \rhead[\fancyplain{}{\bfseries\leftmark}] {\fancyplain{}{\bfseries\thepage}} -\rfoot[\fancyplain{}{\bfseries\scriptsize Generated on Sat Aug 15 02:56:02 2009 for Neural++ by Doxygen }]{} -\lfoot[]{\fancyplain{}{\bfseries\scriptsize Generated on Sat Aug 15 02:56:02 2009 for Neural++ by Doxygen }} +\rfoot[\fancyplain{}{\bfseries\scriptsize Generated on Sun Aug 16 20:53:42 2009 for Neural++ by Doxygen }]{} +\lfoot[]{\fancyplain{}{\bfseries\scriptsize Generated on Sun Aug 16 20:53:42 2009 for Neural++ by Doxygen }} \cfoot{} \newenvironment{Code} {\footnotesize} diff --git a/doc/latex/examples.tex b/doc/latex/examples.tex new file mode 100644 index 0000000..da45cf7 --- /dev/null +++ b/doc/latex/examples.tex @@ -0,0 +1,9 @@ +\section{Examples} +Here is a list of all examples:\begin{CompactItemize} +\item +{\bf examples/adderFromScratch.cpp} +\item +{\bf examples/doAdd.cpp} +\item +{\bf examples/learnAdd.cpp} +\end{CompactItemize} diff --git a/doc/latex/examples_2adderFromScratch_8cpp-example.tex b/doc/latex/examples_2adderFromScratch_8cpp-example.tex new file mode 100644 index 0000000..f17c501 --- /dev/null +++ b/doc/latex/examples_2adderFromScratch_8cpp-example.tex @@ -0,0 +1,48 @@ +\section{examples/adderFromScratch.cpp} +Similar to learnAdd.cpp, but this time the training XML is generated as a string and not saved to a file, and parsed by the program itself to build the network. Then, the program asks two real numbers, and performs both the sum and the difference between them, putting the sum's output on the first output neuron and the difference's on the second output neuron. Anyway, using more than one neuron in the output layer is strongly discouraged, as the network usually won't set correctly the synaptical weights to give satisfying and accurate answers for all of the operations. + + + +\begin{DocInclude}\begin{verbatim} +#include +#include + +using namespace std; +using namespace neuralpp; + +int main() { + NeuralNet net(2, 2, 2, 0.005, 100); + string xml; + double tmp; + int id = 0; + + // XML initialization. Then, I say XML that 2+3=5, 3+3=6, 5+4=9 + // Strings' format is "input1,input2,...,inputn;output1,output2,...,outputm + NeuralNet::initXML(xml); + xml += NeuralNet::XMLFromSet(id, "3,2;5,1"); + xml += NeuralNet::XMLFromSet(id, "4,2;6,2"); + xml += NeuralNet::XMLFromSet(id, "6,3;9,3"); + NeuralNet::closeXML(xml); + cout << xml << endl; + + net.train(xml, NeuralNet::str); + vector v; + cout << "Network status: trained\n\n"; + + cout << "First number to add: "; + cin >> tmp; + v.push_back(tmp); + + cout << "Second number to add: "; + cin >> tmp; + v.push_back(tmp); + + net.setInput(v); + net.propagate(); + cout << "Output: " << net.getOutputs()[0] << "; " << net.getOutputs()[1] << endl; + return 0; +} + +\end{verbatim} +\end{DocInclude} + \ No newline at end of file diff --git a/doc/latex/examples_2doAdd_8cpp-example.tex b/doc/latex/examples_2doAdd_8cpp-example.tex new file mode 100644 index 0000000..42aee3e --- /dev/null +++ b/doc/latex/examples_2doAdd_8cpp-example.tex @@ -0,0 +1,50 @@ +\section{examples/doAdd.cpp} +Show how to use a network already trained and saved to a binary file. In this case, a network trained to simply perform sums between two real numbers, that should have already been created using learnAdd. + + + +\begin{DocInclude}\begin{verbatim} +#include +#include + +using namespace std; +using namespace neuralpp; + +#define NETFILE "adder.net" + +int main() { + double a,b; + NeuralNet net; + + // Load the pre-trained network from "adder.net" file + try { + net = NeuralNet(NETFILE); + } + + catch (NetworkFileNotFoundException e) { + cerr << "Fatal error while opening " << NETFILE << ": " << e.what(); + return 1; + } + + cout << "First number to add: "; + cin >> a; + + cout << "Second number to add: "; + cin >> b; + + vector v; + v.push_back(a); + v.push_back(b); + + // Set the numbers just read as input values, propagate those values, and get + // the output + net.setInput(v); + net.propagate(); + cout << "Neural net output: " << net.getOutput() << endl; + + return 0; +} + +\end{verbatim} +\end{DocInclude} + \ No newline at end of file diff --git a/doc/latex/examples_2learnAdd_8cpp-example.tex b/doc/latex/examples_2learnAdd_8cpp-example.tex new file mode 100644 index 0000000..9c4de9c --- /dev/null +++ b/doc/latex/examples_2learnAdd_8cpp-example.tex @@ -0,0 +1,67 @@ +\section{examples/learnAdd.cpp} +Show how to train a network that performs sums between two real numbers. The training XML is built from scratch, then saved to a file, then the network is initialized using that XML file, trained, and the resulting trained network is saved to adder.net. Then, you should take a look at doAdd.cpp to see how to use that file to use the network. + + + +\begin{DocInclude}\begin{verbatim} +#include +#include +#include +#include + +using namespace std; +using namespace neuralpp; + +int main() { + int id = 0; + string xml; + time_t t1, t2; + + // Create the neural network. The network is going to have + // => 2 neurons for the input layer + // => 2 neurons for the hidden layer + // => 1 neuron for the output layer + // => a learning rate == 0.005 (just get it doing some tests until satisfied) + // => 1000 learning steps (i.e. the network will be ready after 1000 training steps to adjust the synaptical weights + // => 0.1 as neural threshold (the threshold above which a neuron activates) + NeuralNet net(2, 2, 1, 0.005, 1000, 0.1); + + // Initialize a training XML as a string in 'xml' + NeuralNet::initXML(xml); + + // Build some training sets for the XML. The format is: + // "input1,input2,...,inputn;output1,output2,...,outputn + // The 'id' variable is passed as reference, starting from 0, + // and it's used to enumerate the sets in the XML file. + xml += NeuralNet::XMLFromSet(id, "2,3;5"); + xml += NeuralNet::XMLFromSet(id, "3,2;5"); + xml += NeuralNet::XMLFromSet(id, "6,2;8"); + xml += NeuralNet::XMLFromSet(id, "2,2;4"); + xml += NeuralNet::XMLFromSet(id, "1,2;3"); + xml += NeuralNet::XMLFromSet(id, "-1,-2;-3"); + xml += NeuralNet::XMLFromSet(id, "8,9;17"); + xml += NeuralNet::XMLFromSet(id, "10,10;20"); + NeuralNet::closeXML(xml); + + // Save the XML string just created to a file + ofstream out("adder.xml"); + out << xml; + out.close(); + cout << "Training file adder.xml has been written\n"; + + // Start the training from the XML file + t1 = time(NULL); + cout << "Training in progress - This may take a while...\n"; + net.train("adder.xml", NeuralNet::file); + t2 = time(NULL); + + // Save the trained network to a binary file, that can be reloaded from any + // application that is going to use that network + net.save("adder.net"); + cout << "Network trained in " << (t2-t1) << " seconds. You can use adder.net file now to load this network\n"; + return 0; +} + +\end{verbatim} +\end{DocInclude} + \ No newline at end of file diff --git a/doc/latex/namespaceneuralpp.tex b/doc/latex/namespaceneuralpp.tex index 70bc48b..d088738 100644 --- a/doc/latex/namespaceneuralpp.tex +++ b/doc/latex/namespaceneuralpp.tex @@ -19,11 +19,23 @@ struct {\bf netrecord} struct {\bf neuronrecord} \item struct {\bf synrecord} -\end{CompactItemize} +\item +class {\bf NetworkFileNotFoundException} +\begin{CompactList}\small\item\em Exception thrown when doing an attempt to load a network from an invalid file. \item\end{CompactList}\item +class {\bf NetworkFileWriteException} +\begin{CompactList}\small\item\em Exception thrown when trying to write the network's information to a file that cannot be written. \item\end{CompactList}\item +class {\bf InvalidXMLException} +\begin{CompactList}\small\item\em Exception thrown when trying parsing an invalid XML. \item\end{CompactList}\item +class {\bf NetworkIndexOutOfBoundsException} +\begin{CompactList}\small\item\em Exception raised when trying to access a neuron whose index is larger than the number of neurons in the network. \item\end{CompactList}\item +class {\bf InvalidSynapticalWeightException} +\begin{CompactList}\small\item\em Exception raised when, while trying the network or directly, the weight of a synapsis is set to a value $|$w$|$ $>$ 1. \item\end{CompactList}\end{CompactItemize} \subsection*{Functions} \begin{CompactItemize} \item double {\bf df} (double($\ast$f)(double), double x) +\item +double {\bf \_\-\_\-actv} (double prop) \end{CompactItemize} @@ -31,6 +43,11 @@ double {\bf df} (double($\ast$f)(double), double x) Main namespace for the library. \subsection{Function Documentation} +\index{neuralpp@{neuralpp}!\_\-\_\-actv@{\_\-\_\-actv}} +\index{\_\-\_\-actv@{\_\-\_\-actv}!neuralpp@{neuralpp}} +\subsubsection[\_\-\_\-actv]{\setlength{\rightskip}{0pt plus 5cm}double neuralpp::\_\-\_\-actv (double {\em prop})}\label{namespaceneuralpp_7df3a0de999c7a635f2289749ed4f194} + + \index{neuralpp@{neuralpp}!df@{df}} \index{df@{df}!neuralpp@{neuralpp}} \subsubsection[df]{\setlength{\rightskip}{0pt plus 5cm}double neuralpp::df (double($\ast$)(double) {\em f}, \/ double {\em x})}\label{namespaceneuralpp_43c8197cc83f65fa9676386579671aec} diff --git a/doc/latex/neural_09_09_8hpp.tex b/doc/latex/neural_09_09_8hpp.tex index a03cccc..d7fe7ba 100644 --- a/doc/latex/neural_09_09_8hpp.tex +++ b/doc/latex/neural_09_09_8hpp.tex @@ -31,19 +31,21 @@ struct {\bf neuralpp::synrecord} \item \#define {\bf RAND}~(double) ( (rand() / (RAND\_\-MAX/2)) - 1) \begin{CompactList}\small\item\em Default rand value: $|$sin(rand)$|$, always $>$= 0 and $<$= 1. \item\end{CompactList}\item -\#define {\bf BETA0}~0.8 +\#define {\bf BETA0}~1.0 \begin{CompactList}\small\item\em Initial value for the inertial momentum of the synapses. \item\end{CompactList}\end{CompactItemize} \subsection*{Functions} \begin{CompactItemize} \item double {\bf neuralpp::df} (double($\ast$f)(double), double x) +\item +double {\bf neuralpp::\_\-\_\-actv} (double prop) \end{CompactItemize} \subsection{Define Documentation} \index{neural++.hpp@{neural++.hpp}!BETA0@{BETA0}} \index{BETA0@{BETA0}!neural++.hpp@{neural++.hpp}} -\subsubsection[BETA0]{\setlength{\rightskip}{0pt plus 5cm}\#define BETA0~0.8}\label{neural_09_09_8hpp_05e2bb5b9fc32f0b6b4d84fe43177d72} +\subsubsection[BETA0]{\setlength{\rightskip}{0pt plus 5cm}\#define BETA0~1.0}\label{neural_09_09_8hpp_05e2bb5b9fc32f0b6b4d84fe43177d72} Initial value for the inertial momentum of the synapses. diff --git a/doc/latex/neural_09_09__exception_8hpp.tex b/doc/latex/neural_09_09__exception_8hpp.tex index f138de5..ca36c7c 100644 --- a/doc/latex/neural_09_09__exception_8hpp.tex +++ b/doc/latex/neural_09_09__exception_8hpp.tex @@ -1,2 +1,21 @@ \section{neural++\_\-exception.hpp File Reference} \label{neural_09_09__exception_8hpp}\index{neural++\_\-exception.hpp@{neural++\_\-exception.hpp}} +{\tt \#include $<$exception$>$}\par +\subsection*{Namespaces} +\begin{CompactItemize} +\item +namespace {\bf neuralpp} +\end{CompactItemize} +\subsection*{Classes} +\begin{CompactItemize} +\item +class {\bf neuralpp::NetworkFileNotFoundException} +\begin{CompactList}\small\item\em Exception thrown when doing an attempt to load a network from an invalid file. \item\end{CompactList}\item +class {\bf neuralpp::NetworkFileWriteException} +\begin{CompactList}\small\item\em Exception thrown when trying to write the network's information to a file that cannot be written. \item\end{CompactList}\item +class {\bf neuralpp::InvalidXMLException} +\begin{CompactList}\small\item\em Exception thrown when trying parsing an invalid XML. \item\end{CompactList}\item +class {\bf neuralpp::NetworkIndexOutOfBoundsException} +\begin{CompactList}\small\item\em Exception raised when trying to access a neuron whose index is larger than the number of neurons in the network. \item\end{CompactList}\item +class {\bf neuralpp::InvalidSynapticalWeightException} +\begin{CompactList}\small\item\em Exception raised when, while trying the network or directly, the weight of a synapsis is set to a value $|$w$|$ $>$ 1. \item\end{CompactList}\end{CompactItemize} diff --git a/doc/latex/refman.tex b/doc/latex/refman.tex index 638b894..43ad1c9 100644 --- a/doc/latex/refman.tex +++ b/doc/latex/refman.tex @@ -16,11 +16,11 @@ \begin{titlepage} \vspace*{7cm} \begin{center} -{\Large Neural++ \\[1ex]\large 0.3 }\\ +{\Large Neural++ \\[1ex]\large 0.4 }\\ \vspace*{1cm} {\large Generated by Doxygen 1.5.6}\\ \vspace*{0.5cm} -{\small Sat Aug 15 02:56:02 2009}\\ +{\small Sun Aug 16 20:53:42 2009}\\ \end{center} \end{titlepage} \clearemptydoublepage @@ -48,9 +48,14 @@ \include{structCMarkup_1_1SavedPosMap} \include{structCMarkup_1_1SavedPosMapArray} \include{structCMarkup_1_1TokenPos} +\include{classneuralpp_1_1InvalidSynapticalWeightException} +\include{classneuralpp_1_1InvalidXMLException} \include{classneuralpp_1_1Layer} \include{structMCD__CSTR} \include{structneuralpp_1_1netrecord} +\include{classneuralpp_1_1NetworkFileNotFoundException} +\include{classneuralpp_1_1NetworkFileWriteException} +\include{classneuralpp_1_1NetworkIndexOutOfBoundsException} \include{classneuralpp_1_1NeuralNet} \include{classneuralpp_1_1Neuron} \include{structneuralpp_1_1neuronrecord} @@ -60,5 +65,9 @@ \input{Markup_8h} \include{neural_09_09_8hpp} \include{neural_09_09__exception_8hpp} +\chapter{Example Documentation} +\input{examples_2adderFromScratch_8cpp-example} +\include{examples_2doAdd_8cpp-example} +\include{examples_2learnAdd_8cpp-example} \printindex \end{document} diff --git a/examples/README b/examples/README index d4846c2..74a07a1 100644 --- a/examples/README +++ b/examples/README @@ -1,10 +1,19 @@ -This directory contains some sources to illustrate LibNeural++ usage. -learnAdd is a source training a neural network to do simple sums -between two integer positive numbers. The network is then saved to a -binary file called "adder.net". This file can then be used by "doAdd". -In this program you're asked input numbers to the network, and then -the output is given. If executable files would not be present, type -`make` to create them. +* @example examples/learnAdd.cpp Show how to train a network that performs sums between +* two real numbers. The training XML is built from scratch, then saved to a file, then +* the network is initialized using that XML file, trained, and the resulting trained +* network is saved to adder.net. Then, you should take a look at doAdd.cpp to see how +* to use that file to use the network. -Of course, you must have Neural++ already installed before typing `make` +* @example examples/doAdd.cpp Show how to use a network already trained and saved to a +* binary file. In this case, a network trained to simply perform sums between two real +* numbers, that should have already been created using learnAdd. + +* @example examples/adderFromScratch.cpp Similar to learnAdd.cpp, but this time the +* training XML is generated as a string and not saved to a file, and parsed by the +* program itself to build the network. Then, the program asks two real numbers, and +* performs both the sum and the difference between them, putting the sum's output on +* the first output neuron and the difference's on the second output neuron. Anyway, +* using more than one neuron in the output layer is strongly discouraged, as the network +* usually won't set correctly the synaptical weights to give satisfying and accurate +* answers for all of the operations. diff --git a/examples/adderFromScratch.cpp b/examples/adderFromScratch.cpp index b800853..648cfe3 100644 --- a/examples/adderFromScratch.cpp +++ b/examples/adderFromScratch.cpp @@ -1,6 +1,12 @@ /** - * This source creates a new neural network able to sum two integer numbers, - * creating the XML containing the training input set on the fly. + * Similar to learnAdd.cpp, but this time the + * training XML is generated as a string and not saved to a file, and parsed by the + * program itself to build the network. Then, the program asks two real numbers, and + * performs both the sum and the difference between them, putting the sum's output on + * the first output neuron and the difference's on the second output neuron. Anyway, + * using more than one neuron in the output layer is strongly discouraged, as the network + * usually won't set correctly the synaptical weights to give satisfying and accurate + * answers for all of the operations. * * by BlackLight, 2009 */ diff --git a/examples/doAdd.cpp b/examples/doAdd.cpp index f94bdf2..f61f2fe 100644 --- a/examples/doAdd.cpp +++ b/examples/doAdd.cpp @@ -1,6 +1,7 @@ /** - * This source makes sums between two numbers using pre-trained neural network - * saved on "adder.net" + * Show how to use a network already trained and saved to a + * binary file. In this case, a network trained to simply perform sums between two real + * numbers, that should have already been created using learnAdd. * * by BlackLight, 2009 */ @@ -17,6 +18,7 @@ int main() { double a,b; NeuralNet net; + // Load the pre-trained network from "adder.net" file try { net = NeuralNet(NETFILE); } @@ -36,6 +38,8 @@ int main() { v.push_back(a); v.push_back(b); + // Set the numbers just read as input values, propagate those values, and get + // the output net.setInput(v); net.propagate(); cout << "Neural net output: " << net.getOutput() << endl; diff --git a/examples/learnAdd.cpp b/examples/learnAdd.cpp index 9cfd4ad..0fd0936 100644 --- a/examples/learnAdd.cpp +++ b/examples/learnAdd.cpp @@ -1,7 +1,9 @@ /** - * This source creates a new neural network able to sum two integer numbers, - * using the training input set saved on "adder.xml" and saving output network - * on "adder.net" + * Show how to train a network that performs sums between + * two real numbers. The training XML is built from scratch, then saved to a file, then + * the network is initialized using that XML file, trained, and the resulting trained + * network is saved to adder.net. Then, you should take a look at doAdd.cpp to see how + * to use that file to use the network. * * by BlackLight, 2009 */ @@ -14,17 +16,27 @@ using namespace std; using namespace neuralpp; -double f (double x) { - return (x <= 0) ? 1 : 0; -} - int main() { int id = 0; string xml; time_t t1, t2; - NeuralNet net(2, 2, 1, 0.005, 1000, 0.1, f); + // Create the neural network. The network is going to have + // => 2 neurons for the input layer + // => 2 neurons for the hidden layer + // => 1 neuron for the output layer + // => a learning rate == 0.005 (just get it doing some tests until satisfied) + // => 1000 learning steps (i.e. the network will be ready after 1000 training steps to adjust the synaptical weights + // => 0.1 as neural threshold (the threshold above which a neuron activates) + NeuralNet net(2, 2, 1, 0.005, 1000, 0.1); + + // Initialize a training XML as a string in 'xml' NeuralNet::initXML(xml); + + // Build some training sets for the XML. The format is: + // "input1,input2,...,inputn;output1,output2,...,outputn + // The 'id' variable is passed as reference, starting from 0, + // and it's used to enumerate the sets in the XML file. xml += NeuralNet::XMLFromSet(id, "2,3;5"); xml += NeuralNet::XMLFromSet(id, "3,2;5"); xml += NeuralNet::XMLFromSet(id, "6,2;8"); @@ -35,16 +47,20 @@ int main() { xml += NeuralNet::XMLFromSet(id, "10,10;20"); NeuralNet::closeXML(xml); + // Save the XML string just created to a file ofstream out("adder.xml"); out << xml; out.close(); cout << "Training file adder.xml has been written\n"; + // Start the training from the XML file t1 = time(NULL); cout << "Training in progress - This may take a while...\n"; net.train("adder.xml", NeuralNet::file); t2 = time(NULL); + // Save the trained network to a binary file, that can be reloaded from any + // application that is going to use that network net.save("adder.net"); cout << "Network trained in " << (t2-t1) << " seconds. You can use adder.net file now to load this network\n"; return 0; diff --git a/include/Doxyfile b/include/Doxyfile index 0509aa7..09b9353 100644 --- a/include/Doxyfile +++ b/include/Doxyfile @@ -23,7 +23,7 @@ PROJECT_NAME = Neural++ # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 0.3 +PROJECT_NUMBER = 0.4 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. @@ -500,7 +500,7 @@ EXCLUDE_PATTERNS = # directories that contain example code fragments that are included (see # the \include command). -EXAMPLE_PATH = +EXAMPLE_PATH = ../examples # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp diff --git a/include/neural++.hpp b/include/neural++.hpp index e6ab4a6..2db4837 100644 --- a/include/neural++.hpp +++ b/include/neural++.hpp @@ -11,10 +11,6 @@ * this program. If not, see . * **************************************************************************************************/ -#ifndef __cplusplus -#error "This is a C++ library, you know, so you'd better use a C++ compiler to compile it" -#else - #ifndef __NEURALPP #define __NEURALPP @@ -46,6 +42,24 @@ namespace neuralpp { /** * @class NeuralNet * @brief Main project's class. Use *ONLY* this class, unless you know what you're doing + * @example examples/learnAdd.cpp Show how to train a network that performs sums between + * two real numbers. The training XML is built from scratch, then saved to a file, then + * the network is initialized using that XML file, trained, and the resulting trained + * network is saved to adder.net. Then, you should take a look at doAdd.cpp to see how + * to use that file to use the network. + * + * @example examples/doAdd.cpp Show how to use a network already trained and saved to a + * binary file. In this case, a network trained to simply perform sums between two real + * numbers, that should have already been created using learnAdd. + * + * @example examples/adderFromScratch.cpp Similar to learnAdd.cpp, but this time the + * training XML is generated as a string and not saved to a file, and parsed by the + * program itself to build the network. Then, the program asks two real numbers, and + * performs both the sum and the difference between them, putting the sum's output on + * the first output neuron and the difference's on the second output neuron. Anyway, + * using more than one neuron in the output layer is strongly discouraged, as the network + * usually won't set correctly the synaptical weights to give satisfying and accurate + * answers for all of the operations. */ class NeuralNet { int epochs; @@ -529,5 +543,4 @@ namespace neuralpp { } #endif -#endif diff --git a/include/neural++_exception.hpp b/include/neural++_exception.hpp index 2bf1b6a..65f5834 100644 --- a/include/neural++_exception.hpp +++ b/include/neural++_exception.hpp @@ -1,5 +1,5 @@ /************************************************************************************************** - * LibNeural++ v.0.2 - All-purpose library for managing neural networks * + * LibNeural++ v.0.4 - All-purpose library for managing neural networks * * Copyright (C) 2009, BlackLight * * * * This program is free software: you can redistribute it and/or modify it under the terms of the * @@ -11,10 +11,6 @@ * this program. If not, see . * **************************************************************************************************/ -#ifndef __cplusplus -#error "This is a C++ library, you know, so you'd better use a C++ compiler to compile it" -#else - #ifndef __NEURALPP_EXCEPTION #define __NEURALPP_EXCEPTION @@ -76,5 +72,4 @@ namespace neuralpp { } #endif -#endif diff --git a/src/layer.cpp b/src/layer.cpp index 1ae4ed8..5c75130 100644 --- a/src/layer.cpp +++ b/src/layer.cpp @@ -1,5 +1,5 @@ /************************************************************************************************** - * LibNeural++ v.0.2 - All-purpose library for managing neural networks * + * LibNeural++ v.0.4 - All-purpose library for managing neural networks * * Copyright (C) 2009, BlackLight * * * * This program is free software: you can redistribute it and/or modify it under the terms of the * diff --git a/src/neuralnet.cpp b/src/neuralnet.cpp index 2cd70e4..79cebd0 100644 --- a/src/neuralnet.cpp +++ b/src/neuralnet.cpp @@ -1,5 +1,5 @@ /************************************************************************************************** - * LibNeural++ v.0.2 - All-purpose library for managing neural networks * + * LibNeural++ v.0.4 - All-purpose library for managing neural networks * * Copyright (C) 2009, BlackLight * * * * This program is free software: you can redistribute it and/or modify it under the terms of the * diff --git a/src/neuron.cpp b/src/neuron.cpp index c25e01d..2424380 100644 --- a/src/neuron.cpp +++ b/src/neuron.cpp @@ -1,5 +1,5 @@ /************************************************************************************************** - * LibNeural++ v.0.2 - All-purpose library for managing neural networks * + * LibNeural++ v.0.4 - All-purpose library for managing neural networks * * Copyright (C) 2009, BlackLight * * * * This program is free software: you can redistribute it and/or modify it under the terms of the * diff --git a/src/synapsis.cpp b/src/synapsis.cpp index f309b5a..d77a5f0 100644 --- a/src/synapsis.cpp +++ b/src/synapsis.cpp @@ -1,5 +1,5 @@ /************************************************************************************************** - * LibNeural++ v.0.2 - All-purpose library for managing neural networks * + * LibNeural++ v.0.4 - All-purpose library for managing neural networks * * Copyright (C) 2009, BlackLight * * * * This program is free software: you can redistribute it and/or modify it under the terms of the *