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


C++ IVector::begin方法代码示例

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


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

示例1: verifyExistenceOfPeriodicOrbit

void verifyExistenceOfPeriodicOrbit(IPoincareMap& pm, IVector X, int period)
{
  IVector center = midVector(X);
  interval returnTime;

  // Center is 2-dimensional. Embed it into Poincare section, i.e. add first coordinate x=0.
  // Define a tripleton representation of the center of X.
  C0HOTripletonSet s1({interval(0.),center[0],center[1]});

  // Compute iteration of Poincare map at the center (3-dim object is returned).
  IVector y = pm(s1,returnTime,period);

  // Project it onto 2-dim Poincare section, first coordinate is ignored.
  IVector imCenter(2,y.begin()+1);


  // Derivative of PM on the set X.
  // Define doubleton representation of the first order variational equations.
  C1HORect2Set s2({interval(0.),X[0],X[1]});

  // The matrix monodromyMatrix will store derivatives of the FLOW not Poincare map.
  IMatrix monodromyMatrix(3,3);
  y = pm(s2,monodromyMatrix,returnTime,period);

  // This member function recomputes derivatives of the flow into derivatives of Poincare map
  IMatrix DP = pm.computeDP(y,monodromyMatrix);

  // We extract a 2x2 slice from 3x3 DP matrix and subtract identity.
  IMatrix DP_Minus_Id(2,2);
  DP_Minus_Id[0][0] = DP[1][1] - 1.;
  DP_Minus_Id[0][1] = DP[1][2];
  DP_Minus_Id[1][0] = DP[2][1];
  DP_Minus_Id[1][1] = DP[2][2] - 1.;

  // Compute interval Newton operator.
  IVector N = center - capd::matrixAlgorithms::gauss(DP_Minus_Id,imCenter-center);

  // Verification if N is a subset of X
  cout << "\n---------------------------------------------------\n\nN = " << N << endl;
  cout << "X = " << X << endl;
  cout << "Return time: " << returnTime << endl;
  if(subsetInterior(N,X))
    cout << "the existence of period " << period << " orbit verified\n";
  else
  {
    cout << "N is not a subset of X\n\n";
    cout << "diam(N)=" << diam(N) << endl;
    cout << "diam(X)=" << diam(X) << endl;
    cout << "N-X" << N-X << endl;
  }
}
开发者ID:dreal-deps,项目名称:capdDynSys-4.0,代码行数:51,代码来源:RosslerPeriodicOrbit.cpp

示例2: prepare_it

    static auto prepare_it(IIterator ifirst, IIterator ilast, EIterator efirst, EIterator elast, IVector& ivec, EVector& evec) {
        std::copy(ifirst, ilast, std::back_inserter(ivec));

        auto input_first = ivec.begin();
        auto input_last  = ivec.end();

        if (Denoising) {
            std::copy(efirst, elast, std::back_inserter(evec));

            auto expected_first = evec.begin();
            auto expected_last = evec.end();
            return std::make_tuple(input_first, input_last, expected_first, expected_last);
        } else {
            return std::make_tuple(input_first, input_last, input_first, input_last);
        }
    }
开发者ID:wendelas,项目名称:dll,代码行数:16,代码来源:rbm_trainer.hpp


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