[BACK]Return to CMO_RECURSIVE_POLYNOMIAL.java CVS log [TXT][DIR] Up to [local] / OpenXM / src / OpenMath / ORG / openxm / tam

Annotation of OpenXM/src/OpenMath/ORG/openxm/tam/CMO_RECURSIVE_POLYNOMIAL.java, Revision 1.1

1.1     ! tam         1: /**
        !             2:  * $OpenXM$
        !             3:  */
        !             4: package ORG.openxm.tam;
        !             5:
        !             6: import java.io.*;
        !             7:
        !             8: /**
        !             9:  * CMO $B7A<0$N(B RECURSIVE POLYNOMIAL $B7?$rI=$7$^$9(B.
        !            10:  */
        !            11: final public class CMO_RECURSIVE_POLYNOMIAL extends CMO{
        !            12:   private CMO_LIST variables;
        !            13:   private CMO polynomial;
        !            14:
        !            15:   /**
        !            16:    * $BJQ?t(B variables $B$NB?9`<0(B polynomial $B$r:n@.$7$^$9(B.
        !            17:    * $B%;%^%s%F%#%C%/%9$N%A%'%C%/$O9T$J$o$l$^$;$s(B.
        !            18:    */
        !            19:   public CMO_RECURSIVE_POLYNOMIAL(CMO_LIST variables,CMO polynomial){
        !            20:     this.variables = variables;
        !            21:     this.polynomial = polynomial;
        !            22:   }
        !            23:
        !            24:   /**
        !            25:    * $BJQ?t$N%j%9%H$rF@$^$9(B.
        !            26:    */
        !            27:   public CMO_LIST getVariables(){
        !            28:     return variables;
        !            29:   }
        !            30:
        !            31:   /**
        !            32:    * $BB?9`<0$rF@$^$9(B.
        !            33:    */
        !            34:   public CMO getPolynomial(){
        !            35:     return polynomial;
        !            36:   }
        !            37:
        !            38:   public int DISCRIMINATOR(){
        !            39:     return CMO.RECURSIVE_POLYNOMIAL;
        !            40:   }
        !            41:
        !            42:   protected void sendByObject(OpenXMconnection os)
        !            43:        throws IOException,MathcapViolation{
        !            44:     variables.write(os);
        !            45:     polynomial.write(os);
        !            46:   }
        !            47:
        !            48:   static protected CMO receive(OpenXMconnection is) throws IOException{
        !            49:     CMO_LIST variables;
        !            50:     CMO polynomial;
        !            51:     CMO tmp;
        !            52:
        !            53:     tmp = CMO.receive(is);
        !            54:     if(!(tmp instanceof CMO_LIST)){
        !            55:       System.err.println("not CMOobject");
        !            56:     }
        !            57:     variables = (CMO_LIST)tmp;
        !            58:
        !            59:     polynomial = CMO.receive(is);
        !            60:
        !            61:     return new CMO_RECURSIVE_POLYNOMIAL(variables,polynomial);
        !            62:   }
        !            63:
        !            64:   protected String toCMOexpressionByObject(){
        !            65:     String ret = "CMO_RECURSIVE_POLYNOMIAL";
        !            66:
        !            67:     ret += ","+ variables.toCMOexpression();
        !            68:     ret += ","+ polynomial.toCMOexpression();
        !            69:
        !            70:     return ret;
        !            71:   }
        !            72: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>