OpenANN
1.1.0
An open source library for artificial neural networks.
Main Page
Classes
Files
List
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
OpenANN
optimization
CG.h
Go to the documentation of this file.
1
#ifndef OPENANN_OPTIMIZATION_H_
2
#define OPENANN_OPTIMIZATION_H_
3
4
#include <
OpenANN/optimization/Optimizer.h
>
5
#include <
OpenANN/optimization/StoppingCriteria.h
>
6
#include <Eigen/Core>
7
#include <optimization.h>
8
9
namespace
OpenANN
10
{
11
20
class
CG
:
public
Optimizer
21
{
22
StoppingCriteria
stop;
23
Optimizable
* opt;
// do not delete
24
Eigen::VectorXd optimum;
25
int
iteration, n;
26
Eigen::VectorXd parameters, gradient;
27
double
error;
28
alglib_impl::ae_state envState;
29
alglib::mincgstate state;
30
alglib::real_1d_array xIn;
31
32
public
:
33
CG
();
34
~CG
();
35
virtual
void
setOptimizable
(
Optimizable
& opt);
36
virtual
void
setStopCriteria
(
const
StoppingCriteria
& stop);
37
virtual
bool
step
();
38
virtual
void
optimize
();
39
virtual
Eigen::VectorXd
result
();
40
virtual
std::string
name
();
41
private
:
42
void
initialize();
43
void
reset();
44
};
45
46
}
// namespace OpenANN
47
48
#endif // OPENANN_OPTIMIZATION_H_
Generated on Wed Jul 9 2014 08:57:52 for OpenANN by
1.8.4