|
Boost : |
From: Andy Little (andy_at_[hidden])
Date: 2004-01-12 04:06:17
"Matthias Schabel" <boost_at_[hidden]> wrote in message
news:D6CEAB96-44AE-11D8-8726-000393DC6706_at_schabel-family.org...
> > Matthias.. What is your opinion on changing the license on
> > static_rational.hpp?
>
> I've been meaning to change the license to Boost; just haven't had
> much time for extracurriculars lately. Feel free to use it as if it
> was Boost
> and I'll get a fully boostified version out in the not too distant
> future...
> Maybe static_rational is uncontroversial enough to consider it a
> candidate for
> addition to boost::math? I think the template declarations in
> operators.hpp
> for static_add, etc... might also be useful in other contexts and seem
> like
> they would also not generate too much controversy...then again...
Hmm I feel a review request coming on.
I have done a bit of er hacking.
changed the Add Mult etc to use the MPL versions.
called it rat for no very good reason:
using boost::math::rat;
using boost::mpl::plus;
typedef plus<rat<2,1>,rat<2,2> >::type Rat;
Shut your eyes and think of nice things before you take a look
Header enclosed.
If you get time would appreciate an official version.
Cheers
Andy Little
begin 666 static_rational.hpp
M+R\@1G)O;2!9970_at_06YO=&AE<B!5;FET<R!,:6)R87)Y("A904Y,*2 M($$@
M0RLK(&QI8G)A<GD_at_9F]R('IE<F\M;W9E<FAE860*+R\@9&EM96YS:6]N86P@
M86YA;'ES:7,@86YD('5N:70@;6%N:7!U;&%T:6]N+V-O;G9E<G-I;VXN"B\O
M( HO+R!#;W!Y<FEG:'0@*$,I(#(P,#,@36%T=&AI87,@0VAR:7-T:6%N(%-C
M:&%B96P*+R\@(%!E<FUI<W-I;VX@=&\@8V]P>2P@=7-E+"!M;V1I9GDL('-E
M;&P_at_86YD(&1I<W1R:6)U=&4@=&AI<R!S;V9T=V%R90T*+R\@(&ES(&=R86YT
M960@<')O=FED960@=&AI<R!C;W!Y<FEG:'0@;F]T:6-E(&%P<&5A<G,@:6X@
M86QL(&-O<&EE<RX-"B\O("!4:&ES('-O9G1W87)E(&ES('!R;W9I9&5D(")A
M<R!I<R(@=VET:&]U="!E>'!R97-S(&]R(&EM<&QI960@=V%R<F%N='DL#0HO
M+R @86YD('=I=&@@;F\@8VQA:6T_at_87,@=&\@:71S('-U:71A8FEL:71Y(&9O
M<B!A;GD@<'5R<&]S92X*"B\O($Y/5$4Z(%1H:7,@=F5R<VEO;B!O9B!T:&4@
M:&5A9&5R(&AA<R!B96X@<V5V97)E;'D@:&%C:V5D(&)Y($%N9'D_at_3&ET=&QE
M"@HC:69N9&5F($)/3U-47U-4051)0U]2051)3TY!3%](4% @"B-D969I;F4@
M0D]/4U1?4U1!5$E#7U)!5$E/3D%,7TA04 H*(VEN8VQU9&4@(F)O;W-T+VUA
M=&@O8V]M;6]N7V9A8W1O<BYH<' B"B-I;F-L=61E(")B;V]S="]M<&PO<&QU
M<RYH<' B"B-I;F-L=61E(")B;V]S="]M<&PO;6EN=7,N:'!P(@HC:6YC;'5D
M92 B8F]O<W0O;7!L+VUU;'1I<&QI97,N:'!P(@HC:6YC;'5D92 B8F]O<W0O
M;7!L+V1I=FED97,N:'!P(@HC:6YC;'5D92 B8F]O<W0O;7!L+VYE9V%T92YH
M<' B"@IN86UE<W!A8V4_at_8F]O<W1[;F%M97-P86-E(&UA=&A["@H@(" @+R\@
M8V]M<&EL92!T:6UE(&%B<V]L=71E('9A;'5E"B @("!T96UP;&%T93QL;VYG
M(%9A;'5E/@H@(" @<W1R=6-T('-T871I8U]A8G-["B @(" @(" @0D]/4U1?
M4U1!5$E#7T-/3E-404Y4*&QO;F<L=F%L=64I"B @(" @(" @/2!686QU92 \
M(# @/R M5F%L=64_at_.B!686QU93L*(" @('T["@H@(" @+R\@8V]M<&EL92!T
M:6UE(')A=&EO;F%L(&YU;6)E<@H@(" @=&5M<&QA=&4\;&]N9R!.+&QO;F<@
M1" ](#$^"B @("!S=')U8W0@<F%T>PH)(" @('-T871I8R!C;VYS="!L;VYG
M(&YA8G,@"B @(" @(" @/2!S=&%T:6-?86)S/$X^.CIV86QU93L*(" @(" @
M("!S=&%T:6,@8V]N<W0@;&]N9R!D86)S( H@(" @(" @(#T@<W1A=&EC7V%B
M<SQ$/CHZ=F%L=64[(" @(" @(" @(" @(" @(" @(" @(" @(" *"2 @("!S
M=&%T:6,@8V]N<W0@=6YS:6=N960@;&]N9R!N9&5N( H@(" @(" @(#T@<W1A
M=&EC7V=C9#QN86)S+&1A8G,^.CIV86QU93L*(" @(" @("!S=&%T:6,@8V]N
M<W0@=6YS:6=N960@;&]N9R!D9&5N( H@(" @(" @(#T@<W1A=&EC7V=C9#QN
M86)S+&1A8G,^.CIV86QU93L@(" @(" @(" @(" @(" @(" @(" @(" @(" @
M( H@(" @(" @("\O(&YE960_at_8V%S="!T;R!S:6=N960_at_8F5C875S92 *(" @
M(" @(" O+R!S=&%T:6-?9V-D(')E='5R;G,@=6YS:6=N960@;&]N9PH@(" @
M(" @('-T871I8R!C;VYS="!L;VYG(&YU;65?=F%L=64@"B @(" @(" @/2!.
M+W-T871I8U]C87-T/&QO;F<^*&YD96XI.PH@(" @(" @('-T871I8R!C;VYS
M="!L;VYG(&1E;F]M7W9A;'5E"B @(" @(" @/2!$+W-T871I8U]C87-T/&QO
M;F<^*&1D96XI.PH@(" @?3L*"B @(" O+W!R979E;G0_at_9&EV(# *(" @('1E
M;7!L871E/&QO;F<@3CX@<W1R=6-T(')A=#Q.+# ^.PH*(" @("\O(')E9'5C
M92!R871I;VYA;"!T>7!E('1O(&QO=V5S="!C;VUM;VX_at_9&5N;VUI;F%T;W(*
M(" @('1E;7!L871E/&QO;F<@3BQL;VYG($0^"B @("!S=')U8W0@<F5D=6-E
M7W)A= H@(" @>PH@(" @(" @('1Y<&5D968@<F%T/$XL1#X_at_87)G7W1Y<&4[
M"B @(" @(" @='EP961E9B!R870\"B @(" @(" @(" @(&%R9U]T>7!E.CIN
M=6UE7W9A;'5E+ H@(" @(" @(" @("!A<F=?='EP93HZ9&5N;VU?=F%L=64*
M(" @(" @(" ^(" @('1Y<&4["B @("!].PI]?2 O+V)O;W-T.CIM871H"@IN
M86UE<W!A8V4_at_8F]O<W1[;F%M97-P86-E(&UP;'L*"B @("!T96UP;&%T93QL
M;VYG($XL;&]N9R!$/B *(" @('-T<G5C="!N96=A=&4\( H@(" @(" @(&)O
M;W-T.CIM871H.CIR870\3BQ$/B *(" @(#Y[( H@(" @(" @('1Y<&5D968@
M='EP96YA;64_at_8F]O<W0Z.FUA=&@Z.G)E9'5C95]R870\+4XL1#XZ.G1Y<&4@
M='EP93L@"B @("!].PH*(" @('1E;7!L871E/&QO;F<@3C$L;&]N9R!$,2QL
M;VYG($XR+&QO;F<@1#(^( H@(" @<W1R=6-T('!L=7,\( H@(" @(" @(&)O
M;W-T.CIM871H.CIR870\3C$L1#$^+ H@(" @(" @(&)O;W-T.CIM871H.CIR
M870\3C(L1#(^( H@(" @/GL@"B @(" @(" @='EP961E9B!T>7!E;F%M92!B
M;V]S=#HZ;6%T:#HZ<F5D=6-E7W)A=#P*(" @(" @(" @(" @3C$J1#(K3C(J
M1#$L1#$J1#(*(" @(" @(" ^.CIT>7!E('1Y<&4[( H@(" @?3L*(" @( H@
M(" @=&5M<&QA=&4\;&]N9R!.,2QL;VYG($0Q+&QO;F<@3C(L;&]N9R!$,CX@
M"B @("!S=')U8W0@;6EN=7,\"B @(" @(" @8F]O<W0Z.FUA=&@Z.G)A=#Q.
M,2Q$,3XL"B @(" @(" @8F]O<W0Z.FUA=&@Z.G)A=#Q.,BQ$,CX@"B @(" ^
M>R *(" @(" @("!T>7!E9&5F('1Y<&5N86UE(&)O;W-T.CIM871H.CIR961U
M8V5?<F%T/$XQ*D0R+4XR*D0Q+$0Q*D0R/CHZ='EP92!T>7!E.R *(" @('T[
M"@H@(" @=&5M<&QA=&4\;&]N9R!.+&QO;F<@1"QL;VYG($T^( H@(" @<W1R
M=6-T(&UU;'1I<&QI97,\"B @(" @(" @8F]O<W0Z.FUA=&@Z.G)A=#Q.+$0^
M+ H@(" @(" @(&)O;W-T.CIM871H.CIR870\33X@"B @(" ^(" @( H@(" @
M>R *(" @(" @("!T>7!E9&5F('1Y<&5N86UE(&)O;W-T.CIM871H.CIR961U
M8V5?<F%T/$XJ32Q$/CHZ='EP92!T>7!E.R *(" @('T["@H@(" @=&5M<&QA
M=&4\;&]N9R!.,2QL;VYG($0Q+&QO;F<@3C(L;&]N9R!$,CX@"B @("!S=')U
M8W0@;75L=&EP;&EE<SP*(" @(" @("!B;V]S=#HZ;6%T:#HZ<F%T/$XQ+$0Q
M/BP*(" @(" @("!B;V]S=#HZ;6%T:#HZ<F%T/$XR+$0R/B *(" @(#Y[( H@
M(" @(" @('1Y<&5D968@='EP96YA;64_at_8F]O<W0Z.FUA=&@Z.G)E9'5C95]R
M870\3C$J3C(L1#$J1#(^.CIT>7!E('1Y<&4[( H@(" @?3L*"B @("!T96UP
M;&%T93QL;VYG($XL;&]N9R!$+&QO;F<@33X@"B @("!S=')U8W0_at_9&EV:61E
M<SP*(" @(" @("!B;V]S=#HZ;6%T:#HZ<F%T/$XL1#XL"B @(" @(" @8F]O
M<W0Z.FUA=&@Z.G)A=#Q-/B *(" @(#Y["B @(" @(" @='EP961E9B!T>7!E
M;F%M92!B;V]S=#HZ;6%T:#HZ<F5D=6-E7W)A=#Q.+$0J33XZ.G1Y<&4@='EP
M93L@"B @("!].PH*(" @('1E;7!L871E/&QO;F<@3C$L;&]N9R!$,2QL;VYG
M($XR+&QO;F<@1#(^( H@(" @<W1R=6-T(&1I=FED97,\( H@(" @(" @(&)O
M;W-T.CIM871H.CIR870\3C$L1#$^+ H@(" @(" @(&)O;W-T.CIM871H.CIR
M870\3C(L1#(^( H@(" @/GL@"B @(" @(" @='EP961E9B!T>7!E;F%M92!B
M;V]S=#HZ;6%T:#HZ<F5D=6-E7W)A=#Q.,2I$,BQ$,2I.,CXZ.G1Y<&4@='EP
M93L@"B @("!].PI]('TO+V)O;W-T.CIM<&P*"B-E;F1I9B O+R!-0U-?4U1!
15$E#7U)!5$E/3D%,7TA04 H`
`
end
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk