coco::search_node Class Reference
[Search Graph]

Base type of the nodes in the search graph. More...

#include <search_node.h>

Inheritance diagram for coco::search_node:

Inheritance graph
[legend]
Collaboration diagram for coco::search_node:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual bool is_delta () const
 search_node (const search_node_id &_i, const vdbl::userid &_dui, gptr< search_node > &_gm, gptr< vdbl::database > &_db, search_node_relation __snr=snr_reduction)
 search_node (const search_node_id &_i, const vdbl::userid &_dui, gptr< search_node > *_gm, gptr< vdbl::database > &_db, search_node_relation __snr=snr_reduction)
 search_node (const search_node &__sn)
 search_node (const search_node_id &_i, const vdbl::userid &_dui, gptr< vdbl::database > &_db, search_node_relation __snr=snr_root)
virtual ~search_node ()
search_nodeoperator= (const search_node &__w)
vdbl::userid get_dbuserid () const
gptr< search_node > * global_model () const
gptr< vdbl::database > * database () const
search_node_id get_id () const
void set_id (const search_node_id &i)
vdbl::rowid get_rowid () const
void set_rowid (const vdbl::rowid &i)
void keep (const annotation &_an)
void keep (const std::vector< annotation > &_anv)
void unkeep (const annotation &_an)
void unkeep (const std::vector< annotation > &_anv)

Protected Member Functions

search_node_relation parent_relation () const

Protected Attributes

gptr< search_node > * __global_model
gptr< vdbl::database > * __dbase
vdbl::userid _dbuser
search_node_relation _snr
search_node_id _id
std::vector< annotation_keep
vdbl::rowid _rid

Friends

class search_graph


Detailed Description

This is the base type of the nodes stored in the search graph and analyzed by the inference engines. Its subclasses delta_node and full_node are used in the search graph. The special subclass work_node of full_node is used to present the models to be analyzed to the inference engines.

Definition at line 88 of file search_node.h.


Constructor & Destructor Documentation

coco::search_node::search_node ( const search_node_id _i,
const vdbl::userid &  _dui,
gptr< search_node > &  _gm,
gptr< vdbl::database > &  _db,
search_node_relation  __snr = snr_reduction 
) [inline]

This constructor generates a new search node (a reduction node by default) with search_node_id i and search_node_relation __snr. The parameters _gm, _db, and _dui initialize the global model, search database, and the database user id, respectively.

Definition at line 35 of file search_node.hpp.

coco::search_node::search_node ( const search_node_id _i,
const vdbl::userid &  _dui,
gptr< search_node > *  _gm,
gptr< vdbl::database > &  _db,
search_node_relation  __snr = snr_reduction 
) [inline]

This constructor generates a new search node (a reduction node by default) with search_node_id i and search_node_relation __snr. The parameters _gm, _db, and _dui initialize the global model, search database, and the database user id, respectively.

Definition at line 43 of file search_node.hpp.

coco::search_node::search_node ( const search_node __sn  )  [inline]

Standard Copy Constructor

Definition at line 51 of file search_node.hpp.

coco::search_node::search_node ( const search_node_id _i,
const vdbl::userid &  _dui,
gptr< vdbl::database > &  _db,
search_node_relation  __snr = snr_root 
) [inline]

This constructor generates a new search node (the graph's root node by default) with search_node_id i and search_node_relation __snr. The parameters _db, and _dui initialize the search database and the database user id, respectively. The global model pointer is set to NULL. The constructor can be used for standalone nodes, as well.

Definition at line 59 of file search_node.hpp.

coco::search_node::~search_node (  )  [inline, virtual]

Standard Destructor

Definition at line 66 of file search_node.hpp.


Member Function Documentation

gptr<vdbl::database>* coco::search_node::database (  )  const [inline]

This is the accessor method for the search database.

Definition at line 164 of file search_node.h.

vdbl::userid coco::search_node::get_dbuserid (  )  const [inline]

This is the accessor method for the database user id.

Definition at line 158 of file search_node.h.

search_node_id coco::search_node::get_id (  )  const [inline]

This is the accessor method for the search node id of this node.

Definition at line 167 of file search_node.h.

vdbl::rowid coco::search_node::get_rowid (  )  const [inline]

This is the accessor method for the row id of this node.

Definition at line 173 of file search_node.h.

gptr<search_node>* coco::search_node::global_model (  )  const [inline]

This is the accessor method for the global model.

Definition at line 161 of file search_node.h.

virtual bool coco::search_node::is_delta (  )  const [inline, virtual]

This method is called to determine whether a search node stores only deltas (delta_node) or a full model (full_node).

See also:
delta.

Reimplemented in coco::delta_node, and coco::full_node.

Definition at line 122 of file search_node.h.

void coco::search_node::keep ( const std::vector< annotation > &  _anv  )  [inline]

A call to this method informs the search node to be the keeper of all the annotations in _anv.

Definition at line 184 of file search_node.h.

void coco::search_node::keep ( const annotation _an  )  [inline]

A call to this method informs the search node to be the keeper of the annotation _an.

Definition at line 180 of file search_node.h.

search_node & coco::search_node::operator= ( const search_node __w  )  [inline]

Standard Assignment Operator

Definition at line 174 of file search_node.hpp.

search_node_relation coco::search_node::parent_relation (  )  const [inline, protected]

A call to this method returns the relation of this node to its parent in the search graph.

Definition at line 117 of file search_node.h.

void coco::search_node::set_id ( const search_node_id i  )  [inline]

This is the set method for the search node id of this node.

Definition at line 170 of file search_node.h.

void coco::search_node::set_rowid ( const vdbl::rowid &  i  )  [inline]

This is the set method for the row id of this node.

Definition at line 176 of file search_node.h.

void coco::search_node::unkeep ( const std::vector< annotation > &  _anv  )  [inline]

A call to this method informs the search node to no longer be the keeper of all the annotations in _anv.

Definition at line 93 of file search_node.hpp.

void coco::search_node::unkeep ( const annotation _an  )  [inline]

A call to this method informs the search node to no longer be the keeper of the annotation _an.

Definition at line 82 of file search_node.hpp.


Friends And Related Function Documentation

friend class search_graph [friend]

Definition at line 195 of file search_node.h.


Member Data Documentation

gptr<vdbl::database>* coco::search_node::__dbase [protected]

This is a pointer to a global pointer to the search database associated to this search graph.

Definition at line 96 of file search_node.h.

This is a pointer to a global pointer to the top of the search graph. It is NULL for a standalone node or the top of the graph.

Definition at line 93 of file search_node.h.

vdbl::userid coco::search_node::_dbuser [protected]

This member stores the database user id under which this search is performed. For the in-memory database this is irrelevant.

Definition at line 99 of file search_node.h.

This is the unique identifier of this search node.

Definition at line 104 of file search_node.h.

std::vector<annotation> coco::search_node::_keep [protected]

The _keep member is a list of all those annotations which are kept by this search node. If the node is destroyed all kept annotations are removed from the search database.

Definition at line 108 of file search_node.h.

vdbl::rowid coco::search_node::_rid [protected]

This row id specifies the row in the search info table where the hook information for this search_node is stored

Definition at line 112 of file search_node.h.

This member specifies the relation of the search node to its parent(s) in the search graph.

Definition at line 102 of file search_node.h.


The documentation for this class was generated from the following files:

Generated on Tue Feb 9 14:49:57 2010 for COCONUT API by  doxygen 1.5.8