Annotation of OpenXM_contrib/PHC/Ada/Math_Lib/Polynomials/standard_complex_laur_randomizers.adb, Revision 1.1
1.1 ! maekawa 1: with Standard_Random_Numbers; use Standard_Random_Numbers;
! 2: with Standard_Integer_Vectors;
! 3:
! 4: package body Standard_Complex_Laur_Randomizers is
! 5:
! 6: function Complex_Randomize ( p : Poly ) return Poly is
! 7:
! 8: res : Poly := Null_Poly;
! 9:
! 10: procedure Randomize_Term ( t : in Term; cont : out boolean ) is
! 11:
! 12: rt : Term;
! 13:
! 14: begin
! 15: rt.cf := Random;
! 16: rt.dg := new Standard_Integer_Vectors.Vector'(t.dg.all);
! 17: Add(res,rt);
! 18: Clear(rt);
! 19: cont := true;
! 20: end Randomize_Term;
! 21: procedure Randomize_Terms is new Visiting_Iterator(Randomize_Term);
! 22:
! 23: begin
! 24: Randomize_Terms(p);
! 25: return res;
! 26: end Complex_Randomize;
! 27:
! 28: function Complex_Randomize1 ( p : Poly ) return Poly is
! 29:
! 30: res : Poly := Null_Poly;
! 31:
! 32: procedure Randomize_Term ( t : in Term; cont : out boolean ) is
! 33:
! 34: rt : Term;
! 35:
! 36: begin
! 37: rt.cf := Random1;
! 38: rt.dg := new Standard_Integer_Vectors.Vector'(t.dg.all);
! 39: Add(res,rt);
! 40: Clear(rt);
! 41: cont := true;
! 42: end Randomize_Term;
! 43: procedure Randomize_Terms is new Visiting_Iterator(Randomize_Term);
! 44:
! 45: begin
! 46: Randomize_Terms(p);
! 47: return res;
! 48: end Complex_Randomize1;
! 49:
! 50: function Complex_Randomize ( p : Laur_Sys ) return Laur_Sys is
! 51:
! 52: res : Laur_Sys(p'range);
! 53:
! 54: begin
! 55: for i in res'range loop
! 56: res(i) := Complex_Randomize(p(i));
! 57: end loop;
! 58: return res;
! 59: end Complex_Randomize;
! 60:
! 61: function Complex_Randomize1 ( p : Laur_Sys ) return Laur_Sys is
! 62:
! 63: res : Laur_Sys(p'range);
! 64:
! 65: begin
! 66: for i in res'range loop
! 67: res(i) := Complex_Randomize1(p(i));
! 68: end loop;
! 69: return res;
! 70: end Complex_Randomize1;
! 71:
! 72: end Standard_Complex_Laur_Randomizers;
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>