本文整理汇总了C++中Bundle::numCols方法的典型用法代码示例。如果您正苦于以下问题:C++ Bundle::numCols方法的具体用法?C++ Bundle::numCols怎么用?C++ Bundle::numCols使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bundle
的用法示例。
在下文中一共展示了Bundle::numCols方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WUPException
BundleView(Bundle<T> & bundle, const uint i1, const uint j1, const uint i2, const uint j2) :
data(&bundle(i1, j1)),
cols(j2-j1),
rows(i2-i1),
stride(bundle.numCols())
{
#ifndef WUP_UNSAFE
if (i1 < 0 || j1 < 0 || i2 > bundle.numRows() || j2 > bundle.numCols() || i2 <= i1 || j2 <= j1)
throw WUPException("Out of bounds");
#endif
}
示例2: onFinish
virtual void
onFinish()
{
if (_noPrint)
return;
if (_eachStep)
return;
#ifdef __ANDROID_API__
const int numRows = _bundle.numRows();
const int numCols = _bundle.numCols();
std::stringstream ss;
LOGD("%s : %d", _label.c_str(), _onlySample);
for (int i=0;i<numRows; ++i) {
ss.clear();
for (int j=0;j<numCols; ++j)
ss << _bundle(i, j) << ", ";
LOGD("%d: %s", i, ss.str().c_str());
}
#else
print(_label, " : ", _onlySample);
print(_bundle);
#endif
_bundle.clear();
}
示例3: BundleView
BundleView(Bundle<T> & _bundle, const uint _rows, const uint _cols) :
data(&_bundle(0, 0)),
cols(_cols),
rows(_rows),
stride(_bundle.numCols())
{
}
示例4: onExport
virtual
void onExport(iwriter & writer)
{
writer.putUnsignedInt(_bundle.numCols());
writer.put(_counter);
writer.putBool(_eachStep);
writer.putString(_label);
writer.put(_onlySample);
}