|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectJaCoP.constraints.netflow.simplex.Arc
public final class Arc
A directed, residual arc in the graph.
| Field Summary | |
|---|---|
int |
capacity
The unused (i.e. |
ArcCompanion |
companion
The arc companion for constraint API. |
int |
cost
The cost of the Arc cost |
boolean |
forward
whether this arc is a forward arc or a residual arc |
Node |
head
The head of the arc (where the arc points to). |
int |
index
Index in lower arcs array |
Arc |
sister
The flow of an arc is the residual capacity of its sister arc. |
| Constructor Summary | |
|---|---|
Arc(Node tail,
Node head)
Special constructor to create artificial arcs. |
|
Arc(Node tail,
Node head,
int cost,
int lowerCapacity,
int upperCapacity)
General constructor to create arcs. |
|
| Method Summary | |
|---|---|
void |
addFlow(int delta)
|
void |
clear()
Clears an artificial arc |
ArcCompanion |
getCompanion()
|
boolean |
hasCompanion()
|
boolean |
isInCut(boolean forward)
|
long |
longCost()
|
java.lang.String |
name()
|
int |
reducedCost()
Computes the cost of this arc considering node potentials. |
void |
set(int newCost,
int newCapacity)
Initializes an artificial arc |
Node |
tail()
|
java.lang.String |
toFlow()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final Node head
public int cost
public int capacity
public final Arc sister
public int index
public ArcCompanion companion
public boolean forward
| Constructor Detail |
|---|
public Arc(Node tail,
Node head)
tail - tail of the archead - head of the arc
public Arc(Node tail,
Node head,
int cost,
int lowerCapacity,
int upperCapacity)
tail - tail of the archead - head of the arccost - cost-per-unit of the arclowerCapacity - lower capacity of the arcupperCapacity - upper capacity of the arc| Method Detail |
|---|
public int reducedCost()
public void addFlow(int delta)
public Node tail()
public boolean isInCut(boolean forward)
public void set(int newCost,
int newCapacity)
newCost - newCapacity - public void clear()
public long longCost()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toFlow()
public boolean hasCompanion()
public ArcCompanion getCompanion()
public java.lang.String name()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||