本文整理匯總了C++中Interval::getHigh方法的典型用法代碼示例。如果您正苦於以下問題:C++ Interval::getHigh方法的具體用法?C++ Interval::getHigh怎麽用?C++ Interval::getHigh使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Interval
的用法示例。
在下文中一共展示了Interval::getHigh方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: Encode
void Entry::Encode(Node * cnode, ArithmeticCoderC * mAc)
{
std::string str;
std::vector<std::string> del_symb_copy;
Interval *interval = new Interval();
std::vector<Node*> *sorted_children = new std::vector<Node*>;
str = ReturnSymbolOrESC(); // Returns which string will be encoded: an escape or a symbol
interval->FindTotal(*del_symb, cnode);
del_symb_copy = *del_symb;
del_symb->clear();
*sorted_children = cnode->Node::GetSortedChildren(del_symb_copy, del_symb);
interval->FindLowHigh(str, sorted_children, cnode);
UpdateProb(*interval);
//std::clog << "symbol: " << str << " - low = " << interval->getLow() << ", high = " << interval->getHigh() << ", total = " << interval->getTotal() << std::endl;
mAc->Encode(interval->getLow(), interval->getHigh(), interval->getTotal());
delete interval;
delete sorted_children;
}
示例2: UpdateProb
void Entry::UpdateProb(Interval interval)
{
prob->push_back((double) (interval.getHigh() - interval.getLow()) / interval.getTotal());
}