Source: rank/datasource.h
|
|
|
|
/***************************************************************************
datasource.h - description
-------------------
begin : Mon Mär 10 2003
copyright : (C) 2003 by Ingmar Bauer
email : ingmar@metacrawler.de
***************************************************************************/
#ifndef DATASOURCE_H
#define DATASOURCE_H
/**Datasource class for Ranking Algorithms
*@author Ingmar Bauer
*/
class datasource
{
public:
datasource(string str_fname);
~datasource();
int getRefs();
int nextRef(unsigned int &src_id, vector &lnk_ids);
int nextRef(unsigned int &src_id, vector &lnk_ids, vector &backlnk_ids);
string getURL(unsigned int id);
int getMatrixSize(void);
int getAdjMatrix(matrix &m); // get pagerank needed matrix
int getAdjascencyMatrix(matrix &m); // get real adjascency matrix
bool ready;
private:
std::ifstream *f_index;
std::ifstream *f_refs;
std::ifstream *f_url;
std::ifstream *f_irefs;
unsigned int offs_ref;
unsigned int offs_url;
unsigned int offs_iref;
unsigned short n_refs;
unsigned short n_irefs;
unsigned int size;
};
#endif
Generated by: ingmar on pluto on Fri Aug 8 21:29:16 2003, using kdoc 2.0a54. |