当前位置: 首页>>代码示例>>C++>>正文


C++ T_函数代码示例

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


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

示例1: pProgressDialog

void
PropPageGeneral::OnRefreshFndb ()
{
  try
    {
      auto_ptr<ProgressDialog> pProgressDialog (ProgressDialog::Create());
      pProgressDialog->StartProgressDialog (GetParent()->GetSafeHwnd());
      pProgressDialog->SetTitle (T_("MiKTeX Maintenance"));
      pProgressDialog->SetLine (1, T_("Collecting file information..."));
      this->pProgressDialog = pProgressDialog.get();
      Fndb::Refresh (this);
      if (! pProgressDialog->HasUserCancelled())
	{
	  pProgressDialog->SetLine
	    (1,
	     T_("Scanning package definitions"));
	  pProgressDialog->SetLine
	    (2,
	     T_("create the MPM file name database..."));
	  pManager->CreateMpmFndb ();
	}
      pProgressDialog->StopProgressDialog ();
      pProgressDialog.reset ();
    }
  catch (const MiKTeXException & e)
    {
      ErrorDialog::DoModal (this, e);
    }
  catch (const exception & e)
    {
      ErrorDialog::DoModal (this, e);
    }
  this->pProgressDialog = 0;
}
开发者ID:bngabonziza,项目名称:miktex,代码行数:34,代码来源:PropPageGeneral.cpp

示例2: CV_Assert

void ProjectorBase::setCameraParams(const Mat &K, const Mat &R, const Mat &T)
{
    CV_Assert(K.size() == Size(3, 3) && K.type() == CV_32F);
    CV_Assert(R.size() == Size(3, 3) && R.type() == CV_32F);
    CV_Assert((T.size() == Size(1, 3) || T.size() == Size(3, 1)) && T.type() == CV_32F);

    Mat_<float> K_(K);
    k[0] = K_(0,0); k[1] = K_(0,1); k[2] = K_(0,2);
    k[3] = K_(1,0); k[4] = K_(1,1); k[5] = K_(1,2);
    k[6] = K_(2,0); k[7] = K_(2,1); k[8] = K_(2,2);

    Mat_<float> Rinv = R.t();
    rinv[0] = Rinv(0,0); rinv[1] = Rinv(0,1); rinv[2] = Rinv(0,2);
    rinv[3] = Rinv(1,0); rinv[4] = Rinv(1,1); rinv[5] = Rinv(1,2);
    rinv[6] = Rinv(2,0); rinv[7] = Rinv(2,1); rinv[8] = Rinv(2,2);

    Mat_<float> R_Kinv = R * K.inv();
    r_kinv[0] = R_Kinv(0,0); r_kinv[1] = R_Kinv(0,1); r_kinv[2] = R_Kinv(0,2);
    r_kinv[3] = R_Kinv(1,0); r_kinv[4] = R_Kinv(1,1); r_kinv[5] = R_Kinv(1,2);
    r_kinv[6] = R_Kinv(2,0); r_kinv[7] = R_Kinv(2,1); r_kinv[8] = R_Kinv(2,2);

    Mat_<float> K_Rinv = K * Rinv;
    k_rinv[0] = K_Rinv(0,0); k_rinv[1] = K_Rinv(0,1); k_rinv[2] = K_Rinv(0,2);
    k_rinv[3] = K_Rinv(1,0); k_rinv[4] = K_Rinv(1,1); k_rinv[5] = K_Rinv(1,2);
    k_rinv[6] = K_Rinv(2,0); k_rinv[7] = K_Rinv(2,1); k_rinv[8] = K_Rinv(2,2);

    Mat_<float> T_(T.reshape(0, 3));
    t[0] = T_(0,0); t[1] = T_(1,0); t[2] = T_(2,0);
}
开发者ID:bowenqiang,项目名称:Research,代码行数:29,代码来源:warpers.cpp

示例3: stream

void
VFont::Read ()
{
  if (! characterTable.empty() || dviInfo.notLoadable)
    {
      return;
    }

  dviInfo.notLoadable = true;

  InputStream stream (dviInfo.fileName.c_str());

  trace_vfont->WriteFormattedLine
    ("libdvi",
     T_("reading vf file %s"),
     Q_(dviInfo.fileName));

  if (stream.ReadByte() != pre)
    {
      FATAL_DVI_ERROR ("VFont::Read",
		       T_("Not a VF file."),
		       dviInfo.fileName.c_str());
    }

  ReadPreamble (stream);
  ReadFontDefsAndCharPackets (stream);
  ReadPostamble (stream);
  
  dviInfo.notLoadable = false;
}
开发者ID:bngabonziza,项目名称:miktex,代码行数:30,代码来源:VFont.cpp

示例4: FATAL_MIKTEX_ERROR

BOOL
MainFrame::PreCreateWindow (/*[in,out]*/ CREATESTRUCT & cs)
{
  try
    {
      if (! CFrameWnd::PreCreateWindow(cs))
	{
	  FATAL_MIKTEX_ERROR ("MainFrame::PreCreateWindow",
			      T_("The main window could not be initialized."),
			      0);
	}
      cs.style &= ~FWS_ADDTOTITLE;
      if (SessionWrapper(true)->IsAdminMode())
      {
	SetTitle (T_(_T("MiKTeX Package Manager (Admin)")));
      }
      else
      {
	SetTitle (T_(_T("MiKTeX Package Manager")));
      }
      return (TRUE);
    }
  catch (const MiKTeXException & e)
    {
      ErrorDialog::DoModal (this, e);
      return (FALSE);
    }
  catch (const exception & e)
    {
      ErrorDialog::DoModal (this, e);
      return (FALSE);
    }
}
开发者ID:bngabonziza,项目名称:miktex,代码行数:33,代码来源:MainFrame.cpp

示例5: T_

DviSpecialType
HyperTeXSpecialImpl::Parse ()
{
  name = state.nameOrHref;
  llx = state.llx;
  lly = state.lly;
  urx = state.urx;
  ury = state.ury;
  isName = state.isName;
  if (state.isName)
    {
      trace_hypertex->WriteFormattedLine
	("libdvi",
	 T_("new hypertex target \"%s\" (%d, %d, %d, %d)"),
	 name.c_str(),
	 state.llx,
	 state.lly,
	 state.urx,
	 state.ury);
    }
  else
    {
      trace_hypertex->WriteFormattedLine
	("libdvi",
	 T_("new hypertex reference \"%s\" (%d, %d, %d, %d)"),
	 name.c_str(), state.llx, state.lly, state.urx, state.ury);
    }
  return (DviSpecialType::Hypertex);
}
开发者ID:bngabonziza,项目名称:miktex,代码行数:29,代码来源:hypertex.cpp

示例6: CV_Assert

void ProjectorBase::setCameraParams(InputArray _K, InputArray _R, InputArray _T)
{
    Mat K = _K.getMat(), R = _R.getMat(), T = _T.getMat();

    CV_Assert(K.size() == Size(3, 3) && K.type() == CV_32F);
    CV_Assert(R.size() == Size(3, 3) && R.type() == CV_32F);
    CV_Assert((T.size() == Size(1, 3) || T.size() == Size(3, 1)) && T.type() == CV_32F);

    Mat_<float> K_(K);
    k[0] = K_(0,0); k[1] = K_(0,1); k[2] = K_(0,2);
    k[3] = K_(1,0); k[4] = K_(1,1); k[5] = K_(1,2);
    k[6] = K_(2,0); k[7] = K_(2,1); k[8] = K_(2,2);

    Mat_<float> Rinv = R.t();
    rinv[0] = Rinv(0,0); rinv[1] = Rinv(0,1); rinv[2] = Rinv(0,2);
    rinv[3] = Rinv(1,0); rinv[4] = Rinv(1,1); rinv[5] = Rinv(1,2);
    rinv[6] = Rinv(2,0); rinv[7] = Rinv(2,1); rinv[8] = Rinv(2,2);

    Mat_<float> R_Kinv = R * K.inv();
    r_kinv[0] = R_Kinv(0,0); r_kinv[1] = R_Kinv(0,1); r_kinv[2] = R_Kinv(0,2);
    r_kinv[3] = R_Kinv(1,0); r_kinv[4] = R_Kinv(1,1); r_kinv[5] = R_Kinv(1,2);
    r_kinv[6] = R_Kinv(2,0); r_kinv[7] = R_Kinv(2,1); r_kinv[8] = R_Kinv(2,2);

    Mat_<float> K_Rinv = K * Rinv;
    k_rinv[0] = K_Rinv(0,0); k_rinv[1] = K_Rinv(0,1); k_rinv[2] = K_Rinv(0,2);
    k_rinv[3] = K_Rinv(1,0); k_rinv[4] = K_Rinv(1,1); k_rinv[5] = K_Rinv(1,2);
    k_rinv[6] = K_Rinv(2,0); k_rinv[7] = K_Rinv(2,1); k_rinv[8] = K_Rinv(2,2);

    Mat_<float> T_(T.reshape(0, 3));
    t[0] = T_(0,0); t[1] = T_(1,0); t[2] = T_(2,0);
}
开发者ID:AdLantis,项目名称:opencv,代码行数:31,代码来源:warpers.cpp

示例7: B_

void eqnsys<nr_type_t>::substitute_qr_householder_ls (void) {
  int c, r;
  nr_type_t f;

  // forward substitution in order to solve R'X = B
  for (r = 0; r < N; r++) {
    for (f = B_(r), c = 0; c < r; c++) f -= A_(c, r) * B_(c);
    if (abs (A_(r, r)) > std::numeric_limits<nr_double_t>::epsilon())
      B_(r) = f / A_(r, r);
    else
      B_(r) = 0;
  }

  // compute the least square solution QX
  for (c = N - 1; c >= 0; c--) {
    if (T_(c) != 0) {
      // scalar product u' * B
      for (f = B_(c), r = c + 1; r < N; r++) f += cond_conj (A_(r, c)) * B_(r);
      // z - T * f * u_k
      f *= T_(c); B_(c) -= f;
      for (r = c + 1; r < N; r++) B_(r) -= f * A_(r, c);
    }
  }

  // permute solution vector
  for (r = 0; r < N; r++) X_(cMap[r]) = B_(r);
}
开发者ID:FoxMarts,项目名称:qucs,代码行数:27,代码来源:eqnsys.cpp

示例8: T_

bool
File::Exists (/*[in]*/ const PathName & path)
{
  struct stat statbuf;
  if (stat(path.Get(), &statbuf) == 0)
    {
      if (S_ISDIR(statbuf.st_mode) != 0)
	{
	  SessionImpl::theSession->trace_access->WriteFormattedLine
	    ("core",
	     T_("%s is a directory"),
	     Q_(path));
	  return (false);
	}
      SessionImpl::theSession->trace_access->WriteFormattedLine
	("core",
	 T_("accessing file %s: OK"),
	 Q_(path));
      return (true);
    }
  int error = errno;
  if (error != ENOENT)
    {
      FATAL_CRT_ERROR ("stat", path.Get());
    }
  SessionImpl::theSession->trace_access->WriteFormattedLine
    ("core",
     T_("accessing file %s: NOK"),
     Q_(path));
  return (false);
}
开发者ID:bngabonziza,项目名称:miktex,代码行数:31,代码来源:unxFile.cpp

示例9: FATAL_MIKTEX_ERROR

void
PropPageFormats::MakeAlias (/*[in]*/ const FormatInfo & formatInfo)
{
  if (SessionWrapper(true)->IsMiKTeXDirect())
    {
      FATAL_MIKTEX_ERROR ("PropPageFormats::MakeAlias",
			  T_("Operation not supported."),
			  formatInfo.compiler.c_str());
    }
  PathName compilerPath;
  if (! SessionWrapper(true)->FindFile(formatInfo.compiler.c_str(),
				       FileType::EXE,
				       compilerPath))
    {
      FATAL_MIKTEX_ERROR ("PropPageFormats::MakeAlias",
			  T_("The compiler could not be found."),
			  formatInfo.compiler.c_str());
    }
  PathName pathBinDir =
    SessionWrapper(true)->GetSpecialPath(SpecialPath::BinDirectory);
  PathName pathAlias (pathBinDir, formatInfo.name, ".exe");
  if (compilerPath != pathAlias && ! File::Exists(pathAlias))
    {
      Directory::Create (pathBinDir);
      File::Copy (compilerPath, pathAlias);
      if (! Fndb::FileExists(pathAlias))
	{
	  Fndb::Add (pathAlias);
	}
    }
}
开发者ID:bngabonziza,项目名称:miktex,代码行数:31,代码来源:PropPageFormats.cpp

示例10: UNEXPECTED_CONDITION

bool
SessionImpl::MakePkFileName (/*[out]*/ PathName &	pkFileName,
			     /*[in]*/ const char *	lpszFontName,
			     /*[in]*/ int		dpi)
{
  string nameTemplate;

  if (! GetSessionValue(MIKTEX_REGKEY_CORE,
			MIKTEX_REGVAL_PK_FN_TEMPLATE,
			nameTemplate,
			DEFAULT_PK_NAME_TEMPLATE))
    {
      UNEXPECTED_CONDITION ("SessionImpl::MakePkFileName ");
    }

  string str;

  str.reserve (BufferSizes::MaxPath);

  for (const char * p = nameTemplate.c_str(); *p != 0; ++ p)
    {
      if (p[0] == '%')
	{
	  ++ p;
	  if (*p == 0)
	    {
	      FATAL_MIKTEX_ERROR ("SessionImpl::MakePkFileName",
				  T_("Invalid file name template."),
				  nameTemplate.c_str());
	    }
	  switch (*p)
	    {
	    case '%':
	      str += '%';
	      break;
	    case 'd':
	      str += NUMTOSTR(dpi);
	      break;
	    case 'f':
	      str += lpszFontName;
	      break;
	    default:
	      FATAL_MIKTEX_ERROR ("SessionImpl::MakePkFileName",
				  T_("Invalid file name template."),
				  nameTemplate.c_str());
	    }
	}
      else
	{
	  str += *p;
	}
    }

  pkFileName = str.c_str();

  return (true);
}
开发者ID:bngabonziza,项目名称:miktex,代码行数:57,代码来源:findfile.cpp

示例11: if

DviSpecialType
TpicPolySpecialImpl::Parse ()
{
  m_outline = OutlineStyle::Solid;
  m_length = 0;
  m_bSpline = false;
  if (strncmp(GetXXX(), "ip", 2) == 0)
    {
      m_outline = OutlineStyle::None;
    }
  else if (strncmp(GetXXX(), "da", 2) == 0)
    {
      if (sscanf_s(GetXXX(), "da %f", &m_length) != 1)
	{
	  trace_error->WriteLine
	    ("libdvi",
	     T_("bad da special"));
	}
      else
	{
	  m_outline = OutlineStyle::Dashes;
	}
    }
  else if (strncmp(GetXXX(), "dt", 2) == 0)
    {
      if (sscanf_s(GetXXX(), "dt %f", &m_length) != 1)
	{
	  trace_error->WriteLine
	    ("libdvi",
	     T_("bad dt special"));
	}
      else
	{
	  m_outline = OutlineStyle::Dots;
	}
    }
  else if (strncmp(GetXXX(), "sp", 2) == 0)
    {
      m_bSpline = true;
      if (sscanf_s(GetXXX(), "sp %f", &m_length) == 1)
	{
	  if (m_length > 0)
	    {
	      m_outline = OutlineStyle::Dashes;
	    }
	  else if (m_length < 0)
	    {
	      m_length *= -1;
	      m_outline = OutlineStyle::Dots;
	    }
	}
    }

  return (DviSpecialType::Tpic);
}
开发者ID:bngabonziza,项目名称:miktex,代码行数:55,代码来源:tpic.cpp

示例12: FATAL_MIKTEX_ERROR

void
PostScript::SendHeader (/*[in]*/ const char * lpszHeaderName)
{
  PathName fileName;
  if (! SessionWrapper(true)->FindFile(lpszHeaderName, FileType::PSHEADER, fileName))
  {
    FATAL_MIKTEX_ERROR (T_("PostScript::SendHeader"),
      T_("Cannot find PostScript header file."), lpszHeaderName);
  }
  tracePS->WriteFormattedLine ("libdvi", T_("Sending %s..."), Q_(fileName));
  ExecuteBatch (fileName.Get());
}
开发者ID:bngabonziza,项目名称:miktex,代码行数:12,代码来源:PostScript.cpp

示例13: pCfg

BOOL
InverseSearchOptionsPage::OnApply ()
{
  try
    {
      PathName pathEditorsIni
	(SessionWrapper(true)->GetSpecialPath(SpecialPath::ConfigRoot),
	 MIKTEX_PATH_EDITORS_INI);
      if (mustWrite)
	{
	  SmartPointer<Cfg> pCfg (Cfg::Create());
	  for (int idx = firstCustomIdx;
	       idx < static_cast<int>(editors.size());
	       ++ idx)
	    {
	      pCfg->PutValue (editors[idx].name.c_str(),
			      T_("program"),
			      editors[idx].program.c_str());
	      pCfg->PutValue (editors[idx].name.c_str(),
			      T_("arguments"),
			      editors[idx].arguments.c_str());
	    }
	  Directory::Create (PathName(pathEditorsIni).RemoveFileSpec());
	  pCfg->Write (pathEditorsIni);
	  mustWrite = false;
	  pCfg.Release ();
	  if (! Fndb::FileExists(pathEditorsIni))
	    {
	      Fndb::Add (pathEditorsIni);
	    }
	}
      if (commandLineIdx >= 0)
	{
	  g_pYapConfig->inverseSearchCommandLine =
	    editors[commandLineIdx].GetCommandLine().c_str();
	}
      else
	{
	  g_pYapConfig->inverseSearchCommandLine = "";
	}
      return (CPropertyPage::OnApply());
    }
  catch (const MiKTeXException & e)
    {
      ErrorDialog::DoModal (this, e);
      return (FALSE);
    }
  catch (const exception & e)
    {
      ErrorDialog::DoModal (this, e);
      return (FALSE);
    }
}
开发者ID:bngabonziza,项目名称:miktex,代码行数:53,代码来源:InverseSearchOptionsPage.cpp

示例14: InsertColumn

BOOL
SiteWizRemote::OnInitDialog ()
{
  BOOL ret = CPropertyPage::OnInitDialog();

  try
    {
      listControl.SetExtendedStyle (listControl.GetExtendedStyle()
				    | LVS_EX_FULLROWSELECT);
      
      int colIdx = 0;
      
      InsertColumn (colIdx,
		    T_("Country"),
		    "xxxx Australia");
      
      ++ colIdx;
      
      InsertColumn (colIdx,
		    T_("Protocol"),
		    "xxxx HTTP");

      ++ colIdx;

      InsertColumn (colIdx,
		    T_("Host"),
		    "xxxx scratchy.emate.ucr.ac.cr");
      
      ++ colIdx;
      
      InsertColumn (colIdx,
		    T_("Version"),
		    "xxxx 30-Aug-04");
      
      ++ colIdx;
      
      InsertColumn (colIdx,
		    T_("Description"),
		    "xxxx Primary Package Repository");
      
      ++ colIdx;
    }
  catch (const MiKTeXException & e)
    {
      ErrorDialog::DoModal (this, e);
    }
  catch (const exception & e)
    {
      ErrorDialog::DoModal (this, e);
    }

  return (ret);
}
开发者ID:bngabonziza,项目名称:miktex,代码行数:53,代码来源:SiteWizRemote.cpp

示例15: T_

void eqnsys<nr_type_t>::factorize_svd (void) {
  int i, j, l;
  nr_type_t t;

  // allocate space for vectors and matrices
  delete R; R = new tvector<nr_type_t> (N);
  delete T; T = new tvector<nr_type_t> (N);
  delete V; V = new tmatrix<nr_type_t> (N);
  delete S; S = new tvector<nr_double_t> (N);
  delete E; E = new tvector<nr_double_t> (N);

  // bidiagonalization through householder transformations
  for (i = 0; i < N; i++) {
    T_(i) = householder_left (i);
    if (i < N - 1) R_(i) = householder_right (i);
  }

  // copy over the real valued bidiagonal values
  for (i = 0; i < N; i++) S_(i) = real (A_(i, i));
  for (E_(0) = 0, i = 1; i < N; i++) E_(i) = real (A_(i - 1, i));

  // backward accumulation of right-hand householder transformations
  // yields the V' matrix
  for (l = N, i = N - 1; i >= 0; l = i--) {
    if (i < N - 1) {
      if ((t = R_(i)) != 0.0) {
	householder_apply_right_extern (i, cond_conj (t));
      }
      else for (j = l; j < N; j++) // cleanup this row
	V_(i, j) = V_(j, i) = 0.0;
    }
    V_(i, i) = 1.0;
  }

  // backward accumulation of left-hand householder transformations
  // yields the U matrix in place of the A matrix
  for (l = N, i = N - 1; i >= 0; l = i--) {
    for (j = l; j < N; j++) // cleanup upper row
      A_(i, j) = 0.0;
    if ((t = T_(i)) != 0.0) {
      householder_apply_left (i, cond_conj (t));
      for (j = l; j < N; j++) A_(j, i) *= -t;
    }
    else for (j = l; j < N; j++) // cleanup this column
      A_(j, i) = 0.0;
    A_(i, i) = 1.0 - t;
  }

  // S and E contain diagonal and super-diagonal, A contains U, V'
  // calculated; now diagonalization can begin
  diagonalize_svd ();
}
开发者ID:FoxMarts,项目名称:qucs,代码行数:52,代码来源:eqnsys.cpp


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