S
schdvir
Hi
I tried to compile a program and I got this error:
tdagent.C: In constructor `tdagent::tdagent(simple_env*)':
tdagent.C:13: error: no matching function for call to `actor::actor()'
actor.H:28: note: candidates are: actor::actor(const actor&)
actor.H:38: note: actor::actor(boost::numeric::ublas::vector<float,
the code is:
tdagent.C
-------------------
#include "tdagent.H"
tdagent::tdagent(simple_env* environment)
{
float d;
state x;
//vector<float> u(2);
env=environment;
actor1 = new actor(env->get_cov);
//actor2 = new actor(env->get_cov);
critic1 = new critic(env->get_cov);
}
actro.H
-------------
#ifndef ACTOR_H
#define ACTOR_H
#include "weights.H"
#include "base_functions.H"
#include <boost/random.hpp>
namespace ublas = boost::numeric::ublas;
using namespace boost::numeric::ublas;
#define ETA_ACTOR 1
#define A_MIN_ACTOR 1
#define E_MAX_ACTOR 1
#define C 1
class actor
{
private:
float function(ublas::vector<float> x);
float f;
float u;
public:
actor(ublas::vector<float> const covariance);
~actor();
bool preform_step();
float action(ublas::vector<float> x);
};
#endif
I don't understand the error because line 13 at tdagent.C is the first
line of the costructor (right after the "{" )
there isn't a call for actor::actor() there.
Hope you can help me with it.
Thanks
Dvir
I tried to compile a program and I got this error:
tdagent.C: In constructor `tdagent::tdagent(simple_env*)':
tdagent.C:13: error: no matching function for call to `actor::actor()'
actor.H:28: note: candidates are: actor::actor(const actor&)
actor.H:38: note: actor::actor(boost::numeric::ublas::vector<float,
boost::numeric::ublas::unbounded_array said:
the code is:
tdagent.C
-------------------
#include "tdagent.H"
tdagent::tdagent(simple_env* environment)
{
float d;
state x;
//vector<float> u(2);
env=environment;
actor1 = new actor(env->get_cov);
//actor2 = new actor(env->get_cov);
critic1 = new critic(env->get_cov);
}
actro.H
-------------
#ifndef ACTOR_H
#define ACTOR_H
#include "weights.H"
#include "base_functions.H"
#include <boost/random.hpp>
namespace ublas = boost::numeric::ublas;
using namespace boost::numeric::ublas;
#define ETA_ACTOR 1
#define A_MIN_ACTOR 1
#define E_MAX_ACTOR 1
#define C 1
class actor
{
private:
float function(ublas::vector<float> x);
float f;
float u;
public:
actor(ublas::vector<float> const covariance);
~actor();
bool preform_step();
float action(ublas::vector<float> x);
};
#endif
I don't understand the error because line 13 at tdagent.C is the first
line of the costructor (right after the "{" )
there isn't a call for actor::actor() there.
Hope you can help me with it.
Thanks
Dvir