Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

linkgraph.h

Go to the documentation of this file.
00001 /** @file linkgraph.h */
00002 /* 
00003  * Copyright (C) 2002 Laird Breyer
00004  *  
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  * 
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  * 
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018  * 
00019  * Author:   Laird Breyer <laird@lbreyer.com>
00020  */
00021 
00022 #ifndef _GRAPHER_H_
00023 #define _GRAPHER_H_
00024 //#include "document.h"
00025 #include "webnode.h"
00026 #include <slist>
00027 
00028 /// A singly linked list of WebNodePtr objects
00029 typedef slist<WebNode*> WebNodeList;
00030 
00031 /// Encapsulates the web link graph as a WebNodeList of WebNode objects.
00032 /**
00033  * This class offers several enhancements over a WebNodeList,
00034  * including the ability to print a description of 
00035  * the graph to a stream and the ability to construct tagged
00036  * fromsets.
00037  *
00038  * The node id's are in decreasing order, since nodes are pushed at the front
00039  * by GraphBuilder(). This ordering should not be changed, since other parts
00040  * (eg Talker() ) depend on it.
00041  */
00042 class WebLinkGraph: public WebNodeList {
00043  public:
00044 
00045   WebLinkGraph();
00046 
00047   void PrintWebGraph(ostream& o);
00048 
00049   void ClearTags();
00050   void BuildFromSets(int k);
00051   void MeasureFromSets();
00052   /// returns fromsetsizes[] - needed by some WebSampler objects.
00053   const uint32 *GetFromSetSizes() {
00054     return fromsetsize;
00055   }
00056   void StatisticsFromSets(ostream& o);
00057   
00058  private:
00059   uint32 fromsetsize[TAG_NUMBER_OF_BITS];
00060 };
00061 
00062 #endif

Generated on Wed May 29 11:37:14 2002 for MarkovPR by doxygen1.2.15