KnowledgeBase Class Reference

this class holds a knowledge base More...

#include <BPnnet/KnowledgeBase.H>

Collaboration diagram for KnowledgeBase:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 KnowledgeBase ()
 Constructor.
 ~KnowledgeBase ()
 Destructor.
bool load (const char *fname)
 load from disk
bool save (const char *fname) const
 save to disk
bool addSimpleVisualObject (SimpleVisualObject &o)
 Add new object to knowledge base. True on success.
bool findSimpleVisualObject (const char *name, SimpleVisualObject &o) const
 Find visual object from KB that has corresponding name.
bool findSimpleVisualObject (const int index, SimpleVisualObject &o) const
 Find visual object indexed by "index" in the kb array.
int findSimpleVisualObjectIndex (const char *name) const
 Return visual object from KB that has corresponding name.
SimpleVisualObject getSimpleVisualObject (const int index) const
 get visual object at given index:
int getSize () const
 Return number of visual objects held in this knowledge base.

Detailed Description

this class holds a knowledge base

Definition at line 47 of file KnowledgeBase.H.


Constructor & Destructor Documentation

KnowledgeBase::KnowledgeBase ( void   ) 

Constructor.

Definition at line 44 of file KnowledgeBase.C.

KnowledgeBase::~KnowledgeBase (  ) 

Destructor.

Definition at line 50 of file KnowledgeBase.C.


Member Function Documentation

bool KnowledgeBase::addSimpleVisualObject ( SimpleVisualObject o  ) 

Add new object to knowledge base. True on success.

Definition at line 85 of file KnowledgeBase.C.

References findSimpleVisualObjectIndex(), and SimpleVisualObject::getName().

Referenced by load().

bool KnowledgeBase::findSimpleVisualObject ( const int  index,
SimpleVisualObject o 
) const [inline]

Find visual object indexed by "index" in the kb array.

returns true on success

Definition at line 99 of file KnowledgeBase.H.

References getSize().

bool KnowledgeBase::findSimpleVisualObject ( const char *  name,
SimpleVisualObject o 
) const [inline]

Find visual object from KB that has corresponding name.

returns true on success

Definition at line 90 of file KnowledgeBase.H.

References findSimpleVisualObjectIndex().

int KnowledgeBase::findSimpleVisualObjectIndex ( const char *  name  )  const [inline]

Return visual object from KB that has corresponding name.

or -1 of object not found

Definition at line 108 of file KnowledgeBase.H.

References getSize().

Referenced by addSimpleVisualObject(), findSimpleVisualObject(), and BPnnet::train().

SimpleVisualObject KnowledgeBase::getSimpleVisualObject ( const int  index  )  const [inline]

get visual object at given index:

Definition at line 117 of file KnowledgeBase.H.

References getSize().

Referenced by BPnnet::recognize().

int KnowledgeBase::getSize (  )  const [inline]

Return number of visual objects held in this knowledge base.

Definition at line 124 of file KnowledgeBase.H.

Referenced by BPnnet::BPnnet(), findSimpleVisualObject(), findSimpleVisualObjectIndex(), getSimpleVisualObject(), and save().

bool KnowledgeBase::load ( const char *  fname  ) 

load from disk

Definition at line 54 of file KnowledgeBase.C.

References addSimpleVisualObject().

bool KnowledgeBase::save ( const char *  fname  )  const

save to disk

Definition at line 74 of file KnowledgeBase.C.

References getSize().


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:43:29 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3