7 using namespace opencog;
13 fprintf(stderr,
"Error: No atom found\n");
18 fprintf(stderr,
"Error, type mis-match, a=%d b=%d\n", a->
getType(), b->
getType());
25 fprintf(stderr,
"Error, arity mis-match, a=%d b=%d\n", na->
getArity(), nb->
getArity());
31 for (
int i =0; i< na->
getArity(); i++) {
32 if (outa[i] != outb[i]) {
33 fprintf(stderr,
"Error, outgoing set mis-match:");
34 fprintf(stderr,
"i=%d a[i]=%ld b[i]=%ld\n",i,
35 outa[i].value(), outb[i].value());
44 fprintf(stderr,
"Error, truth value mis-match, "
45 "ma=%f mb=%f ca=%f cb=%f\n",
52 fprintf(stderr,
"Error, attention value mis-match, "
53 "stia=%hd stib=%hd ltia=%hd ltib=%hd vltia=%hd vltib=%hd\n",
61 int main (
int argc,
char **argv){
66 Atom *
a =
new Node(SCHEMA_NODE,
"someNode");
83 printf(
"node compare success\n");
86 printf(
"node compare failure\n");
93 printf(
"node compare success\n");
96 printf(
"node compare failure\n");
101 Atom *a2 =
new Node(SCHEMA_NODE,
"otherNode");
105 std::vector<Handle> hvec;
116 std::cout <<
"link compare success" << std::endl;
119 std::cout <<
"link compare failure" << std::endl;
126 std::cout <<
"link compare success" << std::endl;
129 std::cout <<
"link compare failure" << std::endl;
133 }
catch (Exception &e) {
134 std::cerr << e << std::endl;
const HandleSeq & getOutgoingSet() const
AttentionValuePtr getAttentionValue()
virtual count_t getCount() const =0
a TruthValue that stores a mean and the number of observations (strength and confidence) ...
lti_t getLTI() const
return LTI property value
void setTruthValue(TruthValuePtr)
Sets the TruthValue object of the atom.
void setAttentionValue(AttentionValuePtr)
Sets the AttentionValue object of the atom.
virtual void storeAtom(Handle)
virtual Node * getNode(Type, const char *) const
virtual Atom * getAtom(Handle) const
TruthValuePtr getTruthValue()
int atomCompare(Atom *a, Atom *b)
vlti_t getVLTI() const
return VLTI property value
virtual Link * getLink(Type, const std::vector< Handle > &) const
int main(int argc, char **argv)
virtual strength_t getMean() const =0
sti_t getSTI() const
return STI property value