ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/proj/Search/trunk/Ranker.hpp
(Generate patch)

Comparing:
trunk/Search/Ranker.h (file contents), Revision 15 by douglas, 2002-12-09T09:46:18-08:00 vs.
trunk/Search/Ranker.hpp (file contents), Revision 349 by Douglas Thrift, 2004-05-27T00:18:04-07:00

# Line 1 | Line 1
1   /* ============================================================================
2   * Douglas Thrift's Search Engine License
3   *
4 < * Copyright (C) 2002, Douglas Thrift. All Rights Reserved.
4 > * Copyright (C) 2002-2004, Douglas Thrift. All Rights Reserved.
5   * Redistribution and use in source and binary forms, with or without
6   * modification, are permitted provided that the following conditions are met:
7   *
# Line 46 | Line 46
46   //
47   // Douglas Thrift
48   //
49 < // Ranker.h
49 > // $Id$
50  
51 < #ifndef _Ranker_h_
52 < #define _Ranker_h_
51 > #ifndef _Ranker_hpp_
52 > #define _Ranker_hpp_
53  
54 < #include "Search.h"
55 < #include "Page.h"
54 > #include "Search.hpp"
55 > #include "Page.hpp"
56  
57   class Ranker : public Page
58   {
59   private:
60          enum state { all, title, url, text };
61 +        enum { sampleMax = 160 };
62          string sample;
63          map<unsigned, unsigned> occurrencesTitle;
64          map<unsigned, unsigned> occurrencesDescription;
# Line 93 | Line 94 | private:
94          unsigned evaluate(vector<unsigned>& ins);
95          void decrap(string& crap);
96   public:
97 <        Ranker();
98 <        Ranker(Page& page);
97 >        Ranker(Page& page) : Page(page), value(0), requiredValue(0),
98 >                excludedValue(0), eitherOrValue(0), allIn(all) {}
99          ~Ranker() {}
100          void rank(vector<string> query);
101          void setSample();
102          string getTitle();
103          string getDescription();
104 <        string getSample() { return sample; }
104 >        string& getSample() { return sample; }
105          bool operator==(const unsigned number) const;
106          bool operator==(const Ranker& ranker) const;
107          bool operator!=(const unsigned number) const;

Comparing:
trunk/Search/Ranker.h (property svn:eol-style), Revision 15 by douglas, 2002-12-09T09:46:18-08:00 vs.
trunk/Search/Ranker.hpp (property svn:eol-style), Revision 349 by Douglas Thrift, 2004-05-27T00:18:04-07:00

# Line 0 | Line 1
1 + native

Comparing:
trunk/Search/Ranker.h (property svn:keywords), Revision 15 by douglas, 2002-12-09T09:46:18-08:00 vs.
trunk/Search/Ranker.hpp (property svn:keywords), Revision 349 by Douglas Thrift, 2004-05-27T00:18:04-07:00

# Line 0 | Line 1
1 + Id

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines