mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
3.6 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/kasc/xarchon/gcc34.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. #
  18. # --- ROCK-COPYRIGHT-NOTE-END ---
  19. --- ./src/Problem.hpp.orig 2005-03-04 10:28:03.429496128 +0100
  20. +++ ./src/Problem.hpp 2005-03-04 10:31:32.006787560 +0100
  21. @@ -306,14 +306,14 @@
  22. virtual G Goal_Value(T *a)
  23. {
  24. if (depth==0)
  25. - return tester->Goal_Value(a);
  26. + return this->tester->Goal_Value(a);
  27. - Goal_Test<G,T> *endtester=tester;
  28. - tester=new Minimax_Goal_Test(depth-1,generator,other_acc,goal_acc,tester);
  29. + Goal_Test<G,T> *endtester=this->tester;
  30. + this->tester=new Minimax_Goal_Test(depth-1,this->generator,other_acc,this->goal_acc,this->tester);
  31. G ret_val=Successor_Goal_Test<G,T>::Goal_Value(a);
  32. - delete tester;
  33. - tester=endtester;
  34. - delete next;
  35. + delete this->tester;
  36. + this->tester=endtester;
  37. + delete this->next;
  38. return ret_val;
  39. }
  40. @@ -340,19 +340,19 @@
  41. virtual G Goal_Value(T *a)
  42. {
  43. - Goal_Accumulator <G,T> *old=goal_acc;
  44. + Goal_Accumulator <G,T> *old=this->goal_acc;
  45. Multi_Goal_Accumulator <G,T,greater<G> > *mga=new Multi_Goal_Accumulator<G,T,greater<G> >(branch);
  46. - goal_acc=mga;
  47. + this->goal_acc=mga;
  48. Successor_Goal_Test<G,T>::Goal_Value(a);
  49. - goal_acc=old;
  50. + this->goal_acc=old;
  51. for (mga->Init();!mga->IsEnd();mga->Next()) {
  52. T *state=mga->Get_State();
  53. - Multi_Minimax_Goal_Test *next=new Multi_Minimax_Goal_Test(d-1,b,gen,other,goal_acc,tester);
  54. + Multi_Minimax_Goal_Test *next=new Multi_Minimax_Goal_Test(this->d-1,this->b,this->gen,other,this->goal_acc,this->tester);
  55. next->Goal_Value(state);
  56. - goal_acc->Put(accumulator->value,acc->state,acc->op);
  57. + this->goal_acc->Put(this->accumulator->value,this->acc->state,this->acc->op);
  58. }
  59. - goal_acc->Put(mga->Get_State(),mga->Get_Operator(),mga->Get_Result());
  60. - return goal_acc->Get_Value();
  61. + this->goal_acc->Put(mga->Get_State(),mga->Get_Operator(),mga->Get_Result());
  62. + return this->goal_acc->Get_Value();
  63. }
  64. };
  65. --- ./src/Genetic.hpp.orig 2005-03-04 10:32:17.605855448 +0100
  66. +++ ./src/Genetic.hpp 2005-03-04 10:40:23.161039840 +0100
  67. @@ -216,9 +216,9 @@
  68. virtual Genetic_Operator<T> *Choose_Operator(void)
  69. {
  70. int max=(int)total_op_weight;
  71. - list<Genetic_Operator<T> *>::iterator start=operators.begin();
  72. - list<Genetic_Operator<T> *>::iterator end=operators.end();
  73. - list<Genetic_Operator<T> *>::iterator iter;
  74. + typename list<Genetic_Operator<T> *>::iterator start=operators.begin();
  75. + typename list<Genetic_Operator<T> *>::iterator end=operators.end();
  76. + typename list<Genetic_Operator<T> *>::iterator iter;
  77. int r=rand()%max;
  78. int count=0;
  79. for (iter=start;iter!=end;iter++) {
  80. @@ -264,7 +264,7 @@
  81. cur_size++;
  82. }
  83. }
  84. - newpop->Eval_Fitness(fit_func);
  85. + newpop->Eval_Fitness(this->fit_func);
  86. return newpop;
  87. }