bicliqueviz
Class VertexObj

java.lang.Object
  extended by bicliqueviz.VertexObj

public class VertexObj
extends java.lang.Object

Class for representing the vertices in the graph

Author:
the1schwartz

Constructor Summary
VertexObj(java.lang.String n, int id, boolean a, java.awt.Color c, java.lang.String s)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.awt.Color getColor()
           
 int getCommunityVertexSize()
           
 int getID()
           
 java.lang.String getName()
           
 java.lang.Double getNodePercent(int i)
           
 int getNumOfCliqueOccurs()
           
 int getNumOfNodes()
           
 int getNumOfNodes(int i)
           
 java.lang.String getShape()
           
 int hashCode()
           
 boolean isVertexA()
           
 void setCliqueOccurs(int i)
           
 void setLowerPercent(java.lang.Double lp)
           
 void setNumOfLowerNodes(int n)
           
 void setNumOfUpperNodes(int n)
           
 void setUpperPercent(java.lang.Double up)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VertexObj

public VertexObj(java.lang.String n,
                 int id,
                 boolean a,
                 java.awt.Color c,
                 java.lang.String s)
Parameters:
n - name of vertex
id - id of vertex
a - true if the vertex is type A else false
c - colour of the vertex
s - string defining the shape of the vertex (can be SQUARE or TRIANGLE)
Method Detail

setUpperPercent

public void setUpperPercent(java.lang.Double up)
Parameters:
up - value for percentage of type A

setLowerPercent

public void setLowerPercent(java.lang.Double lp)
Parameters:
lp - value for persentage of type B

getNodePercent

public java.lang.Double getNodePercent(int i)
Parameters:
i - 0 for type A and 1 for type 1
Returns:
node percentage

setNumOfUpperNodes

public void setNumOfUpperNodes(int n)
Parameters:
n - number of type A nodes

setNumOfLowerNodes

public void setNumOfLowerNodes(int n)
Parameters:
n - number of type B nodes

getNumOfNodes

public int getNumOfNodes(int i)
Parameters:
i - 0 for type A and 1 for type 1
Returns:
number of nodes (type A or B)

getNumOfNodes

public int getNumOfNodes()
Returns:
number of total nodes

getCommunityVertexSize

public int getCommunityVertexSize()
Returns:
size scale of community (how big it should be drawn)

getShape

public java.lang.String getShape()
Returns:
the string defining the shape

getColor

public java.awt.Color getColor()
Returns:
the colour of the vertex

getName

public java.lang.String getName()
Returns:
the name of the vertex

getID

public int getID()
Returns:
the ID of the vertex

isVertexA

public boolean isVertexA()
Returns:
true if the vertex is of type A else false

setCliqueOccurs

public void setCliqueOccurs(int i)
Parameters:
i - number of clique occurences

getNumOfCliqueOccurs

public int getNumOfCliqueOccurs()
Returns:
the number of clique occurences

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toString

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