您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetRow函数代码示例

51自学网 2021-06-01 21:14:24
  C++
这篇教程C++ GetRow函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中GetRow函数的典型用法代码示例。如果您正苦于以下问题:C++ GetRow函数的具体用法?C++ GetRow怎么用?C++ GetRow使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了GetRow函数的24个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: GetRow

Screen* ScreenMgr::getScreen(ResourceID id){	uint32_t row = GetRow(id);	uint32_t col = GetCol(id);	if ( row-1 >=0 && col-1 >=0 && row -1 < getRowCount() && col -1 < getColCount()){		return screens_[GetRow(id)-1][GetCol(id)-1];	}else return 0;}
开发者ID:rgmabs19357,项目名称:gameseer,代码行数:7,


示例2: drawXFormPixelWithAlpha

  void drawXFormPixelWithAlpha(const uint32_t i, const uint32_t j,                               const GRect &srcRect, const GIRect &dstRect,                               const GBitmap &src, const GBitmap &dst,                               const uint8_t alpha,                               const BlendFunc blend = blend_srcover) {    GVec3f ctxPt(static_cast<float>(dstRect.fLeft + i) + 0.5f,                 static_cast<float>(dstRect.fTop + j) + 0.5f,                 1.0f);    ctxPt = m_CTMInv * ctxPt;    if(ContainsPoint(srcRect, ctxPt[0], ctxPt[1])) {      uint32_t x = static_cast<uint32_t>(ctxPt[0] - srcRect.fLeft);      uint32_t y = static_cast<uint32_t>(ctxPt[1] - srcRect.fTop);      GPixel *srcRow = GetRow(src, y);      GPixel *dstRow = GetRow(dst, j+dstRect.fTop) + dstRect.fLeft;      uint32_t srcA = fixed_multiply(GPixel_GetA(srcRow[x]), alpha);      uint32_t srcR = fixed_multiply(GPixel_GetR(srcRow[x]), alpha);      uint32_t srcG = fixed_multiply(GPixel_GetG(srcRow[x]), alpha);      uint32_t srcB = fixed_multiply(GPixel_GetB(srcRow[x]), alpha);      GPixel src = GPixel_PackARGB(srcA, srcR, srcG, srcB);      dstRow[i] = blend(dstRow[i], src);    }  }
开发者ID:Mokosha,项目名称:COMP590,代码行数:27,


示例3: assert

	bool Board::DoesEnPassantCaptureCauseDiscoveredCheck(int square, int color)	{		assert(this->enPassantRights.HasEnPassant());		int attackerColor = OtherColor(color);		int kingSquare = GetKingSquare(color);		int kingRow = GetRow(kingSquare);		int pieceRow = GetRow(square);		int dr = pieceRow - kingRow;		ulong defenderKing = 1ULL << kingSquare;		if (dr == 0)		{			ulong myRankAttacks = MoveGenerator::rankAttacks[square][GetRankStatus(square)];			ulong theirRankAttacks = MoveGenerator::rankAttacks[enPassantRights.PawnSquare()][GetRankStatus(enPassantRights.PawnSquare())];			ulong defenderKing = 1ULL << kingSquare;			if ((defenderKing & myRankAttacks) != 0 || (defenderKing & theirRankAttacks) != 0)			{				ulong attackers = GetPieceBitBoard(Pieces::GetPiece(PieceTypes::Rook, attackerColor)) |					GetPieceBitBoard(Pieces::GetPiece(PieceTypes::Queen, attackerColor));				if ((myRankAttacks & attackers) != 0 || (theirRankAttacks & attackers) != 0)				{					return true;				}			}		}		return false;	}
开发者ID:alanjg,项目名称:Chess,代码行数:27,


示例4: switch

int RDMatrix::port(RDMatrix::Role role) const{  switch(role) {    case RDMatrix::Primary:      return GetRow("PORT").toInt();    case RDMatrix::Backup:      return GetRow("PORT_2").toInt();  }  return -1;}
开发者ID:WMTH,项目名称:rivendell,代码行数:11,


示例5: GetPosition

void Pacman::Debug(){	std::cout << std::endl;	std::cout << "<<< Pacmans' Data >>>" << std::endl;	std::cout << "actual position: (" << GetPosition().x  << ", " << GetPosition().y << ")" << std::endl;	std::cout << "grid position: (" << GetRow() << "," << GetColumn() << ")" << std::endl;	std::cout << "map tile: " << map->getTile(GetRow(), GetColumn()) << std::endl;	std::cout << std::endl;	std::cout << "<<< END Pacmans' Data >>>" << std::endl;	std::cout << std::endl;}
开发者ID:JohnBali,项目名称:Pac-Man,代码行数:11,


示例6: ToResourceID

ResourceID ScreenMgr::occupyScreenOut( ResourceID inputid){	Screen* screen = screens_[GetRow(inputid)-1][GetCol(inputid)-1];	for ( auto it = screen->outPort753_.begin(); it != screen->outPort753_.end(); ++it){		if ( it->second == 0){			ResourceID wnode = ToResourceID( GetInput(inputid), GetOutput(it->first), GetRow(inputid), GetCol(inputid));			it->second = wnode;			return wnode;		}	}	return 0;}
开发者ID:rgmabs19357,项目名称:gameseer,代码行数:11,


示例7: connInOutRequest

void Screen::connInOutRequest(ResourceID inputid, ResourceID wnode){	if ( qbox_){		QboxDataMap value;		value["out"] = QString::number(GetOutput(wnode) ).toStdString();		if ( GetCol(inputid) == GetCol(wnode) && GetRow(inputid) == GetRow(wnode)){			value["in"] = QString::number(GetInput(inputid) ).toStdString();		}else{			value["in"] = QString::number(GetInput(wnode) ).toStdString();		}		qbox_->addAsyncRequest( PSetSwitchInputReq::uri , std::bind( ignoreCallback, std::placeholders::_1, std::placeholders::_2), value);	}}
开发者ID:rgmabs19357,项目名称:gameseer,代码行数:12,


示例8: connInOutRequestCB

bool Screen::connInOutRequestCB(ResourceID inputid, ResourceID wnode, QboxCallback callback, uint32_t , QboxDataMap& v){	if ( qbox_){		QboxDataMap value;		value["out"] = QString::number(GetOutput(wnode) ).toStdString();		if ( GetCol(inputid) == GetCol(wnode) && GetRow(inputid) == GetRow(wnode)){			value["in"] = QString::number(GetInput(inputid) ).toStdString();		}else{			value["in"] = QString::number(GetInput(wnode) ).toStdString();		}		qbox_->addAsyncRequest( PSetSwitchInputReq::uri , callback, value);		return true;	}	return false;}
开发者ID:rgmabs19357,项目名称:gameseer,代码行数:14,


示例9: GetRow

void Matrix3x3::Renormalization(){	Vector3D Xorth, Yorth, Zorth, X = GetRow(0), Y = GetRow(1);	double Error = X * Y;	Xorth = X - Y * Error;	Yorth = Y - X * Error;	Zorth = Vector3D::Cross(Xorth, Yorth);	// Normalize via Taylor expansion	Xorth = Xorth * 0.5d * (3.0d - Xorth * Xorth);	Yorth = Yorth * 0.5d * (3.0d - Yorth * Yorth);	Zorth = Zorth * 0.5d * (3.0d - Zorth * Zorth);	SetRow(0, Xorth);	SetRow(1, Yorth);	SetRow(2, Zorth);}
开发者ID:BluPhoenix,项目名称:Quadcopter,代码行数:15,


示例10: GetColumn

double FDSMesh::GetKnotValue(const double &x, const double &y) const{    /// To Do: exception / warning when no knot is available for the pedestrian position    int col=0;    int row=0;    /// Which knot is the nearest one to (x,y)?    GetColumn(x, col);    GetRow(row, y);    //std::cout << _matrix[row][col].GetValue() << std::endl;    double value;    // Exception if a mesh can not provide an appropriately located value    if(row < _matrix.size() && col < _matrix[0].size())          value = _matrix[row][col].GetValue();    else        // needs to be fixed!!!          value = 0.0;//std::numeric_limits<double>::quiet_NaN();//    if(_matrix[row][col].GetValue() == 0.) {//        std::cout << "(" << row << " , " << col <<  ")" << std::endl;//    }    return value;}
开发者ID:chraibi,项目名称:jpscore,代码行数:28,


示例11:

voidInfoBoxesConfigWidget::RefreshEditContentDescription(){  DataFieldEnum &df = (DataFieldEnum &)GetDataField(CONTENT);  WndFrame &description = (WndFrame &)GetRow(DESCRIPTION);  description.SetText(df.GetHelp() != nullptr ? df.GetHelp() : _T(""));}
开发者ID:ThomasXBMC,项目名称:XCSoar,代码行数:7,


示例12: GetRow

void MyListModel::DeleteItems( const wxDataViewItemArray &items ){    unsigned i;    wxArrayInt rows;    for (i = 0; i < items.GetCount(); i++)    {        unsigned int row = GetRow( items[i] );        if (row < m_textColValues.GetCount())            rows.Add( row );    }    if (rows.GetCount() == 0)    {        // none of the selected items were in the range of the items        // which we store... for simplicity, don't allow removing them        wxLogError( "Cannot remove rows with an index greater than %d", m_textColValues.GetCount() );        return;    }    // Sort in descending order so that the last    // row will be deleted first. Otherwise the    // remaining indeces would all be wrong.    rows.Sort( my_sort_reverse );    for (i = 0; i < rows.GetCount(); i++)        m_textColValues.RemoveAt( rows[i] );    // This is just to test if wxDataViewCtrl can    // cope with removing rows not sorted in    // descending order    rows.Sort( my_sort );    RowsDeleted( rows );}
开发者ID:euler0,项目名称:Helium,代码行数:32,


示例13: Epetra_Vector

//=============================================================================double Epetra_MsrMatrix::NormOne() const {  if (NormOne_>-1.0) return(NormOne_);  if (!Filled()) EPETRA_CHK_ERR(-1); // Matrix must be filled.  Epetra_Vector * x = new Epetra_Vector(RowMatrixRowMap()); // Need temp vector for column sums    Epetra_Vector * xp = 0;  Epetra_Vector * x_tmp = 0;    // If we have a non-trivial importer, we must export elements that are permuted or belong to other processors  if (RowMatrixImporter()!=0) {    x_tmp = new Epetra_Vector(RowMatrixColMap()); // Create temporary import vector if needed    xp = x_tmp;  }  int i, j;  for (i=0; i < NumMyCols_; i++) (*xp)[i] = 0.0;  for (i=0; i < NumMyRows_; i++) {    int NumEntries = GetRow(i);    for (j=0; j < NumEntries; j++) (*xp)[Indices_[j]] += fabs(Values_[j]);  }  if (RowMatrixImporter()!=0) x->Export(*x_tmp, *RowMatrixImporter(), Add); // Fill x with Values from temp vector  x->MaxValue(&NormOne_); // Find max  if (x_tmp!=0) delete x_tmp;  delete x;  UpdateFlops(NumGlobalNonzeros());  return(NormOne_);}
开发者ID:cakeisalie,项目名称:oomphlib_003,代码行数:33,


示例14: GetRow

//=============================================================================int Epetra_MsrMatrix::InvRowSums(Epetra_Vector& x) const {//// Put inverse of the sum of absolute values of the ith row of A in x[i].//  if (!OperatorRangeMap().SameAs(x.Map())) EPETRA_CHK_ERR(-2); // x must have the same distribution as the range of A  int ierr = 0;  int i, j;  for (i=0; i < NumMyRows_; i++) {    int NumEntries = GetRow(i); // Copies ith row of matrix into Values_ and Indices_    double scale = 0.0;    for (j=0; j < NumEntries; j++) scale += fabs(Values_[j]);    if (scale<Epetra_MinDouble) {      if (scale==0.0) ierr = 1; // Set error to 1 to signal that zero rowsum found (supercedes ierr = 2)      else if (ierr!=1) ierr = 2;      x[i] = Epetra_MaxDouble;    }    else      x[i] = 1.0/scale;  }  UpdateFlops(NumGlobalNonzeros());  EPETRA_CHK_ERR(ierr);  return(0);}
开发者ID:cakeisalie,项目名称:oomphlib_003,代码行数:26,


示例15: if

// Gets the dimensions of the colour cell given by (row,col)BOOL CColourPopup::GetCellRect(int nIndex, const LPRECT& rect){    if (nIndex == CUSTOM_BOX_VALUE)    {        ::SetRect(rect,                   m_CustomTextRect.left,  m_CustomTextRect.top,                  m_CustomTextRect.right, m_CustomTextRect.bottom);        return TRUE;    }    else if (nIndex == DEFAULT_BOX_VALUE)    {        ::SetRect(rect,                   m_DefaultTextRect.left,  m_DefaultTextRect.top,                  m_DefaultTextRect.right, m_DefaultTextRect.bottom);        return TRUE;    }    if (nIndex < 0 || nIndex >= m_nNumColours)        return FALSE;    rect->left = GetColumn(nIndex) * m_nBoxSize + m_nMargin;    rect->top  = GetRow(nIndex) * m_nBoxSize + m_nMargin;    // Move everything down if we are displaying a default text area    if (m_strDefaultText.GetLength())         rect->top += (m_nMargin + m_DefaultTextRect.Height());    rect->right = rect->left + m_nBoxSize;    rect->bottom = rect->top + m_nBoxSize;    return TRUE;}
开发者ID:BackupTheBerlios,项目名称:iris-svn,代码行数:33,


示例16: block_cut

static	void	block_cut(){	EditLine	*ed,*ed_next;	int 	x_st, x_ed;	char	buf[MAXEDITLINE+1];	if (bkm.blkm==BLKM_y && bkm.y_st<GetLastNumber())		lists_delete(bkm.y_st, bkm.y_ed-1);else		{		 ed=GetList(bkm.y_st);		 block_range(bkm.y_st, &bkm, &x_st, &x_ed);		 strcpy(buf, ed->buffer);		 buf[x_st]='/0';		 ed_next=GetList(bkm.y_ed);		 block_range(bkm.y_ed, &bkm, &x_st, &x_ed);		 strcat(buf, ed_next->buffer+x_ed);		 Realloc(ed, buf);		 if (bkm.y_st+1<=bkm.y_ed)		 	lists_delete(bkm.y_st+1, bkm.y_ed);		}	SetFileChangeFlag();	csr_lenew();	csr_setdy(GetRow()+bkm.y_st-GetLineOffset());	csr_setly(bkm.y_st);	if (bkm.blkm==BLKM_x)		csr_setlx(bkm.x_st);}
开发者ID:smorimura,项目名称:ne,代码行数:33,


示例17: if

BOOL COptionTreeColorPopUp::GetCellRect(int nIndex, const LPRECT& rect){	// Get cell rect    if (nIndex == OT_COLOR_CUSTOMBOXVALUE)    {        ::SetRect(rect, m_rcCustomTextRect.left,  m_rcCustomTextRect.top, m_rcCustomTextRect.right, m_rcCustomTextRect.bottom);				return TRUE;    }    else if (nIndex == OT_COLOR_DEFAULTBOXVALUE)    {        ::SetRect(rect, m_rcDefaultTextRect.left,  m_rcDefaultTextRect.top, m_rcDefaultTextRect.right, m_rcDefaultTextRect.bottom);        return TRUE;    }    if (nIndex < 0 || nIndex >= m_nNumColors)	{        return FALSE;	}    rect->left = GetColumn(nIndex) * m_nBoxSize + m_nMargin;    rect->top  = GetRow(nIndex) * m_nBoxSize + m_nMargin;    // Move everything down if we are displaying a default text area    if (m_strDefaultText.GetLength()) 	{        rect->top += (m_nMargin + m_rcDefaultTextRect.Height());	}    rect->right = rect->left + m_nBoxSize;    rect->bottom = rect->top + m_nBoxSize;    return TRUE;}
开发者ID:gaopan461,项目名称:acoral,代码行数:35,


示例18: while

	QModelIndex MergeModel::mapFromSource (const QModelIndex& sourceIndex) const	{		if (!sourceIndex.isValid ())			return {};		QList<QModelIndex> hier;		auto parent = sourceIndex;		while (parent.isValid ())		{			hier.prepend (parent);			parent = parent.parent ();		}		auto currentItem = Root_;		for (const auto& idx : hier)		{			currentItem = currentItem->FindChild (idx);			if (!currentItem)			{				qWarning () << Q_FUNC_INFO						<< "no next item for"						<< idx						<< hier;				return {};			}		}		return createIndex (currentItem->GetRow (), sourceIndex.column (), currentItem.get ());	}
开发者ID:ForNeVeR,项目名称:leechcraft,代码行数:29,


示例19: GetRow

void CResolverUIModel::DeleteItem(const wxDataViewItem &item){  unsigned int row = GetRow(item);  if (m_model.deleteEntry(row)) {    RowDeleted(row);  }}
开发者ID:Sonderstorch,项目名称:c-mon,代码行数:7,


示例20: GetRow

void CTimeBarListModel::DeleteItems( const wxDataViewItemArray &items ){    wxArrayInt rows;    for (unsigned i = 0; i < items.GetCount(); i++)    {        unsigned int row = GetRow( items[i] );        if (row < m_textColValues.GetCount())            rows.Add( row );    }    if (rows.GetCount() > 0)    {        // Sort in descending order so that the last        // row will be deleted first. Otherwise the        // remaining indeces would all be wrong.        rows.Sort([](int *v1, int *v2)        {            return *v2-*v1;        });        for (unsigned i = 0; i < rows.GetCount(); i++)        {            m_textColValues.RemoveAt( rows[i] );            m_view.RemoveAt( rows[i] );            m_lock.RemoveAt( rows[i] );        }        // This is just to test if wxDataViewCtrl can        // cope with removing rows not sorted in        // descending order        rows.Sort([](int *v1, int *v2)        {            return *v1-*v2;        });        RowsDeleted( rows );    }}
开发者ID:nobitalwm,项目名称:FCEngine,代码行数:35,


示例21: OnSiteDataInit

// 重新加载现场测道数据void CSensorListCtrl::OnReloadSiteDataCMD(){    // 现场数据对象初始化    OnSiteDataInit();    matrix_data::data_base_helper::device_info_map& map = data_base_helper_->get_devices_info();    matrix_data::data_base_helper::device_info_map::const_iterator itr;    matrix_data::data_base_helper::device_info di;    CBCGPGridRow* pRow = NULL;    data_base_helper_->devices_info_lock();    for(itr = map.begin(); itr != map.end(); ++itr) {        pRow = FindRowByData(itr->second.ip_, FALSE);        // 填充本次数据        if(pRow != NULL) {            SetRowData(pRow, itr->second);	// 设置一行的数据        }        else {            pRow = CreateRow(GetColumnCount());            SetRowData(pRow, itr->second);            AddRow(pRow, FALSE);        }    }    // 删除没有用到的行    for(int i = (GetRowCount() - 1); i >= 0; i--) {        pRow = GetRow(i);        if(pRow != NULL) {	// 找到行            di.ip_ = pRow->GetData();            if(data_base_helper_->find_device(di.ip_, di))	RemoveRow(i, FALSE);        }    }    data_base_helper_->devices_info_unlock();    AdjustLayout ();}
开发者ID:svn2github,项目名称:jy00755131,代码行数:36,


示例22: GetName

void Character::Death(Cell*Room[20][20]){	cout << GetName() << " is dead." <<endl;	m_isDead = true;	Room[GetRow()][GetColumn()]->Reset();	SetPosition(NULL,NULL);}
开发者ID:Grunt-139,项目名称:The-Darkness,代码行数:7,


示例23: GetSquareSAN

std::string GetSquareSAN(const Square square){	std::string result;	result += GetColumn(square) + 'a';	result += (RANK_1 - GetRow(square)) + '1';	return result;}
开发者ID:glinscott,项目名称:Garbochess-3,代码行数:7,


示例24: name

void CLoadBalanceBar::PopulateView(){	int	threads = m_Engine->GetThreadCount();	m_View->CreateRows(threads);	// can take a while if CPU overloaded	m_ThreadPlugin.SetSize(threads);	int	plugs = m_Engine->GetPluginCount();	int	RowIdx = 0;	for (int PlugIdx = 0; PlugIdx < plugs; PlugIdx++) {		CPlugin&	plug = m_Engine->GetPlugin(PlugIdx);		int	PlugThreads = plug.GetThreadCount();		for (int ThrIdx = 0; ThrIdx < PlugThreads; ThrIdx++) {			m_ThreadPlugin[RowIdx] = PlugIdx;			CString	name(plug.GetName());			if (PlugThreads > 1) {				CString	s;				s.Format(_T("[%d]"), ThrIdx);				name += s;			}			CLoadBalanceRow	*rp = GetRow(RowIdx);			rp->SetPluginName(name + ':');			rp->EnableThreadCountEdit(!ThrIdx);			if (!ThrIdx)	// if plugin's first thread				rp->SetThreadCount(PlugThreads);			else				rp->BlankThreadCount();			RowIdx++;		}	}}
开发者ID:victimofleisure,项目名称:FFRend,代码行数:29,



注:本文中的GetRow函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ GetRows函数代码示例
C++ GetRotation函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。