jml.graph.cut
Class GraphCut

java.lang.Object
  extended by jml.graph.cut.GraphCut
Direct Known Subclasses:
MinMaxCut, NormalizedCut, RatioCut

public abstract class GraphCut
extends java.lang.Object


Field Summary
private  int K
          Number of clusters on the graph.
private  org.apache.commons.math.linear.RealMatrix Q
          Cluster indicator matrix.
private  org.apache.commons.math.linear.RealMatrix W
          Weight matrix on the graph.
 
Constructor Summary
GraphCut(int K)
          Constructor.
 
Method Summary
abstract  void cut()
          Do graph cut/clustering.
 org.apache.commons.math.linear.RealMatrix getIndicatorMatrix()
          Get the N x K cluster indicator matrix.
 int getK()
          Get the number of clusters.
 org.apache.commons.math.linear.RealMatrix getWeightMatrix()
          Get the weight matrix on the graph.
abstract  void initialize()
          Initialization.
 void setK(int K)
          Set the number of clusters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

K

private int K
Number of clusters on the graph.


W

private org.apache.commons.math.linear.RealMatrix W
Weight matrix on the graph.


Q

private org.apache.commons.math.linear.RealMatrix Q
Cluster indicator matrix.

Constructor Detail

GraphCut

public GraphCut(int K)
Constructor.

Parameters:
K - number of clusters on the graph.
Method Detail

initialize

public abstract void initialize()
Initialization.


cut

public abstract void cut()
Do graph cut/clustering.


getWeightMatrix

public org.apache.commons.math.linear.RealMatrix getWeightMatrix()
Get the weight matrix on the graph.

Returns:
an N x N weight matrix

getIndicatorMatrix

public org.apache.commons.math.linear.RealMatrix getIndicatorMatrix()
Get the N x K cluster indicator matrix.

Returns:
an N x K cluster indicator matrix

getK

public int getK()
Get the number of clusters.

Returns:
number of clusters on the graph

setK

public void setK(int K)
Set the number of clusters.

Parameters:
K - number of clusters to be set on the graph