/** * $OpenXM: OpenXM/src/OpenMath/ORG/openxm/tam/CMO_MONOMIAL32.java,v 1.3 2000/12/03 12:40:40 ohara Exp $ */ package ORG.openxm.tam; import java.io.*; import java.math.BigInteger; /** * CMO 形式の MONOMIAL32 型を表します. * このクラスは単項式を表現します. */ final public class CMO_MONOMIAL32 extends CMO{ private int[] degree; private CMO coefficient; /** * 係数 coefficient, 次数 degree[] とする MONOMIAL32 を作成します. */ public CMO_MONOMIAL32(int[] degree,CMO coefficient){ this.degree = degree; this.coefficient = coefficient; } public int DISCRIMINATOR(){ return CMO.MONOMIAL32; } public boolean allowQ (int[] datacap) { return CMO.allowQ_tag(datacap, DISCRIMINATOR()) && coefficient.allowQ(datacap); } public void sendByObject(OpenXMstream os) throws IOException,MathcapViolation{ os.writeInt(degree.length); for(int i=0;i