mascoptCplex.algos.graph
Class MstLP

java.lang.Object
  |
  +--mascoptCplex.algos.graph.MstLP

public class MstLP
extends Object

Constructs an Integer Linear Program for finding the weight of the Minimum Spanning Tree for a given graph. The linear program is solved using CPLEX and the object can then be queried to give the weight of the Minimum Spanning Tree.

Version:
13/6/2002
Author:
srai@sophia.inria.fr
See Also:
constructLPMst

Field Summary
static String edgeId
           
static String edgeW
           
 
Constructor Summary
MstLP(Graph g)
          The Default constructor
 
Method Summary
 void constructLPMst()
          The main function - constructs an ILP and solves it to store the result
 int getMinWt()
          Function for returning the weight of the MST
 void writeMSTLP(boolean choice, String filename)
          Allow to write the linear program solved by cplex representing the mst problem
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

edgeW

public static final String edgeW
See Also:
Constant Field Values

edgeId

public static final String edgeId
See Also:
Constant Field Values
Constructor Detail

MstLP

public MstLP(Graph g)
The Default constructor

Parameters:
g - the Graph to be used for finding the MST weight
Method Detail

constructLPMst

public void constructLPMst()
The main function - constructs an ILP and solves it to store the result


getMinWt

public int getMinWt()
Function for returning the weight of the MST


writeMSTLP

public void writeMSTLP(boolean choice,
                       String filename)
Allow to write the linear program solved by cplex representing the mst problem

Parameters:
choice - true for writting otherwise false
filename - the name of the file to write