bicliqueviz
Class VertexObj
java.lang.Object
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)
|
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
VertexObj
public VertexObj(java.lang.String n,
int id,
boolean a,
java.awt.Color c,
java.lang.String s)
- Parameters:
n
- name of vertexid
- id of vertexa
- true if the vertex is type A else falsec
- colour of the vertexs
- string defining the shape of the vertex (can be SQUARE or TRIANGLE)
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