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


C++ Journalist::PrintfIndented方法代码示例

本文整理汇总了C++中Journalist::PrintfIndented方法的典型用法代码示例。如果您正苦于以下问题:C++ Journalist::PrintfIndented方法的具体用法?C++ Journalist::PrintfIndented怎么用?C++ Journalist::PrintfIndented使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Journalist的用法示例。


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

示例1: PrintImpl

 void CompoundSymMatrix::PrintImpl(const Journalist& jnlst,
                                   EJournalLevel level,
                                   EJournalCategory category,
                                   const std::string& name,
                                   Index indent,
                                   const std::string& prefix) const
 {
   jnlst.Printf(level, category, "\n");
   jnlst.PrintfIndented(level, category, indent,
                        "%sCompoundSymMatrix \"%s\" with %d rows and columns components:\n",
                        prefix.c_str(), name.c_str(), NComps_Dim());
   for (Index irow = 0; irow < NComps_Dim(); irow++ ) {
     for (Index jcol = 0; jcol <= irow; jcol++ ) {
       jnlst.PrintfIndented(level, category, indent,
                            "%sComponent for row %d and column %d:\n",
                            prefix.c_str(), irow, jcol);
       if (ConstComp(irow,jcol)) {
         DBG_ASSERT(name.size()<200);
         char buffer[256];
         sprintf(buffer, "%s[%d][%d]", name.c_str(), irow, jcol);
         std::string term_name = buffer;
         ConstComp(irow,jcol)->Print(&jnlst, level, category, term_name,
                                     indent+1, prefix);
       }
       else {
         jnlst.PrintfIndented(level, category, indent,
                              "%sThis component has not been set.\n",
                              prefix.c_str());
       }
     }
   }
 }
开发者ID:Gjacquenot,项目名称:simbody,代码行数:32,代码来源:IpCompoundSymMatrix.cpp

示例2: PrintImpl

 void CompoundVector::PrintImpl(const Journalist& jnlst,
                                EJournalLevel level,
                                EJournalCategory category,
                                const std::string& name,
                                Index indent,
                                const std::string& prefix) const
 {
   DBG_START_METH("CompoundVector::PrintImpl", dbg_verbosity);
   jnlst.Printf(level, category, "\n");
   jnlst.PrintfIndented(level, category, indent,
                        "%sCompoundVector \"%s\" with %d components:\n",
                        prefix.c_str(), name.c_str(), NComps());
   for (Index i=0; i<NComps(); i++) {
     jnlst.Printf(level, category, "\n");
     jnlst.PrintfIndented(level, category, indent,
                          "%sComponent %d:\n", prefix.c_str(), i+1);
     if (ConstComp(i)) {
       DBG_ASSERT(name.size()<200);
       char buffer[256];
       Snprintf(buffer, 255, "%s[%2d]", name.c_str(), i);
       std::string term_name = buffer;
       ConstComp(i)->Print(&jnlst, level, category, term_name,
                           indent+1, prefix);
     }
     else {
       jnlst.PrintfIndented(level, category, indent,
                            "%sComponent %d is not yet set!\n",
                            prefix.c_str(), i+1);
     }
   }
 }
开发者ID:RobotLocomotion,项目名称:ipopt-mirror,代码行数:31,代码来源:IpCompoundVector.cpp

示例3: PrintImpl

  void MultiVectorMatrix::PrintImpl(const Journalist& jnlst,
                                    EJournalLevel level,
                                    EJournalCategory category,
                                    const std::string& name,
                                    Index indent,
                                    const std::string& prefix) const
  {
    jnlst.Printf(level, category, "\n");
    jnlst.PrintfIndented(level, category, indent,
                         "%sMultiVectorMatrix \"%s\" with %d columns:\n",
                         prefix.c_str(), name.c_str(), NCols());

    for (Index i=0; i<NCols(); i++) {
      if (ConstVec(i)) {
        DBG_ASSERT(name.size()<200);
        char buffer[256];
        Snprintf(buffer, 255, "%s[%2d]", name.c_str(), i);
        std::string term_name = buffer;
        ConstVec(i)->Print(&jnlst, level, category, term_name,
                           indent+1, prefix);
      }
      else {
        jnlst.PrintfIndented(level, category, indent,
                             "%sVector in column %d is not yet set!\n",
                             prefix.c_str(), i);
      }
    }
  }
开发者ID:BRAINSia,项目名称:calatk,代码行数:28,代码来源:IpMultiVectorMatrix.cpp

示例4: PrintImpl

  void DenseSymMatrix::PrintImpl(const Journalist& jnlst,
                                 EJournalLevel level,
                                 EJournalCategory category,
                                 const std::string& name,
                                 Index indent,
                                 const std::string& prefix) const
  {
    jnlst.Printf(level, category, "\n");
    jnlst.PrintfIndented(level, category, indent,
                         "%sDenseSymMatrix \"%s\" of dimension %d (only lower triangular part printed):\n",
                         prefix.c_str(), name.c_str(), Dim());

    if (initialized_) {
      for (Index j=0; j<NCols(); j++) {
        for (Index i=j; i<NRows(); i++) {
          jnlst.PrintfIndented(level, category, indent,
                               "%s%s[%5d,%5d]=%23.16e\n",
                               prefix.c_str(), name.c_str(), i, j, values_[i+NRows()*j]);
        }
      }
    }
    else {
      jnlst.PrintfIndented(level, category, indent,
                           "The matrix has not yet been initialized!\n");
    }
  }
开发者ID:RobotLocomotion,项目名称:ipopt-mirror,代码行数:26,代码来源:IpDenseSymMatrix.cpp

示例5: PrintImpl

  void DenseGenMatrix::PrintImpl(const Journalist& jnlst,
                                 EJournalLevel level,
                                 EJournalCategory category,
                                 const std::string& name,
                                 Index indent,
                                 const std::string& prefix) const
  {
    jnlst.Printf(level, category, "\n");
    jnlst.PrintfIndented(level, category, indent,
                         "%sDenseGenMatrix \"%s\" with %d rows and %d columns:\n",
                         prefix.c_str(), name.c_str(), NRows(), NCols());

    if (initialized_) {
      for (Index j=0; j<NCols(); j++) {
        for (Index i=0; i<NRows(); i++) {
          jnlst.PrintfIndented(level, category, indent,
                               "%s%s[%5d,%5d]=%23.16e\n",
                               prefix.c_str(), name.c_str(), i, j, values_[i+NRows()*j]);
        }
      }
    }
    else {
      jnlst.PrintfIndented(level, category, indent,
                           "The matrix has not yet been initialized!\n");
    }
  }
开发者ID:alanfalloon,项目名称:ipopt-3.3.5,代码行数:26,代码来源:IpDenseGenMatrix.cpp

示例6: PrintImpl

 void DiagMatrix::PrintImpl(const Journalist& jnlst,
                            EJournalLevel level,
                            EJournalCategory category,
                            const std::string& name,
                            Index indent,
                            const std::string& prefix) const
 {
   jnlst.Printf(level, category, "\n");
   jnlst.PrintfIndented(level, category, indent,
                        "%sDiagMatrix \"%s\" with %d rows and columns, and with diagonal elements:\n",
                        prefix.c_str(), name.c_str(), Dim());
   if (IsValid(diag_)) {
     diag_->Print(&jnlst, level, category, name, indent+1, prefix);
   }
   else {
     jnlst.PrintfIndented(level, category, indent,
                          "%sDiagonal elements not set!\n", prefix.c_str());
   }
 }
开发者ID:BRAINSia,项目名称:calatk,代码行数:19,代码来源:IpDiagMatrix.cpp

示例7: PrintImpl

 void SumSymMatrix::PrintImpl(const Journalist& jnlst,
                              EJournalLevel level,
                              EJournalCategory category,
                              const std::string& name,
                              Index indent,
                              const std::string& prefix) const
 {
   jnlst.Printf(level, category, "\n");
   jnlst.PrintfIndented(level, category, indent,
                        "%sSumSymMatrix \"%s\" of dimension %d with %d terms:\n",
                        prefix.c_str(), name.c_str(), Dim(), NTerms());
   for (Index iterm=0; iterm<NTerms(); iterm++) {
     jnlst.PrintfIndented(level, category, indent,
                          "%sTerm %d with factor %23.16e and the following matrix:\n",
                          prefix.c_str(), iterm, factors_[iterm]);
     char buffer[256];
     sprintf(buffer, "Term: %d", iterm);
     std::string name = buffer;
     matrices_[iterm]->Print(&jnlst, level, category, name, indent+1, prefix);
   }
 }
开发者ID:Gjacquenot,项目名称:simbody,代码行数:21,代码来源:IpSumSymMatrix.cpp

示例8: PrintImpl

 void ZeroMatrix::PrintImpl(const Journalist& jnlst,
                            EJournalLevel level,
                            EJournalCategory category,
                            const std::string& name,
                            Index indent,
                            const std::string& prefix) const
 {
   jnlst.Printf(level, category, "\n");
   jnlst.PrintfIndented(level, category, indent,
                        "%sZeroMatrix \"%s\" with %d row and %d column components:\n",
                        prefix.c_str(), name.c_str(), NRows(), NCols());
 }
开发者ID:BRAINSia,项目名称:calatk,代码行数:12,代码来源:IpZeroMatrix.cpp

示例9: PrintImpl

 void SymScaledMatrix::PrintImpl(const Journalist& jnlst,
                                 EJournalLevel level,
                                 EJournalCategory category,
                                 const std::string& name,
                                 Index indent,
                                 const std::string& prefix) const
 {
   jnlst.Printf(level, category, "\n");
   jnlst.PrintfIndented(level, category, indent,
                        "%sSymScaledMatrix \"%s\" of dimension %d x %d:\n",
                        prefix.c_str(), name.c_str(), NRows(), NCols());
   owner_space_->RowColScaling()->Print(&jnlst, level, category,
                                        name+"_row_col_scaling",
                                        indent+1, prefix);
   if (IsValid(matrix_)) {
     matrix_->Print(&jnlst, level, category, name+"_unscaled_matrix",
                    indent+1, prefix);
   }
   else {
     jnlst.PrintfIndented(level, category, indent,
                          "%sunscaled matrix is NULL\n", prefix.c_str());
   }
 }
开发者ID:alanfalloon,项目名称:ipopt-3.3.5,代码行数:23,代码来源:IpSymScaledMatrix.cpp

示例10: PrintImpl

  void IndexPCalculator::PrintImpl(const Journalist& jnlst,
				   EJournalLevel level,
				   EJournalCategory category,
				   const std::string& name,
				   Index indent,
				   const std::string& prefix) const
  {
    DBG_START_METH("IndexPCalculator::PrintImpl", dbg_verbosity);

    const Number* col_val;
    jnlst.PrintfIndented(level, category, indent,
                         "%sIndexPCalculator \"%s\" with %d rows and %d columns:\n",
                         prefix.c_str(), name.c_str(), nrows_, ncols_ );
    Index col_counter = 0;
    for (std::map< Index, SmartPtr<PColumn> >::const_iterator j=cols_.begin(); j!=cols_.end(); ++j) {
      col_val = j->second->Values();
      for (Index i=0; i<nrows_; ++i) {
	jnlst.PrintfIndented(level, category, indent,
			     "%s%s[%5d,%5d]=%23.16e\n",
			     prefix.c_str(), name.c_str(), i, col_counter, col_val[i]);
      }
      col_counter++;
    }
  }
开发者ID:liangboyun,项目名称:ipopt_wps,代码行数:24,代码来源:SensIndexPCalculator.cpp

示例11: PrintImpl

 void TransposeMatrix::PrintImpl(const Journalist& jnlst,
                                 EJournalLevel level,
                                 EJournalCategory category,
                                 const std::string& name,
                                 Index indent,
                                 const std::string& prefix) const
 {
   jnlst.Printf(level, category, "\n");
   jnlst.PrintfIndented(level, category, indent,
                        "%sTransposeMatrix \"%s\" of the following matrix\n",
                        prefix.c_str(), name.c_str());
   std::string new_name = name+"^T";
   orig_matrix_->Print(&jnlst, level, category, new_name,
                       indent+1, prefix);
 }
开发者ID:ChinaQuants,项目名称:Ipopt,代码行数:15,代码来源:IpTransposeMatrix.cpp


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