net.sourceforge.combean.samples.mathprog.lp.matrixrounding
Class MatrixRoundingMain

Package class diagram package MatrixRoundingMain
java.lang.Object
  extended by net.sourceforge.combean.samples.mathprog.lp.matrixrounding.MatrixRoundingMain

public class MatrixRoundingMain
extends Object


Constructor Summary
MatrixRoundingMain()
           
 
Method Summary
 LPSolver getLpSolver()
           
 double[][] getResult()
          Returns the rounded matrix.
static void main(String[] args)
           
 void roundMatrix(double[][] doubleArr)
          Round a given matrix such that the row sums and column sums are also rounded to one of the two nearest integers, i.e., row sum 12.6 may only become 12 or 13 but not 14.
 void roundMatrix(InputStream is)
          Round a matrix that is read from an InputStream.
 void roundMatrix(Readable dataSource)
          Round a matrix that is read from a Readable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MatrixRoundingMain

public MatrixRoundingMain()
Method Detail

main

public static void main(String[] args)
Parameters:
args -

roundMatrix

public void roundMatrix(InputStream is)
Round a matrix that is read from an InputStream.

Parameters:
is -

roundMatrix

public void roundMatrix(Readable dataSource)
Round a matrix that is read from a Readable

Parameters:
dataSource -

roundMatrix

public void roundMatrix(double[][] doubleArr)
Round a given matrix such that the row sums and column sums are also rounded to one of the two nearest integers, i.e., row sum 12.6 may only become 12 or 13 but not 14.

Parameters:
doubleArr - the matrix to be rounded

getResult

public double[][] getResult()
Returns the rounded matrix.

Returns:
the rounded matrix

getLpSolver

public final LPSolver getLpSolver()
Returns:
Returns the lpSolver.