#include <DAGSearchDatabase.h>
Public Methods | |
| DAGSearchDatabase () | |
| Default constructor. | |
| virtual | ~DAGSearchDatabase () |
| Destructor. | |
| void | Add (ID id, const DAG &dag) |
| Adds prototype. | |
| void | Remove (ID id, DAG &dag) |
| Removes prototype. | |
| SmartArray< DAGSearchRecordEx > | GetKClosest (const DAG &dag, const leda_node &querynode, int k) |
| Finds k closest nodes. | |
| SmartArray< DAGSearchRecordEx > | GetClosest (const DAG &dag, const leda_node &querynode, const double &range) |
| Finds closest nodes in a given range. | |
| bool | Create (std::string name, int dim) |
| Creates the database. | |
| bool | Open (std::string name) |
| Opens the database. | |
| std::istream & | Read (std::istream &is) |
| Read the database from the stream. | |
| std::ostream & | Write (std::ostream &os) |
| Writes the database from a stream. | |
Definition at line 95 of file DAGSearchDatabase.h.
|
||||||||||||
|
Adds prototype. Adds the prototype to the database.
Definition at line 58 of file DAGSearchDatabase.cpp. References DAG::GetFileOffset(), DAG::GetNodeIndex(), DAG::GetNodeTSV(), DAG::GetNodeTSVNorm(), DAG::GetTotalTSVSum(), DAGSearchRecord::id, ID, DAGSearchRecord::node, DAGSearchRecord::nodeLbl, DAG::NodeType(), DAGSearchRecord::offset, and DAGSearchRecord::totalVote. |
|
||||||||||||
|
Creates the database. Creates the database with the file name 'name' and dimensions 'dim'.
Definition at line 197 of file DAGSearchDatabase.cpp. References Min_NND_Dimension. |
|
||||||||||||||||
|
Finds closest nodes in a given range. Finds the closest nodes to the quety node in the given range.
Definition at line 152 of file DAGSearchDatabase.cpp. References SmartArray< T >::Add(), DAG::GetNodeTSV(), SmartArray< double >::GetSize(), and SmartArray< T >::ReSize(). |
|
||||||||||||||||
|
Finds k closest nodes. Finds k closest nodes to the query node.
Definition at line 118 of file DAGSearchDatabase.cpp. References SmartArray< T >::Add(), DAG::GetNodeTSV(), and SmartArray< T >::ReSize(). |
|
|
Opens the database. Opens the database with the file name 'name'.
Definition at line 227 of file DAGSearchDatabase.cpp. |
|
|
Read the database from the stream. Reads database parameters from a stream and loads the database.
Definition at line 249 of file DAGSearchDatabase.cpp. |
|
||||||||||||
|
Removes prototype. Removes the prototype from the search database.
Definition at line 87 of file DAGSearchDatabase.cpp. References DAG::GetNodeIndex(), DAG::GetNodeTSV(), DAGSearchRecord::id, ID, and DAGSearchRecord::node. |
|
|
Writes the database from a stream. Writes database parameters to a stream. This parameters can latter be used to read the database
Definition at line 288 of file DAGSearchDatabase.cpp. |
1.2.18