Newer
Older
jsclose
committed
//
// Created by Jake Close on 3/13/18.
//
#pragma once
#include "ISR.h"
#include "ISREndDoc.h"
jsclose
committed
//Find occurrences of contained ISRs in a single document not containing any excluded ISRs.
jsclose
committed
{
public:
ISR *Contained;
ISR *Excluded;
vector<string> terms;
jsclose
committed
jsclose
committed
{
// 1. Seek all the included ISRs to the first occurrence beginning at
jsclose
committed
// 2. Move the document end ISR to just past the furthest
// contained ISR, then calculate the document begin location.
jsclose
committed
// 3. Seek all the other contained terms to past the document begin.
// 4. If any contained erm is past the document end, return to
jsclose
committed
// 5. If any ISR reaches the end, there is no match.
// 6. Seek all the excluded ISRs to the first occurrence beginning at
jsclose
committed
// 7. If any excluded ISR falls within the document, reset the
// target to one past the end of the document and return to
// step 1.
jsclose
committed
};
/*
* Seek()
* GetEndDocument
*
*/
void Solve()
jsclose
committed
{
while(Contained->GetCurrentLocation() != MAX_Location)
{
/*
* beg = GetBeginning of Doc
* Pass Terms to ranker
*
* vector<words>
*
* Ranker:
* for term in terms
* IsrWord word = new ISR(term)
* Term.seek(beg)
* words.push(word)
* rank(words)
*
* NextDocument()
*/
}
jsclose
committed
}
private:
unsigned nearestTerm, farthestTerm;
Location nearestStartLocation, nearestEndLocation;
jsclose
committed
};