OpenTREP Logo  0.07.18
C++ Open Travel Request Parsing Library
Loading...
Searching...
No Matches
OPENTREP::ResultCombination Class Reference

Class wrapping functions on a list of ResultHolder objects. More...

#include <opentrep/bom/ResultCombination.hpp>

+ Inheritance diagram for OPENTREP::ResultCombination:

Public Member Functions

const TravelQuery_TgetQueryString () const
 
const ResultHolderList_TgetResultHolderList () const
 
bool hasFullTextMatched () const
 
const ResultHoldergetBestMatchingResultHolder () const
 
const Percentage_TgetBestMatchingWeight () const
 
StringSet getCorrectedStringSet () const
 
void displayXapianPercentages () const
 
void calculateEnvelopeWeights () const
 
void calculateCodeMatches () const
 
void calculatePageRanks () const
 
void calculateHeuristicWeights () const
 
void calculateCombinedWeights () const
 
void calculateAllWeights ()
 
bool chooseBestMatchingResultHolder ()
 
void toStream (std::ostream &) const
 
void fromStream (std::istream &)
 
std::string toString () const
 
std::string describeKey () const
 
std::string describeShortKey () const
 

Friends

class FacResultCombination
 

Detailed Description

Class wrapping functions on a list of ResultHolder objects.

Definition at line 25 of file ResultCombination.hpp.

Member Function Documentation

◆ getQueryString()

const TravelQuery_T & OPENTREP::ResultCombination::getQueryString ( ) const
inline

Get the query string.

Definition at line 32 of file ResultCombination.hpp.

◆ getResultHolderList()

const ResultHolderList_T & OPENTREP::ResultCombination::getResultHolderList ( ) const
inline

Retrieve the list of result objects.

Definition at line 39 of file ResultCombination.hpp.

◆ hasFullTextMatched()

bool OPENTREP::ResultCombination::hasFullTextMatched ( ) const
inline

State whether there has been a full-text match.

Definition at line 46 of file ResultCombination.hpp.

◆ getBestMatchingResultHolder()

const ResultHolder & OPENTREP::ResultCombination::getBestMatchingResultHolder ( ) const

Get a reference on the best matching ResultHolder object. If there is no such object, the method throws a NoBestMatchingResultHolderException exception.

Definition at line 46 of file ResultCombination.cpp.

References getBestMatchingResultHolder(), and OPENTREP_LOG_ERROR.

Referenced by OPENTREP::chooseBestMatchingResultHolder(), OPENTREP::createPlaces(), getBestMatchingResultHolder(), getBestMatchingWeight(), and getCorrectedStringSet().

◆ getBestMatchingWeight()

const Percentage_T & OPENTREP::ResultCombination::getBestMatchingWeight ( ) const

Get the weight of the best matching ResultHolder object. If there is no such object, the method throws a NoBestMatchingResultHolderException exception.

Definition at line 59 of file ResultCombination.cpp.

References getBestMatchingResultHolder(), getBestMatchingWeight(), and OPENTREP::ResultHolder::getCombinedWeight().

Referenced by OPENTREP::chooseBestMatchingResultHolder(), and getBestMatchingWeight().

◆ getCorrectedStringSet()

StringSet OPENTREP::ResultCombination::getCorrectedStringSet ( ) const

Get the list of corrected strings for the best matching ResultHolder object. If there is no such object, the method throws a NoBestMatchingResultHolderException exception.

Definition at line 66 of file ResultCombination.cpp.

References getBestMatchingResultHolder(), getCorrectedStringSet(), and OPENTREP::ResultHolder::getCorrectedStringSet().

Referenced by OPENTREP::chooseBestMatchingResultHolder(), and getCorrectedStringSet().

◆ displayXapianPercentages()

void OPENTREP::ResultCombination::displayXapianPercentages ( ) const

Display the Xapian matching percentages for all the matching documents.

Definition at line 111 of file ResultCombination.cpp.

References displayXapianPercentages(), and OPENTREP::ResultHolder::displayXapianPercentages().

Referenced by calculateAllWeights(), and displayXapianPercentages().

◆ calculateEnvelopeWeights()

void OPENTREP::ResultCombination::calculateEnvelopeWeights ( ) const

Calculate/set the envelope weights for all the matching documents

Definition at line 125 of file ResultCombination.cpp.

References calculateEnvelopeWeights(), and OPENTREP::ResultHolder::calculateEnvelopeWeights().

Referenced by calculateAllWeights(), and calculateEnvelopeWeights().

◆ calculateCodeMatches()

void OPENTREP::ResultCombination::calculateCodeMatches ( ) const

Calculate/set the IATA/ICAO code matching weights for all the matching documents

Definition at line 139 of file ResultCombination.cpp.

References calculateCodeMatches(), and OPENTREP::ResultHolder::calculateCodeMatches().

Referenced by calculateAllWeights(), and calculateCodeMatches().

◆ calculatePageRanks()

void OPENTREP::ResultCombination::calculatePageRanks ( ) const

Calculate/set the PageRanks for all the matching documents

Definition at line 153 of file ResultCombination.cpp.

References calculatePageRanks(), and OPENTREP::ResultHolder::calculatePageRanks().

Referenced by calculateAllWeights(), and calculatePageRanks().

◆ calculateHeuristicWeights()

void OPENTREP::ResultCombination::calculateHeuristicWeights ( ) const

Calculate/set the heuristic weights for all the matching documents

Definition at line 167 of file ResultCombination.cpp.

References calculateHeuristicWeights(), and OPENTREP::ResultHolder::calculateHeuristicWeights().

Referenced by calculateAllWeights(), and calculateHeuristicWeights().

◆ calculateCombinedWeights()

void OPENTREP::ResultCombination::calculateCombinedWeights ( ) const

Calculate/set the combined weights for all the matching documents

Definition at line 181 of file ResultCombination.cpp.

References calculateCombinedWeights(), and OPENTREP::ResultHolder::calculateCombinedWeights().

Referenced by calculateAllWeights(), and calculateCombinedWeights().

◆ calculateAllWeights()

void OPENTREP::ResultCombination::calculateAllWeights ( )

◆ chooseBestMatchingResultHolder()

bool OPENTREP::ResultCombination::chooseBestMatchingResultHolder ( )

Choose the best matching ResultHolder object from the underlying list.

Returns
bool Whether or not a best matching ResultHolder exists.

Definition at line 229 of file ResultCombination.cpp.

References chooseBestMatchingResultHolder(), describeKey(), OPENTREP::ResultHolder::getCombinedWeight(), and OPENTREP_LOG_DEBUG.

Referenced by OPENTREP::chooseBestMatchingResultHolder(), and chooseBestMatchingResultHolder().

◆ toStream()

void OPENTREP::ResultCombination::toStream ( std::ostream & ioOut) const
virtual

Dump a Business Object into an output stream.

Parameters
ostream&the output stream.

Implements OPENTREP::BomAbstract.

Definition at line 102 of file ResultCombination.cpp.

References toStream(), and toString().

Referenced by toStream().

◆ fromStream()

void OPENTREP::ResultCombination::fromStream ( std::istream & ioIn)
virtual

Read a Business Object from an input stream.

Parameters
istream&the input stream.

Implements OPENTREP::BomAbstract.

Definition at line 107 of file ResultCombination.cpp.

References fromStream().

Referenced by fromStream().

◆ toString()

std::string OPENTREP::ResultCombination::toString ( ) const
virtual

Get the serialised version of the Business Object.

Implements OPENTREP::BomAbstract.

Definition at line 85 of file ResultCombination.cpp.

References describeShortKey(), toString(), and OPENTREP::ResultHolder::toString().

Referenced by toString().

◆ describeKey()

std::string OPENTREP::ResultCombination::describeKey ( ) const
virtual

Get a string describing the whole key (differentiating two objects at any level).

Implements OPENTREP::BomAbstract.

Definition at line 80 of file ResultCombination.cpp.

References describeKey(), and describeShortKey().

Referenced by chooseBestMatchingResultHolder(), and describeKey().

◆ describeShortKey()

std::string OPENTREP::ResultCombination::describeShortKey ( ) const
virtual

Get a string describing the short key (differentiating two objects at the same level).

Implements OPENTREP::BomAbstract.

Definition at line 73 of file ResultCombination.cpp.

References describeShortKey().

Referenced by OPENTREP::chooseBestMatchingResultHolder(), describeKey(), describeShortKey(), and toString().

Friends And Related Symbol Documentation

◆ FacResultCombination

friend class FacResultCombination
friend

Definition at line 26 of file ResultCombination.hpp.

References FacResultCombination.

Referenced by FacResultCombination.


The documentation for this class was generated from the following files: