#include <QueryNode.h>
An abtsract class for binary logical operations on nodes (and, or). It contains instances of three major logical operation (union, intersection and difference) which were slightly modified to deal with CQueryNode::m_Hits and CQueryNode::m_Occurrences simultaneously.
CQueryBinaryOperationNode::CQueryBinaryOperationNode | ( | ) | [inline] |
CQueryBinaryOperationNode::CQueryBinaryOperationNode | ( | CQueryNode * | dtr1, | |
CQueryNode * | dtr2 | |||
) | [inline] |
CQueryBinaryOperationNode::~CQueryBinaryOperationNode | ( | ) | [virtual] |
void CQueryBinaryOperationNode::hits_add | ( | const CQueryNode & | NodeFrom, | |
vector< CHit >::const_iterator | First | |||
) | [private] |
add the hit list of "NodeFrom" to the back of "First"
References CQueryNode::AddOccurrences(), GetOccurrencesSize, CHit::m_HighlightOccurrenceEnd, and CQueryNode::m_Hits.
Referenced by hits_and_positions_difference(), and hits_and_positions_union().
void CQueryBinaryOperationNode::Create | ( | const CConcHolder * | pHolder, | |
CQueryNode * | child1, | |||
CQueryNode * | child2, | |||
string | Operation | |||
) |
References m_pChild1, m_pChild2, CQueryNode::m_Source, and CQueryNode::SetHolder().
Referenced by yyqparse().
void CQueryBinaryOperationNode::hits_and_positions_union | ( | ) |
a modified version of std::union which unites simultaneously two pairs of vectors
References CQueryNode::AddOccurrences(), CQueryNode::ClearAndReserveOccurrences(), GetOccurrencesSize, hits_add(), CHit::m_HighlightOccurrenceEnd, CQueryNode::m_Hits, m_pChild1, and m_pChild2.
Referenced by CQueryOrOperation::Evaluate(), and CQueryAndOperation::Evaluate().
void CQueryBinaryOperationNode::hits_and_positions_intersection | ( | ) |
a modified version of std::intersection which simultaneously deals with two pairs of vectors
References CQueryNode::AddOccurrences(), CQueryNode::ClearAndReserveOccurrences(), GetOccurrencesSize, CHit::m_HighlightOccurrenceEnd, CQueryNode::m_Hits, m_pChild1, and m_pChild2.
Referenced by CQueryOrOperation::Evaluate(), and CQueryAndOperation::Evaluate().
void CQueryBinaryOperationNode::hits_and_positions_difference | ( | ) |
a modified version of std::difference which simultaneously deals with two pairs of vectors
References CQueryNode::AddOccurrences(), CQueryNode::ClearAndReserveOccurrences(), GetOccurrencesSize, hits_add(), CHit::m_HighlightOccurrenceEnd, CQueryNode::m_Hits, m_pChild1, and m_pChild2.
Referenced by CQueryAndOperation::Evaluate().
size_t CQueryBinaryOperationNode::GetNodeFrequenceByNodeIndex | ( | size_t | NodeIndex | ) | const [virtual] |
Reimplemented from CQueryNode.
References CQueryNode::GetNodeFrequenceByNodeIndex(), m_pChild1, and m_pChild2.
CQueryNode* CQueryBinaryOperationNode::m_pChild1 [protected] |
the first operation member
Referenced by Create(), CQueryOrOperation::Evaluate(), CQueryAndOperation::Evaluate(), CQueryWithNode::EvaluateWithoutHits(), GetNodeFrequenceByNodeIndex(), hits_and_positions_difference(), hits_and_positions_intersection(), hits_and_positions_union(), CQueryWithNode::OccurIntersectionWithTokenIds(), and ~CQueryBinaryOperationNode().
CQueryNode* CQueryBinaryOperationNode::m_pChild2 [protected] |
the second operation member
Referenced by Create(), CQueryOrOperation::Evaluate(), CQueryAndOperation::Evaluate(), CQueryWithNode::EvaluateWithoutHits(), GetNodeFrequenceByNodeIndex(), hits_and_positions_difference(), hits_and_positions_intersection(), hits_and_positions_union(), CQueryWithNode::OccurIntersectionWithTokenIds(), and ~CQueryBinaryOperationNode().