コード例 #1
0
bool checkSubStandardDSLQ0( const DSL & D,
                            const typename DSL::Point & A, 
                            const typename DSL::Point & B ) 
{
  typedef typename DSL::Integer Integer;
  typedef typename DSL::ConstIterator ConstIterator;
  typedef ArithmeticalDSSComputer<ConstIterator, Integer, 4> ADSS;

  DSL S = D.reversedSmartDSS( A, B );
  ConstIterator it = D.begin( A );
  ConstIterator it_end = D.end( B );
  ADSS dss;
  dss.init( it );
  while ( ( dss.end() != it_end )
          && ( dss.extendFront() ) ) {}
  bool ok = S.a() == dss.a() 
    &&  S.b() == dss.b() 
    &&  S.mu() == dss.mu(); 
  if ( ! ok )
    {
      trace.info() << "-------------------------------------------------------"
                   << std::endl;
      trace.info() << "D = " << D // << " U1=" << U1 << " U2=" << U2
                   << " " << D.pattern().rE() << endl;
      trace.info() << "S(" << A << "," << B << ") = "
                   << S << " " << S.pattern() << endl;
      trace.info() << "ArithDSS = " << dss << std::endl;
    }
  // if ( ok )
  //   trace.info() << "========================== OK =========================";
  // else
  //   trace.info() << "eeeeeeeeeeeeeeeeeeeeeeeeee KO eeeeeeeeeeeeeeeeeeeeeeeee";
  // std::cerr << std::endl;
  return ok;
}
bool checkSubStandardDSLQ0( const DSL & D,
                            const typename DSL::Point & A, 
                            const typename DSL::Point & B ) 
{
  typedef typename DSL::Fraction Fraction;
  typedef typename DSL::Integer Integer;
  typedef typename DSL::Quotient Quotient;
  typedef typename DSL::Point Point;
  typedef typename DSL::ConstIterator ConstIterator;
  typedef typename DSL::Point2I Point2I;
  typedef typename DSL::Vector2I Vector2I;

  DSL S = D.reversedSmartDSS( A, B );
  std::cout << D.a() << " " << D.b() << " " << D.mu() << " "
            << S.a() << " " << S.b() << " " << S.mu() << " "
            << A[0] << " " << A[1] << " " << B[0] << " " << B[1]
            << std::endl;
  return true;
}