|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.aitools.iv.graphdrawing.datastructures.NodeReference
de.aitools.iv.graphdrawing.datastructures.graph.Vertex
public class Vertex
A realy fast implementation of a vertex.
Each Vertex has in- and outgoing edges, a label, an id, a type and an attachment.
Field Summary | |
---|---|
int |
count
|
int |
id
|
int |
type
|
boolean |
visited
|
double |
weight
|
Fields inherited from class de.aitools.iv.graphdrawing.datastructures.NodeReference |
---|
myNode |
Constructor Summary | |
---|---|
Vertex()
|
|
Vertex(java.lang.String label,
int id)
creates a new Vertex with the given label and id. |
|
Vertex(java.lang.String label,
int id,
int type)
creates a new Vertex with the given label, id and type. |
Method Summary | |
---|---|
java.util.Iterator |
adjacentVertexIterator()
|
Vertex |
copy()
creates a vertex with the same label, id, type and position as the current vertex. All edges, the attachment and the xmlSource are NOT copied to the new created vertex. |
java.lang.Object |
getAttachment()
gets the attachment for this vertex |
int |
getCount()
|
int |
getId()
|
java.lang.String |
getLabel()
|
double |
getSumOfOutgoingEdgeWeights()
|
int |
getType()
|
double |
getWeight()
|
java.lang.Object |
getXMLSource()
gets the xml source of this vertex, if available (can be null). |
java.util.Iterator |
incidentEdgeIterator()
|
java.util.Iterator |
incomingEdgeIterator()
|
int |
indeg()
|
int |
outdeg()
|
java.util.Iterator |
outgoingEdgeIterator()
|
void |
readExternal(java.io.ObjectInput in)
|
void |
setAttachment(java.lang.Object obj)
sets the attachment for this vertex |
void |
setCount(int count)
|
void |
setId(int id)
sets the identification number |
void |
setLabel(java.lang.String label)
Sets the label of this vertex |
void |
setType(int typeId)
Sets the type of this vertex. |
void |
setWeight(double weight)
|
void |
setXMLSource(java.lang.Object value)
sets the xml source of this vertex to value |
java.lang.String |
toString()
only for debugging purposes |
void |
writeExternal(java.io.ObjectOutput out)
|
Methods inherited from class de.aitools.iv.graphdrawing.datastructures.NodeReference |
---|
getNode, setNode |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public boolean visited
public int id
public int type
public double weight
public int count
Constructor Detail |
---|
public Vertex()
public Vertex(java.lang.String label, int id)
label
- - the label of the vertex.id
- - the id of the vertex.public Vertex(java.lang.String label, int id, int type)
label
- - the label of the vertex.id
- - the id of the vertex.type
- - the type of the vertex.Method Detail |
---|
public int getCount()
public void setCount(int count)
count
- The count to set.public double getWeight()
public void setWeight(double weight)
weight
- The weight to set.public Vertex copy()
public java.lang.String getLabel()
public void setLabel(java.lang.String label)
public int getId()
public void setId(int id)
public int getType()
public void setType(int typeId)
public java.lang.Object getAttachment()
Object
that was attached to this vertex. Can be null
.public void setAttachment(java.lang.Object obj)
obj
- - the Object
to be attached. Can be null
.public java.lang.Object getXMLSource()
Object
that was the source of this vertexpublic void setXMLSource(java.lang.Object value)
value
value
- - the Object
to be stored.public int indeg()
public int outdeg()
public double getSumOfOutgoingEdgeWeights()
public java.util.Iterator incidentEdgeIterator()
public java.util.Iterator outgoingEdgeIterator()
public java.util.Iterator incomingEdgeIterator()
public java.util.Iterator adjacentVertexIterator()
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |