public class ConstantDirectionalEdgeValueTransformer<V,E>
extends java.lang.Object
implements org.apache.commons.collections4.Transformer<edu.uci.ics.jung.graph.util.Context<edu.uci.ics.jung.graph.Graph<V,E>,E>,java.lang.Number>
Modifier and Type | Field and Description |
---|---|
protected java.lang.Double |
directed_value |
protected java.lang.Double |
undirected_value |
Constructor and Description |
---|
ConstantDirectionalEdgeValueTransformer(double undirected,
double directed) |
Modifier and Type | Method and Description |
---|---|
void |
setDirectedValue(double value)
Sets the value returned for directed edges to
value . |
void |
setUndirectedValue(double value)
Sets the value returned for undirected edges to
value . |
java.lang.Number |
transform(edu.uci.ics.jung.graph.util.Context<edu.uci.ics.jung.graph.Graph<V,E>,E> context) |
protected java.lang.Double undirected_value
protected java.lang.Double directed_value
public ConstantDirectionalEdgeValueTransformer(double undirected, double directed)
undirected
- directed
- public java.lang.Number transform(edu.uci.ics.jung.graph.util.Context<edu.uci.ics.jung.graph.Graph<V,E>,E> context)
public void setUndirectedValue(double value)
value
.value
- the new value to return for undirected edgespublic void setDirectedValue(double value)
value
.value
- the new value to return for directed edges