edu.ksu.cis.kdd.util.graph
Class Clique

java.lang.Object
  extended bysalvo.jesus.graph.VertexImpl
      extended byedu.ksu.cis.kdd.util.graph.Node
          extended byedu.ksu.cis.kdd.util.graph.Clique
All Implemented Interfaces:
salvo.jesus.graph.GraphComponent, HasProperty, salvo.jesus.graph.LabeledGraphComponent, java.io.Serializable, salvo.jesus.graph.Vertex

public class Clique
extends Node

Author:
Roby Joehanes
See Also:
Serialized Form

Field Summary
protected  java.util.HashSet baseNodes
           
protected  java.util.HashSet r
           
protected  java.util.HashSet s
           
protected  java.util.HashSet set
           
 
Fields inherited from class edu.ksu.cis.kdd.util.graph.Node
name, owner, property
 
Fields inherited from class salvo.jesus.graph.VertexImpl
object
 
Constructor Summary
Clique()
           
Clique(Graph owner)
           
Clique(Graph owner, java.util.Collection c)
           
 
Method Summary
 void add(Node n)
          Add a node to this clique.
 void addAll(java.util.Collection c)
          Add all nodes contained in the collection c.
 void addBaseNode(Node n)
           
 void addBaseNodes(java.util.Collection n)
           
 void clear()
          Empties the clique
 boolean contains(Node n)
          Whether or not the node in this clique
 boolean containsAll(java.util.Collection c)
          Whether or not all of the nodes in the collection c are in this clique
 java.util.Set difference(Clique c)
           
 java.util.Set difference(java.util.Set c)
           
 boolean equals(java.lang.Object o)
          Standard equality test: Two cliques are equal if their node set are equal.
 java.util.Set getBaseNodes()
           
 java.lang.String getLabel()
           
 java.lang.String getName()
          Get the node name
 java.util.Set getNodeSet()
           
 java.util.Set getR()
           
 java.util.Set getS()
           
 int hashCode()
          Standard Hash Code.
 java.util.Set intersect(Clique c)
           
 java.util.Set intersect(java.util.Set c)
           
 boolean isEmpty()
          Whether or not the clique is empty
 java.util.Iterator iterator()
          Giving standard iterator of the clique
 void remove(Node n)
          Remove a node from this clique
 void setS(java.util.HashSet s)
          Sets the s.
 int size()
          The number of nodes the clique has
 Node[] toArray()
          Give the nodes in an array
 
Methods inherited from class edu.ksu.cis.kdd.util.graph.Node
getAncestors, getChildren, getChildrenNames, getDescendants, getOwner, getParentNames, getParents, getProperty, getProperty, putProperty, removeProperty, setName, setOwner, setProperty, toString
 
Methods inherited from class salvo.jesus.graph.VertexImpl
getObject, hasLabel, setLabel, setObject
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

set

protected java.util.HashSet set

s

protected java.util.HashSet s

r

protected java.util.HashSet r

baseNodes

protected java.util.HashSet baseNodes
Constructor Detail

Clique

public Clique(Graph owner)
Parameters:
owner -

Clique

public Clique(Graph owner,
              java.util.Collection c)
Parameters:
owner -

Clique

public Clique()
Method Detail

getName

public java.lang.String getName()
Description copied from class: Node
Get the node name

Overrides:
getName in class Node
Returns:
String

getLabel

public java.lang.String getLabel()
Specified by:
getLabel in interface salvo.jesus.graph.LabeledGraphComponent
Overrides:
getLabel in class Node

getR

public java.util.Set getR()
Returns:
HashSet

getS

public java.util.Set getS()
Returns:
HashSet

setS

public void setS(java.util.HashSet s)
Sets the s.

Parameters:
s - The S to set

getNodeSet

public java.util.Set getNodeSet()
Returns:
HashSet

addBaseNode

public void addBaseNode(Node n)

addBaseNodes

public void addBaseNodes(java.util.Collection n)

getBaseNodes

public java.util.Set getBaseNodes()

intersect

public java.util.Set intersect(Clique c)

intersect

public java.util.Set intersect(java.util.Set c)

difference

public java.util.Set difference(Clique c)

difference

public java.util.Set difference(java.util.Set c)

remove

public void remove(Node n)
Remove a node from this clique

Parameters:
n - The node to be removed

add

public void add(Node n)
Add a node to this clique.

Parameters:
n - The node to remove

addAll

public void addAll(java.util.Collection c)
Add all nodes contained in the collection c.

Parameters:
c -

size

public int size()
The number of nodes the clique has

Returns:
int

contains

public boolean contains(Node n)
Whether or not the node in this clique

Parameters:
n -
Returns:
boolean

containsAll

public boolean containsAll(java.util.Collection c)
Whether or not all of the nodes in the collection c are in this clique

Parameters:
c -
Returns:
boolean

iterator

public java.util.Iterator iterator()
Giving standard iterator of the clique

Returns:
Iterator

isEmpty

public boolean isEmpty()
Whether or not the clique is empty

Returns:
boolean

toArray

public Node[] toArray()
Give the nodes in an array

Returns:
BBNNode[]

clear

public void clear()
Empties the clique


hashCode

public int hashCode()
Standard Hash Code. It's really hashset's code

Overrides:
hashCode in class Node
See Also:
Object.hashCode()

equals

public boolean equals(java.lang.Object o)
Standard equality test: Two cliques are equal if their node set are equal.

Overrides:
equals in class Node
See Also:
Object.equals(Object)