algorithm.matching
Class Matching

java.lang.Object
  extended by algorithm.matching.Matching
All Implemented Interfaces:
java.lang.Comparable<Matching>

public class Matching
extends java.lang.Object
implements java.lang.Comparable<Matching>

A data structure to hold information about the found matching in two skeletons.

No information about the skeleton nodes is known at this point, as the matching information is stored by indices in the cost matrix and by the index of this end nodes in the list of all end nodes, respectively. The relations to the nodes have to be built from the indices in the matrix afterwards.


Field Summary
private  MatchingAngles angles
          the angle of the matching line (used for filtering)
private  double cost
          the costs for this matching
private  int partner1
          index of the first matching partner in the cost matrix rows
private  int partner2
          index of the second matching partner in the cost matrix column
 
Constructor Summary
Matching(int partnerid1, int partnerid2, double cost)
          Constructor.
 
Method Summary
 int compareTo(Matching o)
           
 MatchingAngles getAngles()
           
 double getCost()
          Get the costs for this matching.
 int getPartner1()
          get the first partner index (as a row index in the cost matrix)
 int getPartner2()
          get the second partner index (as a column index in the cost matrix)
 void setAngles(MatchingAngles angles)
           
 void setCost(double cost)
           
 void setPartner1(int partner1)
          set the first partner index (as a row index in the cost matrix)
 void setPartner2(int partner2)
          set the second partner index (as a column index in the cost matrix)
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

partner1

private int partner1
index of the first matching partner in the cost matrix rows


partner2

private int partner2
index of the second matching partner in the cost matrix column


cost

private double cost
the costs for this matching


angles

private MatchingAngles angles
the angle of the matching line (used for filtering)

Constructor Detail

Matching

public Matching(int partnerid1,
                int partnerid2,
                double cost)
Constructor. Create a new matching defined by the indices of the matching nodes.

Parameters:
partnerid1 - the index of the first matching partner in the cost matrix rows
partnerid2 - the index of the second matching partner in the cost matrix columns
cost -
Method Detail

getAngles

public MatchingAngles getAngles()
Returns:
the angles

setAngles

public void setAngles(MatchingAngles angles)
Parameters:
angles - the angles to set

getCost

public double getCost()
Get the costs for this matching.

Returns:
the cost

setPartner1

public void setPartner1(int partner1)
set the first partner index (as a row index in the cost matrix)

Parameters:
partner1 - the first matching partner,

getPartner1

public int getPartner1()
get the first partner index (as a row index in the cost matrix)

Returns:
the first partner index

setPartner2

public void setPartner2(int partner2)
set the second partner index (as a column index in the cost matrix)

Parameters:
partner2 - the second matching partner,

getPartner2

public int getPartner2()
get the second partner index (as a column index in the cost matrix)

Returns:
the second partner index

setCost

public void setCost(double cost)
Parameters:
cost - the cost to set

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(Matching o)
Specified by:
compareTo in interface java.lang.Comparable<Matching>