Ejemplo n.º 1
0
void use_class() {
  Class c;
  c.thiscall_method_small();
  c.thiscall_method_small_with_ctor();

  c.cdecl_method_small();
  c.cdecl_method_big();

  c.thiscall_method_arg(Empty());
  c.thiscall_method_arg(EmptyWithCtor());
  c.thiscall_method_arg(Small());
  c.thiscall_method_arg(SmallWithCtor());
  c.thiscall_method_arg(Big());
}
Ejemplo n.º 2
0
main()      //draws some circles with text
{
   int graphdriver = DETECT, graphmode;
   initgraph(&graphdriver, &graphmode, "..\\bgi");
   MCircle Small(250, 100, 25, SANS_SERIF_FONT, "You");
   Small.Show();
   MCircle Medium(250, 150, 100, TRIPLEX_FONT, "World");
   Medium.Show();
   MCircle Large(250, 250, 225, GOTHIC_FONT, "Universe");
   Large.Show();
   getch();
   closegraph();
   return 0;
}
Ejemplo n.º 3
0
typename OdeNum<MatrixType>::VectorType OdeNum<MatrixType>::enclosureGuaranteeingBounds(
      const VectorType &x,
      int *found
    )
{
  ScalarType trial_step = ScalarType(-0.2,1.2)*step;
  int dim = x.dimension();
  VectorType y(dim), z(dim), Small(dim);

  ScalarType h = ScalarType(0,1)*step;
  Real multf=1.5;
  *found=0;
  int counter=0,limit=10;

  for(int i=0;i<dim;i++)
    Small[i] = ScalarType(-1,1) * 1e-15;

  z = x + trial_step*ode.f(x);
  z += Small; // to be sure that z has noempty interior

  while((!(*found)) && (counter<limit))
  {
    counter++;
    y = x + h*ode.f(z);
    *found=1;
    for(int i=0;i<dim;i++)
    {
      if(!(y[i].subsetInterior(z[i])))
      {
        *found = 0;
        z[i] = y[i];
        ScalarType s;
        z[i].split(s);
        s = multf*s;
        z[i] += s;
      }
    }
  }

  if(!(*found))
  {
    //status="enclosureGuaranteeingBounds - loop limit exceeded";
    diagBadEnlcosure(x);
  }

  return y;
}
Ejemplo n.º 4
0
// Returning structs that fit into a register.
Small small_return() { return Small(); }
Ejemplo n.º 5
0
 Small __cdecl cdecl_method_small() { return Small(); }
Ejemplo n.º 6
0
 Small thiscall_method_small() { return Small(); }