jInfer

cz.cuni.mff.ksi.jinfer.iss.heuristics.construction.glpk
Class GlpkUtils

java.lang.Object
  extended by cz.cuni.mff.ksi.jinfer.iss.heuristics.construction.glpk.GlpkUtils

public final class GlpkUtils
extends Object

Utility class for GLPK binding.


Field Summary
static String INPUT
           
static String OUTPUT
           
 
Method Summary
static String getName(AttributeMappingId mapping)
          Returns a "name" for the provided attribute mapping.
static String getName(AttributeMappingId mapping, char separator)
          Returns a "name" for the provided attribute mapping, using the provided separator character.
static String[] getParameters(int timeLimit)
           
static String getPath()
          Returns the full path to the GLPK Solver binary in a String.
static String getVersion()
          Returns the first line that GLPK returns when run with "-v" option, hopefully containing the version of GLPK.
static boolean isBinaryValid()
          Verifies whether the GLPK binary is valid.
static boolean isBinaryValid(String binaryPath)
          Verifies whether the provided path to GLPK binary is valid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INPUT

public static final String INPUT

OUTPUT

public static final String OUTPUT
Method Detail

getPath

public static String getPath()
Returns the full path to the GLPK Solver binary in a String.

Returns:
Full path to the GLPK Solver binary.

isBinaryValid

public static boolean isBinaryValid()
Verifies whether the GLPK binary is valid. See FileUtils.isBinaryValid(String, String, String, boolean) for details.

Returns:
True if the binary found at path provided by getPath() is a valid GLPK Solver binary, false otherwise.

isBinaryValid

public static boolean isBinaryValid(String binaryPath)
Verifies whether the provided path to GLPK binary is valid. See FileUtils.isBinaryValid(String, String, String, boolean) for details.

Parameters:
binaryPath - Path to the binary to check.
Returns:
True if the binary found at path provided is a valid GLPK Solver binary, false otherwise.

getVersion

public static String getVersion()
Returns the first line that GLPK returns when run with "-v" option, hopefully containing the version of GLPK.

Returns:
String containing GLPK identification and version. null if something goes wrong.

getName

public static String getName(AttributeMappingId mapping)
Returns a "name" for the provided attribute mapping.

Parameters:
mapping - Mapping to get a name for.
Returns:
Name of the provided mapping constructed in the following fashion: element name-attribute name

getName

public static String getName(AttributeMappingId mapping,
                             char separator)
Returns a "name" for the provided attribute mapping, using the provided separator character.

Parameters:
mapping - Mapping to get a name for.
separator - Separator to use.
Returns:
Name of the provided mapping constructed in the following fashion: element name{separator}attribute name

getParameters

public static String[] getParameters(int timeLimit)

jInfer

Generated on Fri Dec 9 00:01:25 CET 2011