/*
 * $Id$
 */

package edu.jas.gb;

import java.util.List;

import edu.jas.poly.GenSolvablePolynomial;
import edu.jas.poly.GenSolvablePolynomialRing;
import edu.jas.poly.ModuleList;
import edu.jas.poly.PolynomialList;
import edu.jas.structure.RingElem;


/**
 * Container for a GB and transformation matrices.
 * A container for F, G, calG and calF.
 * Immutable objects.
 * @param  coefficient type
 * @param F an ideal base.
 * @param G a Groebner base of F.
 * @param F2G a transformation matrix from F to G.
 * @param G2F a transformation matrix from G to F.
 */
public class SolvableExtendedGB> {

    public final List> F;
    public final List> G;
    public final List>> F2G;
    public final List>> G2F;
    public final GenSolvablePolynomialRing ring;


    public SolvableExtendedGB( List> F,
                               List> G,
                               List>> F2G,
                               List>> G2F) {
        this.F = F;
        this.G = G;
        this.F2G = F2G;
        this.G2F = G2F;
        GenSolvablePolynomialRing r = null;
        if ( G != null ) {
            for ( GenSolvablePolynomial p : G ) {
                if ( p != null ) {
                    r = p.ring;
                    break;
                }
            }
            if ( r != null && r.getVars() == null ) {
                r.setVars( r.newVars("y") );
            }
        }
        this.ring = r;
    }


    /** Get the String representation.
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        PolynomialList P;
        ModuleList M;
        StringBuffer s = new StringBuffer("SolvableExtendedGB: \n\n");
        P = new PolynomialList( ring, F );
        s.append("F = " + P + "\n\n");
        P = new PolynomialList( ring, G );
        s.append("G = " + P + "\n\n");
        M = new ModuleList( ring, F2G );
        s.append("F2G = " + M + "\n\n");
        M = new ModuleList( ring, G2F );
        s.append("G2F = " + M + "\n");
        return s.toString();
    }

}

 

Ads help maintain this website.