C
cayblood
Hello, I have the following class declaration in an include file:
class Node
{
public:
Node(string name = "");
Node(const Node& node);
Node& operator=(const Node& node);
bool operator<(const Node& a, const Node& b);
bool operator==(const Node& a, const Node& b);
void add_state(string statename);
void add_child(Node *child);
void add_parent(Node *parent);
void set_probability(Event e, double prob);
double evaluate_marginal(string statename, Event evidence);
double evaluate_markov_blanket(string statename, Event evidence);
private:
static int m_nodecount;
// using vectors on these to preserve ordering information
vector<Node *> m_parents;
vector<Node *> m_children;
vector<string> m_states;
map<Event, double> m_probabilities;
};
When I try to compile my code I get the following error:
include/sbn.h:72: error: 'bool sbn::Node:
perator<(const sbn::Node&,
const sbn::Node&)' must take exactly one argument
include/sbn.h:73: error: 'bool sbn::Node:
perator==(const sbn::Node&,
const sbn::Node&)' must take exactly one argument
make: *** [bin/sbntest] Error 1
Here is my compiler version information:
powerpc-apple-darwin8-g++-4.0.0 (GCC) 4.0.0 20041026 (Apple Computer,
Inc. build 4061)
Any ideas?
Thanks,
Carl Youngblood
class Node
{
public:
Node(string name = "");
Node(const Node& node);
Node& operator=(const Node& node);
bool operator<(const Node& a, const Node& b);
bool operator==(const Node& a, const Node& b);
void add_state(string statename);
void add_child(Node *child);
void add_parent(Node *parent);
void set_probability(Event e, double prob);
double evaluate_marginal(string statename, Event evidence);
double evaluate_markov_blanket(string statename, Event evidence);
private:
static int m_nodecount;
// using vectors on these to preserve ordering information
vector<Node *> m_parents;
vector<Node *> m_children;
vector<string> m_states;
map<Event, double> m_probabilities;
};
When I try to compile my code I get the following error:
include/sbn.h:72: error: 'bool sbn::Node:
const sbn::Node&)' must take exactly one argument
include/sbn.h:73: error: 'bool sbn::Node:
const sbn::Node&)' must take exactly one argument
make: *** [bin/sbntest] Error 1
Here is my compiler version information:
powerpc-apple-darwin8-g++-4.0.0 (GCC) 4.0.0 20041026 (Apple Computer,
Inc. build 4061)
Any ideas?
Thanks,
Carl Youngblood