de.unihalle.informatik.MiToBo.math.optimization
Class MatchingBipartite

java.lang.Object
  extended by de.unihalle.informatik.Alida.operator.ALDOperator
      extended by de.unihalle.informatik.MiToBo.core.operator.MTBOperator
          extended by de.unihalle.informatik.MiToBo.math.optimization.MatchingBipartite
All Implemented Interfaces:
de.unihalle.informatik.Alida.datatypes.ALDConfigurationValidator
Direct Known Subclasses:
MatchingBipartite_HungarianAlgorithm

public abstract class MatchingBipartite
extends MTBOperator

Base class for bipartite matching algorithms.

Given two sets of elements S1 and S2, the goal is to find a matching between both sets such that for every element of S1 exactly one matching element in S2 is found, and vice versa. If the cardinality of the sets is not equal, handling and solution depends on the applied matching algorithm.

The matching is done according to a weighting matrix containing costs or scores for each pair of elements e1 from S1 and e2 from S2.

Author:
moeller

Nested Class Summary
 
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.operator.ALDOperator.HidingMode
 
Field Summary
protected  byte[][] resultMatrix
          Result matrix containing final matching.
protected  double[][] scoreMatrix
          Matrix containing pairwise scores of bipartite sets.
 
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
completeDAG, name, portHashAccess, verbose, versionProvider
 
Constructor Summary
protected MatchingBipartite()
          Default constructor.
 
Method Summary
protected abstract  void calcMatching()
          Function calculating actual matching, to be implemented by subclasses.
 byte[][] getMatching()
          Returns result matrix with matching result.
protected  void operate()
           
 
Methods inherited from class de.unihalle.informatik.MiToBo.core.operator.MTBOperator
readResolve
 
Methods inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
deserializeFromXmlFile, fieldContained, getALDPortHashAccessKey, getConstructionMode, getInInoutNames, getInInoutNames, getInNames, getInOutNames, getMissingRequiredInputs, getName, getNumParameters, getOutInoutNames, getOutNames, getParameter, getParameterDescriptor, getParameterNames, getSupplementalNames, getVerbose, getVersion, isConfigured, parametersToXmlObject, print, print, print, printInterface, printInterface, readHistory, reinitializeParameterDescriptors, runOp, runOp, runOp, serializeToXmlFile, setConstructionMode, setName, setParameter, setParametersFromXml, setParametersFromXml, setVerbose, toStringVerbose, unconfiguredItems, validate, validateCustom, validateGeneric, writeHistory, writeHistory, writeHistory, writeParametersToXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resultMatrix

@Parameter(label="resultMatrix",
           type=INPUT,
           description="Result matrix.")
protected byte[][] resultMatrix
Result matrix containing final matching.

The matrix usually contains only 0 and 1 as entries with 1 indicating an assignment. In each row and each column there should be exactly one single 1 only.


scoreMatrix

@Parameter(label="scoreMatrix",
           required=true,
           type=INPUT,
           description="Scoring matrix.")
protected double[][] scoreMatrix
Matrix containing pairwise scores of bipartite sets.

Constructor Detail

MatchingBipartite

protected MatchingBipartite()
                     throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Default constructor.

Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail

calcMatching

protected abstract void calcMatching()
Function calculating actual matching, to be implemented by subclasses.


getMatching

public byte[][] getMatching()
Returns result matrix with matching result.


operate

protected void operate()
Specified by:
operate in class de.unihalle.informatik.Alida.operator.ALDOperator