// Decompiled by Jad v1.5.7. Copyright 1997-99 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   lprec.java

package lp;

import java.io.PrintStream;

// Referenced classes of package lp:
//            constant, matrec

public class lprec
    implements constant
{

    public lprec(int nrows, int ncolumns)
    {
        int nsum = nrows + ncolumns;
        if(rows < 0 || columns < 0)
            System.err.print("rows < 0 or columns < 0");
        lp_name = new String("unnamed");
        active = 0;
        verbose = 0;
        print_duals = 0;
        print_sol = 0;
        debug = 0;
        print_at_invert = 0;
        trace = 0;
        rows = nrows;
        columns = ncolumns;
        sum = nsum;
        rows_alloc = rows;
        columns_alloc = columns;
        sum_alloc = sum;
        names_used = 0;
        obj_bound = 9.9999999999999998E+023D;
        infinite = 9.9999999999999998E+023D;
        epsilon = 0.001D;
        epsb = 5.0100000000000005E-007D;
        epsd = 1.0000000000000002E-006D;
        epsel = 1E-008D;
        non_zeros = 0;
        mat_alloc = 1;
        mat = new matrec[mat_alloc];
        for(int i = 0; i < mat_alloc; i++)
            mat[i] = new matrec(0, 0.0D);

        col_no = new int[mat_alloc];
        for(int i = 0; i < mat_alloc; i++)
            col_no[i] = 0;

        col_end = new int[columns + 1];
        for(int i = 0; i < columns + 1; i++)
            col_end[i] = 0;

        row_end = new int[rows + 1];
        for(int i = 0; i < rows + 1; i++)
            row_end[i] = 0;

        row_end_valid = 0;
        orig_rh = new double[rows + 1];
        for(int i = 0; i < rows + 1; i++)
            orig_rh[i] = 0.0D;

        rh = new double[rows + 1];
        for(int i = 0; i < rows + 1; i++)
            rh[i] = 0.0D;

        rhs = new double[rows + 1];
        for(int i = 0; i < rows + 1; i++)
            rhs[i] = 0.0D;

        must_be_int = new short[sum + 1];
        for(int i = 0; i < sum + 1; i++)
            must_be_int[i] = 0;

        orig_upbo = new double[sum + 1];
        for(int i = 0; i <= sum; i++)
            orig_upbo[i] = infinite;

        upbo = new double[sum + 1];
        for(int i = 0; i < sum + 1; i++)
            upbo[i] = 0.0D;

        orig_lowbo = new double[sum + 1];
        for(int i = 0; i < sum + 1; i++)
            orig_lowbo[i] = 0.0D;

        lowbo = new double[sum + 1];
        for(int i = 0; i < sum + 1; i++)
            lowbo[i] = 0.0D;

        basis_valid = 1;
        bas = new int[rows + 1];
        for(int i = 0; i <= rows; i++)
            bas[i] = 0;

        basis = new short[sum + 1];
        for(int i = 0; i <= sum; i++)
            basis[i] = 0;

        lower = new short[sum + 1];
        for(int i = 0; i <= rows; i++)
        {
            bas[i] = i;
            basis[i] = 1;
        }

        for(int i = rows + 1; i <= sum; i++)
            basis[i] = 0;

        for(int i = 0; i <= sum; i++)
            lower[i] = 1;

        eta_valid = 1;
        eta_size = 0;
        eta_alloc = 10000;
        max_num_inv = 50;
        nr_lagrange = 0;
        eta_value = new double[eta_alloc];
        for(int i = 0; i < eta_alloc; i++)
            eta_value[i] = 0.0D;

        eta_row_nr = new int[eta_alloc];
        for(int i = 0; i < eta_alloc; i++)
            eta_row_nr[i] = 0;

        eta_col_end = new int[rows_alloc + max_num_inv];
        for(int i = 0; i < rows_alloc + max_num_inv; i++)
            eta_col_end[i] = 0;

        bb_rule = 0;
        break_at_int = 0;
        break_value = 0.0D;
        iter = 0;
        total_iter = 0;
        solution = new double[sum + 1];
        for(int i = 0; i <= sum; i++)
            solution[i] = 0.0D;

        best_solution = new double[sum + 1];
        for(int i = 0; i <= sum; i++)
            best_solution[i] = 0.0D;

        duals = new double[rows + 1];
        for(int i = 0; i <= rows; i++)
            duals[i] = 0.0D;

        maximise = 0;
        floor_first = 1;
        scaling_used = 0;
        columns_scaled = 0;
        ch_sign = new short[rows + 1];
        for(int i = 0; i <= rows; i++)
            ch_sign[i] = 0;

        valid = 0;
    }

    public double getBestSolution(int i)
    {
        return best_solution[i];
    }

    public int getRows()
    {
        return rows;
    }

    public int getColumns()
    {
        return columns;
    }

    String lp_name;
    public short active;
    public short verbose;
    public short print_duals;
    public short print_sol;
    public short debug;
    public short print_at_invert;
    public short trace;
    public short anti_degen;
    int rows;
    int rows_alloc;
    int columns;
    int columns_alloc;
    int sum;
    int sum_alloc;
    short names_used;
    String row_name[];
    String col_name[];
    int non_zeros;
    int mat_alloc;
    matrec mat[];
    int col_end[];
    int col_no[];
    short row_end_valid;
    int row_end[];
    double orig_rh[];
    double rh[];
    double rhs[];
    short must_be_int[];
    double orig_upbo[];
    double orig_lowbo[];
    double upbo[];
    double lowbo[];
    short basis_valid;
    int bas[];
    short basis[];
    short lower[];
    short eta_valid;
    int eta_alloc;
    int eta_size;
    int num_inv;
    int max_num_inv;
    double eta_value[];
    int eta_row_nr[];
    int eta_col_end[];
    short bb_rule;
    short break_at_int;
    double break_value;
    double obj_bound;
    int iter;
    int total_iter;
    int max_level;
    int total_nodes;
    double solution[];
    double best_solution[];
    double duals[];
    short maximise;
    short floor_first;
    short ch_sign[];
    short scaling_used;
    short columns_scaled;
    double scale[];
    int nr_lagrange;
    double lag_row[][];
    double lag_rhs[];
    double lambda[];
    short lag_con_type[];
    double lag_bound;
    short valid;
    double infinite;
    double epsilon;
    double epsb;
    double epsd;
    double epsel;
}
