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


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

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


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

示例1: 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

示例2: ReportException

 /** Method to report the exception to a journalist */
 void ReportException(const Journalist& jnlst,
                      EJournalLevel level = J_ERROR) const
 {
   jnlst.Printf(level, J_MAIN,
                "Exception of type: %s in file \"%s\" at line %d:\n Exception message: %s\n",
                type_.c_str(), file_name_.c_str(),  line_number_, msg_.c_str());
 }
开发者ID:jadeliu169,项目名称:non-obtuse-remeshing,代码行数:8,代码来源:IpException.hpp

示例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 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

示例7: print_copyright_message

 void IpoptAlgorithm::print_copyright_message(const Journalist& jnlst)
 {
   jnlst.Printf(J_INSUPPRESSIBLE, J_MAIN,
                "\n******************************************************************************\n"
                "This program contains Ipopt, a library for large-scale nonlinear optimization.\n"
                " Ipopt is released as open source code under the Eclipse Public License (EPL).\n"
                "         For more information visit http://projects.coin-or.org/Ipopt\n"
                "******************************************************************************\n\n");
   copyright_message_printed = true;
 }
开发者ID:MengbinZhu,项目名称:pfldp,代码行数:10,代码来源:IpIpoptAlg.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: Print

 void PiecewisePenalty::Print(const Journalist& jnlst)
 {
   // DBG_START_METH("FilterLineSearch::Filter::Print", dbg_verbosity);
   jnlst.Printf(J_DETAILED, J_LINE_SEARCH,
                "The current piecewise penalty has %d entries.\n",PiecewisePenalty_list_.size());
   jnlst.Printf(J_DETAILED, J_LINE_SEARCH,
                "We only allow %d entries.\n", max_piece_number_);
   jnlst.Printf(J_DETAILED, J_LINE_SEARCH,
                "The min piecewise penalty is %d .\n", min_piece_penalty_);
   if (!jnlst.ProduceOutput(J_DETAILED, J_LINE_SEARCH)) {
     return;
   }
   std::vector<PiecewisePenEntry>::iterator iter;
   Index count = 0;
   for (iter = PiecewisePenalty_list_.begin(); iter != PiecewisePenalty_list_.end();
        iter++) {
     if (count % 10 == 0) {
       jnlst.Printf(J_DETAILED, J_LINE_SEARCH,
                    "                pen_r                    barrier_obj            infeasi\n");
     }
     count++;
     jnlst.Printf(J_DETAILED, J_LINE_SEARCH, "%5d ", count);
     jnlst.Printf(J_DETAILED, J_LINE_SEARCH, "%23.16e %23.16e  %23.16e \n", iter->pen_r,
                  iter->barrier_obj, iter->infeasi);
   }
 }
开发者ID:BRAINSia,项目名称:calatk,代码行数:26,代码来源:IpPiecewisePenalty.cpp

示例10: 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

示例11: Print

 void Filter::Print(const Journalist& jnlst)
 {
   DBG_START_METH("FilterLineSearch::Filter::Print", dbg_verbosity);
   jnlst.Printf(J_DETAILED, J_LINE_SEARCH,
                "The current filter has %d entries.\n", filter_list_.size());
   if (!jnlst.ProduceOutput(J_VECTOR, J_LINE_SEARCH)) {
     return;
   }
   std::list<FilterEntry*>::iterator iter;
   Index count = 0;
   for (iter = filter_list_.begin(); iter != filter_list_.end();
        iter++) {
     if (count % 10 == 0) {
       jnlst.Printf(J_VECTOR, J_LINE_SEARCH,
                    "                phi                    theta            iter\n");
     }
     count++;
     jnlst.Printf(J_VECTOR, J_LINE_SEARCH, "%5d ", count);
     for (Index i=0; i<dim_; i++) {
       jnlst.Printf(J_VECTOR, J_LINE_SEARCH, "%23.16e ", (*iter)->val(i));
     }
     jnlst.Printf(J_VECTOR, J_LINE_SEARCH, "%5d\n",(*iter)->iter());
   }
 }
开发者ID:ChinaQuants,项目名称:Ipopt,代码行数:24,代码来源:IpFilter.cpp

示例12: 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

示例13: 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

示例14: 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

示例15:

  void
  TimingStatistics::PrintAllTimingStatistics(
    Journalist& jnlst,
    EJournalLevel level,
    EJournalCategory category) const
  {
    if (!jnlst.ProduceOutput(level, category))
      return;

    jnlst.Printf(level, category,
                 "OverallAlgorithm....................: %10.3f (sys: %10.3f wall: %10.3f)\n",
                 OverallAlgorithm_.TotalCpuTime(),
                 OverallAlgorithm_.TotalSysTime(),
                 OverallAlgorithm_.TotalWallclockTime());
    jnlst.Printf(level, category,
                 " PrintProblemStatistics.............: %10.3f (sys: %10.3f wall: %10.3f)\n",
                 PrintProblemStatistics_.TotalCpuTime(),
                 PrintProblemStatistics_.TotalSysTime(),
                 PrintProblemStatistics_.TotalWallclockTime());
    jnlst.Printf(level, category,
                 " InitializeIterates.................: %10.3f (sys: %10.3f wall: %10.3f)\n",
                 InitializeIterates_.TotalCpuTime(),
                 InitializeIterates_.TotalSysTime(),
                 InitializeIterates_.TotalWallclockTime());
    jnlst.Printf(level, category,
                 " UpdateHessian......................: %10.3f (sys: %10.3f wall: %10.3f)\n",
                 UpdateHessian_.TotalCpuTime(),
                 UpdateHessian_.TotalSysTime(),
                 UpdateHessian_.TotalWallclockTime());
    jnlst.Printf(level, category,
                 " OutputIteration....................: %10.3f (sys: %10.3f wall: %10.3f)\n",
                 OutputIteration_.TotalCpuTime(),
                 OutputIteration_.TotalSysTime(),
                 OutputIteration_.TotalWallclockTime());
    jnlst.Printf(level, category,
                 " UpdateBarrierParameter.............: %10.3f (sys: %10.3f wall: %10.3f)\n",
                 UpdateBarrierParameter_.TotalCpuTime(),
                 UpdateBarrierParameter_.TotalSysTime(),
                 UpdateBarrierParameter_.TotalWallclockTime());
    jnlst.Printf(level, category,
                 " ComputeSearchDirection.............: %10.3f (sys: %10.3f wall: %10.3f)\n",
                 ComputeSearchDirection_.TotalCpuTime(),
                 ComputeSearchDirection_.TotalSysTime(),
                 ComputeSearchDirection_.TotalWallclockTime());
    jnlst.Printf(level, category,
                 " ComputeAcceptableTrialPoint........: %10.3f (sys: %10.3f wall: %10.3f)\n",
                 ComputeAcceptableTrialPoint_.TotalCpuTime(),
                 ComputeAcceptableTrialPoint_.TotalSysTime(),
                 ComputeAcceptableTrialPoint_.TotalWallclockTime());
    jnlst.Printf(level, category,
                 " AcceptTrialPoint...................: %10.3f (sys: %10.3f wall: %10.3f)\n",
                 AcceptTrialPoint_.TotalCpuTime(),
                 AcceptTrialPoint_.TotalSysTime(),
                 AcceptTrialPoint_.TotalWallclockTime());
    jnlst.Printf(level, category,
                 " CheckConvergence...................: %10.3f (sys: %10.3f wall: %10.3f)\n",
                 CheckConvergence_.TotalCpuTime(),
                 CheckConvergence_.TotalSysTime(),
                 CheckConvergence_.TotalWallclockTime());

    jnlst.Printf(level, category,
                 "PDSystemSolverTotal.................: %10.3f (sys: %10.3f wall: %10.3f)\n",
                 PDSystemSolverTotal_.TotalCpuTime(),
                 PDSystemSolverTotal_.TotalSysTime(),
                 PDSystemSolverTotal_.TotalWallclockTime());
    jnlst.Printf(level, category,
                 " PDSystemSolverSolveOnce............: %10.3f (sys: %10.3f wall: %10.3f)\n",
                 PDSystemSolverSolveOnce_.TotalCpuTime(),
                 PDSystemSolverSolveOnce_.TotalSysTime(),
                 PDSystemSolverSolveOnce_.TotalWallclockTime());
    jnlst.Printf(level, category,
                 " ComputeResiduals...................: %10.3f (sys: %10.3f wall: %10.3f)\n",
                 ComputeResiduals_.TotalCpuTime(),
                 ComputeResiduals_.TotalSysTime(),
                 ComputeResiduals_.TotalWallclockTime());
    jnlst.Printf(level, category,
                 " StdAugSystemSolverMultiSolve.......: %10.3f (sys: %10.3f wall: %10.3f)\n",
                 StdAugSystemSolverMultiSolve_.TotalCpuTime(),
                 StdAugSystemSolverMultiSolve_.TotalSysTime(),
                 StdAugSystemSolverMultiSolve_.TotalWallclockTime());
    jnlst.Printf(level, category,
                 " LinearSystemScaling................: %10.3f (sys: %10.3f wall: %10.3f)\n",
                 LinearSystemScaling_.TotalCpuTime(),
                 LinearSystemScaling_.TotalSysTime(),
                 LinearSystemScaling_.TotalWallclockTime());
    jnlst.Printf(level, category,
                 " LinearSystemSymbolicFactorization..: %10.3f (sys: %10.3f wall: %10.3f)\n",
                 LinearSystemSymbolicFactorization_.TotalCpuTime(),
                 LinearSystemSymbolicFactorization_.TotalSysTime(),
                 LinearSystemSymbolicFactorization_.TotalWallclockTime());
    jnlst.Printf(level, category,
                 " LinearSystemFactorization..........: %10.3f (sys: %10.3f wall: %10.3f)\n",
                 LinearSystemFactorization_.TotalCpuTime(),
                 LinearSystemFactorization_.TotalSysTime(),
                 LinearSystemFactorization_.TotalWallclockTime());
    jnlst.Printf(level, category,
                 " LinearSystemBackSolve..............: %10.3f (sys: %10.3f wall: %10.3f)\n",
                 LinearSystemBackSolve_.TotalCpuTime(),
                 LinearSystemBackSolve_.TotalSysTime(),
                 LinearSystemBackSolve_.TotalWallclockTime());
//.........这里部分代码省略.........
开发者ID:BRAINSia,项目名称:calatk,代码行数:101,代码来源:IpTimingStatistics.cpp


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