Annotation of OpenXM/src/OpenMath/ORG/openxm/tam/CMO_QQ.java, Revision 1.2
1.1 tam 1: /**
1.2 ! tam 2: * $OpenXM: OpenXM/src/OpenMath/ORG/openxm/tam/CMO_QQ.java,v 1.1 2000/09/12 07:05:06 tam Exp $
1.1 tam 3: */
4: package ORG.openxm.tam;
5:
6: import java.io.*;
7: import java.math.BigInteger;
8:
9: /**
10: * CMO $B7A<0$N(B QQ $B7?$rI=$7$^$9(B.
11: */
12: final public class CMO_QQ extends CMO{
13: private CMO_ZZ a,b;
14:
15: /**
16: * (a/b) $B$rI=$9(B QQ $B7?$rI=$7$^$9(B.
17: * $B%;%^%s%F%#%/%9$N%A%'%C%/$O9T$J$o$l$^$;$s(B.
18: */
19: public CMO_QQ(CMO_ZZ a,CMO_ZZ b){
20: this.a = a;
21: this.b = b;
22: }
23:
24: /**
25: * $BJ,;R$rF@$^$9(B.
26: */
27: public CMO_ZZ getBunshi(){
28: return a;
29: }
30:
31: /**
32: * $BJ,Jl$rF@$^$9(B.
33: */
34: public CMO_ZZ getBunbo(){
35: return b;
36: }
37:
38: public int DISCRIMINATOR(){
39: return CMO.QQ;
40: }
41:
42: private int sign(int a){
43: if(a>0){
44: return 1;
45: }else if(a<0){
46: return -1;
47: }
48: return 0;
49: }
50:
1.2 ! tam 51: protected void sendByObject(OpenXMstream os) throws IOException{
1.1 tam 52: a.sendByObject(os);
53: b.sendByObject(os);
54: }
55:
1.2 ! tam 56: static protected CMO receive(OpenXMstream is) throws IOException{
1.1 tam 57: CMO_ZZ a,b;
58:
59: a = (CMO_ZZ)CMO_ZZ.receive(is);
60: b = (CMO_ZZ)CMO_ZZ.receive(is);
61:
62: return new CMO_QQ(a,b);
63: }
64:
65: protected String toCMOexpressionByObject(){
66: return "CMO_QQ,"+ a.toCMOexpression() +","+ b.toCMOexpression();
67: }
68: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>