distanceFunction
Class Conflicts

java.lang.Object
  extended by distanceFunction.Conflicts
All Implemented Interfaces:
ConflictStorage

public class Conflicts
extends java.lang.Object
implements ConflictStorage

Store and gives comfortable access to all conflicts of a distance function. This class will be used to compute all conflicts for a given distance function.

Author:
Sepp Hartung

Field Summary
private  java.util.Vector<int[]> conflicts
          Store the conflicts.
private  HierarchicalClusteringInstance instance
           
 
Constructor Summary
  Conflicts(HierarchicalClusteringInstance instance)
           
private Conflicts(HierarchicalClusteringInstance instance, java.util.Vector<int[]> conflicts)
           
 
Method Summary
 Conflicts clone()
           
private static java.lang.String conflictsToString(java.util.Vector<int[]> conflicts)
           
 boolean containsConflict(int[] indiceArray)
          Check whether the nodes, specified by the given indices, form a conflict or not.
static boolean containsEdge(int[] conflict, int i, int j)
           
static java.util.Vector<int[]> getAllConflictForEdge(DistanceFunction function, int i, int j)
          Computes all conflicts which contains the edge between i and j.
 int[] getArbitraryConflict()
           
 java.util.Vector<int[]> getConflicts()
           
 int getNumberOfConflicts()
           
static java.util.Vector<int[]> iniConflicts(DistanceFunction function)
           
 java.lang.String toString()
           
 void update(int i, int j)
          Update all conflicts which contains i-j.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

conflicts

private final java.util.Vector<int[]> conflicts
Store the conflicts.


instance

private HierarchicalClusteringInstance instance
Constructor Detail

Conflicts

public Conflicts(HierarchicalClusteringInstance instance)

Conflicts

private Conflicts(HierarchicalClusteringInstance instance,
                  java.util.Vector<int[]> conflicts)
Method Detail

clone

public Conflicts clone()
Overrides:
clone in class java.lang.Object

iniConflicts

public static java.util.Vector<int[]> iniConflicts(DistanceFunction function)

containsConflict

public boolean containsConflict(int[] indiceArray)
Check whether the nodes, specified by the given indices, form a conflict or not.

Parameters:
i -
j -
l -
Returns:

getArbitraryConflict

public int[] getArbitraryConflict()
Specified by:
getArbitraryConflict in interface ConflictStorage

getNumberOfConflicts

public int getNumberOfConflicts()
Specified by:
getNumberOfConflicts in interface ConflictStorage

getConflicts

public java.util.Vector<int[]> getConflicts()
Specified by:
getConflicts in interface ConflictStorage

update

public void update(int i,
                   int j)
Update all conflicts which contains i-j.

Parameters:
i -
j -

getAllConflictForEdge

public static java.util.Vector<int[]> getAllConflictForEdge(DistanceFunction function,
                                                            int i,
                                                            int j)
Computes all conflicts which contains the edge between i and j.

Parameters:
function -
i -
j -
Returns:

containsEdge

public static boolean containsEdge(int[] conflict,
                                   int i,
                                   int j)

toString

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

conflictsToString

private static java.lang.String conflictsToString(java.util.Vector<int[]> conflicts)