001/* 002 * $Id$ 003 */ 004 005package edu.jas.poly; 006 007 008import java.io.Serializable; 009 010import edu.jas.structure.RingElem; 011 012 013/** 014 * TableRelation container for storage and printing in RelationTable. 015 * @author Heinz Kredel 016 */ 017public class TableRelation<C extends RingElem<C>> implements Serializable { 018 019 020 /** 021 * First ExpVector of the data structure. 022 */ 023 public final ExpVector e; 024 025 026 /** 027 * Second ExpVector of the data structure. 028 */ 029 public final ExpVector f; 030 031 032 /** 033 * GenSolvablePolynomial of the data structure. 034 */ 035 public final GenSolvablePolynomial<C> p; 036 037 038 /** 039 * Constructor to setup the data structure. 040 * @param e first term. 041 * @param f second term. 042 * @param p product polynomial. 043 */ 044 public TableRelation(ExpVector e, ExpVector f, GenSolvablePolynomial<C> p) { 045 this.e = e; 046 this.f = f; 047 this.p = p; 048 } 049 050 051 /** 052 * Get the String representation. 053 * @see java.lang.Object#toString() 054 */ 055 @Override 056 public String toString() { 057 StringBuffer s = new StringBuffer("TableRelation["); 058 s.append("" + e); 059 s.append(" .*. "); 060 s.append("" + f); 061 s.append(" = "); 062 s.append("" + p); 063 s.append("]"); 064 return s.toString(); 065 } 066 067}