|
GraphLab Project | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgraphlab.library.BaseEdge<VertexType>
public class BaseEdge<VertexType extends BaseVertex>
The base class for all edges. By default each vertex has two integer properties, color and weight.
Field Summary | |
---|---|
protected BaseEdgeProperties |
prop
|
VertexType |
source
|
VertexType |
target
|
Constructor Summary | |
---|---|
BaseEdge(VertexType source,
VertexType target)
|
|
BaseEdge(VertexType source,
VertexType target,
BaseEdgeProperties prop)
|
Method Summary | |
---|---|
int |
compareTo(BaseEdge<VertexType> o)
Compares two edges according to their wrights. |
int |
getColor()
Returns the color of the edge. |
BaseEdge |
getCopy(VertexType v1,
VertexType v2)
|
boolean |
getMark()
Returns the mark of the edge. |
BaseEdgeProperties |
getProp()
Returns property object for this edge. |
int |
getWeight()
Returns the weight of the edge. |
void |
setColor(int color)
Sets the color of the edge. |
void |
setMark(boolean m)
Sets the mark of the edge. |
void |
setProp(BaseEdgeProperties prop)
Sets properties object for this edge; Overwrites the existing. |
void |
setWeight(int weight)
Sets the weight of the edge. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected BaseEdgeProperties prop
public final VertexType extends BaseVertex source
public final VertexType extends BaseVertex target
Constructor Detail |
---|
public BaseEdge(VertexType source, VertexType target)
public BaseEdge(VertexType source, VertexType target, BaseEdgeProperties prop)
Method Detail |
---|
public BaseEdge getCopy(VertexType v1, VertexType v2)
public int getColor()
public void setColor(int color)
color
- Sets col as the color of the edge.public int getWeight()
public void setWeight(int weight)
weight
- Sets w as the color of the edge.public boolean getMark()
public void setMark(boolean m)
m
- Sets m as the mark of the edge.public void setProp(BaseEdgeProperties prop)
prop
- The property object to set.public BaseEdgeProperties getProp()
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(BaseEdge<VertexType> o)
compareTo
in interface java.lang.Comparable<BaseEdge<VertexType extends BaseVertex>>
o
- Edge to compare.
|
GraphLab Project | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |