public class WeightedEdge extends GraphEdge implements Weightable
DEPENDENCY_EDGE, PHRASE_STRUCTURE_EDGE, SECONDARY_EDGE
Constructor and Description |
---|
WeightedEdge() |
WeightedEdge(Node source,
Node target,
int type) |
WeightedEdge(Node source,
Node target,
int type,
java.lang.Double weight) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Resets the graph element.
|
int |
compareTo(WeightedEdge that) |
boolean |
equals(java.lang.Object obj) |
double |
getWeight() |
int |
hashCode() |
void |
setWeight(double weight) |
java.lang.String |
toString() |
compareTo, getSource, getTarget, getType, setEdge
addLabel, addLabel, addLabel, compareTo, getBelongsToGraph, getLabelCode, getLabelSet, getLabelSymbol, getLabelTypes, hasLabel, isLabeled, nLabels, removeLabel, removeLabels, setBelongsToGraph
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addLabel, addLabel, addLabel, getBelongsToGraph, getLabelCode, getLabelSet, getLabelSymbol, getLabelTypes, hasLabel, isLabeled, nLabels, removeLabel, removeLabels, setBelongsToGraph
public WeightedEdge()
public WeightedEdge(Node source, Node target, int type) throws MaltChainedException
MaltChainedException
public WeightedEdge(Node source, Node target, int type, java.lang.Double weight) throws MaltChainedException
MaltChainedException
public void clear() throws MaltChainedException
GraphElement
clear
in interface Element
clear
in class GraphEdge
MaltChainedException
public double getWeight()
getWeight
in interface Weightable
public void setWeight(double weight)
setWeight
in interface Weightable
public int compareTo(WeightedEdge that)
Copyright 2007-2017 Johan Hall, Jens Nilsson and Joakim Nivre.