本文整理汇总了C++中pruneTable函数的典型用法代码示例。如果您正苦于以下问题:C++ pruneTable函数的具体用法?C++ pruneTable怎么用?C++ pruneTable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pruneTable函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: pruneTable
CSSSegmentedFontFace::~CSSSegmentedFontFace()
{
pruneTable();
unsigned size = m_fontFaces.size();
for (unsigned i = 0; i < size; i++)
m_fontFaces[i]->removedFromSegmentedFontFace(this);
}
开发者ID:a33g-dev,项目名称:platform_samsung,代码行数:7,代码来源:CSSSegmentedFontFace.cpp
示例2: pruneTable
CSSSegmentedFontFace::~CSSSegmentedFontFace()
{
pruneTable();
unsigned size = m_fontFaces.size();
for (unsigned i = 0; i < size; i++)
m_fontFaces[i]->clearSegmentedFontFace();
}
开发者ID:Igalia,项目名称:blink,代码行数:7,代码来源:CSSSegmentedFontFace.cpp
示例3: buildDecisionTree
/*
* Recursively builds the decision tree based on
* the data that it is passed and tha table info.
*/
node* buildDecisionTree(vvs &table, node* nodePtr, vvs &tableInfo)
{
if (tableIsEmpty(table)) {
return NULL;
}
if (isHomogeneous(table)) {
nodePtr->isLeaf = true;
nodePtr->label = table[1][table[1].size()-1];
return nodePtr;
} else {
string splittingCol = decideSplittingColumn(table);
nodePtr->splitOn = splittingCol;
int colIndex = returnColumnIndex(splittingCol, tableInfo);
int iii;
for (iii = 1; iii < tableInfo[colIndex].size(); iii++) {
node* newNode = (node*) new node;
newNode->label = tableInfo[colIndex][iii];
nodePtr->childrenValues.push_back(tableInfo[colIndex][iii]);
newNode->isLeaf = false;
newNode->splitOn = splittingCol;
vvs auxTable = pruneTable(table, splittingCol, tableInfo[colIndex][iii]);
nodePtr->children.push_back(buildDecisionTree(auxTable, newNode, tableInfo));
}
}
return nodePtr;
}
开发者ID:novaintel,项目名称:csci4125,代码行数:30,代码来源:functions.cpp
示例4: pruneTable
void RemoteFontFaceSource::fontLoaded(FontResource*)
{
m_histograms.recordRemoteFont(m_font.get());
pruneTable();
if (m_face)
m_face->fontLoaded(this);
}
开发者ID:coinpayee,项目名称:blink,代码行数:8,代码来源:RemoteFontFaceSource.cpp
示例5: pruneTable
CSSSegmentedFontFace::~CSSSegmentedFontFace()
{
pruneTable();
#if !ENABLE(OILPAN)
for (const auto& fontFace : m_fontFaces)
fontFace->cssFontFace()->clearSegmentedFontFace();
#endif
}
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:8,代码来源:CSSSegmentedFontFace.cpp
示例6: pruneTable
CSSSegmentedFontFace::~CSSSegmentedFontFace()
{
pruneTable();
#if !ENABLE(OILPAN)
for (FontFaceList::iterator it = m_fontFaces.begin(); it != m_fontFaces.end(); ++it)
(*it)->cssFontFace()->clearSegmentedFontFace();
#endif
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:8,代码来源:CSSSegmentedFontFace.cpp
示例7: pruneTable
void CSSFontFaceSource::fontLoaded(FontResource*)
{
if (!m_fontDataTable.isEmpty())
m_histograms.recordRemoteFont(m_font.get());
pruneTable();
if (m_face)
m_face->fontLoaded(this);
}
开发者ID:wangshijun,项目名称:Blink,代码行数:9,代码来源:CSSFontFaceSource.cpp
示例8: decideSplittingColumn
/*
* Decides which column to split on
* based on entropy. Returns the column
* with the least entropy.
*/
string decideSplittingColumn(vvs &table)
{
int column, iii;
double minEntropy = DBL_MAX;
int splittingColumn = 0;
vi entropies;
#pragma omp parallel
{
#pragma omp for
for (column = 0; column < table[0].size() - 1; column++) {
string colName = table[0][column];
msi tempMap;
vi counts = countDistinct(table, column);
vd attributeEntropy;
double columnEntropy = 0.0;
for (iii = 1; iii < table.size() - 1; iii++) {
double entropy = 0.0;
if (tempMap.find(table[iii][column]) != tempMap.end()) { // IF ATTRIBUTE IS ALREADY FOUND IN A COLUMN, UPDATE IT'S FREQUENCY
tempMap[table[iii][column]]++;
}
else { // IF ATTRIBUTE IS FOUND FOR THE FIRST TIME IN A COLUMN, THEN PROCESS IT AND CALCULATE IT'S ENTROPY
tempMap[table[iii][column]] = 1;
vvs tempTable = pruneTable(table, colName, table[iii][column]);
vi classCounts = countDistinct(tempTable, tempTable[0].size() - 1);
int jjj, kkk;
for (jjj = 0; jjj < classCounts.size(); jjj++) {
double temp = (double)classCounts[jjj];
entropy -= (temp / classCounts[classCounts.size() - 1])*(log(temp / classCounts[classCounts.size() - 1]) / log(2));
}
attributeEntropy.push_back(entropy);
entropy = 0.0;
}
}
//for (iii = 0; iii < counts.size() - 1 && ((attributeEntropy.size() - 1) == (counts.size() - 1)); iii++) {
for (iii = 0; iii < counts.size() - 1; iii++) {
columnEntropy += ((double)counts[iii] * (double)attributeEntropy[iii]);
}
columnEntropy = columnEntropy / ((double)counts[counts.size() - 1]);
if (columnEntropy <= minEntropy) {
minEntropy = columnEntropy;
splittingColumn = column;
}
}
}
return table[0][splittingColumn];
}
开发者ID:novaintel,项目名称:csci4125,代码行数:52,代码来源:functions.cpp
示例9: pruneTable
void CSSSegmentedFontFace::fontLoaded(CSSFontFace*)
{
pruneTable();
#if ENABLE(FONT_LOAD_EVENTS)
if (RuntimeEnabledFeatures::sharedFeatures().fontLoadEventsEnabled() && !isLoading()) {
Vector<RefPtr<LoadFontCallback>> callbacks;
m_callbacks.swap(callbacks);
for (size_t index = 0; index < callbacks.size(); ++index) {
if (checkFont())
callbacks[index]->notifyLoaded();
else
callbacks[index]->notifyError();
}
}
#endif
}
开发者ID:feel2d,项目名称:webkit,代码行数:17,代码来源:CSSSegmentedFontFace.cpp
示例10: request
void RemoteFontFaceSource::corsFailed(FontResource*)
{
if (m_face) {
m_histograms.corsFailed();
Document* document = m_face->fontSelector() ? m_face->fontSelector()->document() : 0;
if (document) {
FetchRequest request(ResourceRequest(m_font->url()), FetchInitiatorTypeNames::css);
ResourcePtr<FontResource> newFontResource = document->fetcher()->fetchFont(request);
if (newFontResource) {
m_font->removeClient(this);
m_font = newFontResource;
m_font->addClient(this);
m_face->fontSelector()->beginLoadingFontSoon(m_font.get());
return;
} else {
pruneTable();
}
}
m_face->fontLoaded(this);
}
}
开发者ID:coinpayee,项目名称:blink,代码行数:21,代码来源:RemoteFontFaceSource.cpp
示例11: pruneTable
CSSSegmentedFontFace::~CSSSegmentedFontFace()
{
pruneTable();
for (FontFaceList::iterator it = m_fontFaces.begin(); it != m_fontFaces.end(); ++it)
(*it)->cssFontFace()->clearSegmentedFontFace();
}
开发者ID:kublaj,项目名称:blink,代码行数:6,代码来源:CSSSegmentedFontFace.cpp
示例12: pruneTable
void CSSFontFaceSource::fontLoaded(CachedFont*)
{
pruneTable();
if (m_face)
m_face->fontLoaded(this);
}
开发者ID:valbok,项目名称:WebKitForWayland,代码行数:6,代码来源:CSSFontFaceSource.cpp
示例13: pruneTable
void CSSSegmentedFontFace::fontLoadWaitLimitExceeded(CSSFontFace*)
{
pruneTable();
}
开发者ID:eth-srl,项目名称:BlinkER,代码行数:4,代码来源:CSSSegmentedFontFace.cpp
注:本文中的pruneTable函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论