Package org.goplanit.assignment.ltm.sltm
Class BushFlowLabel
- java.lang.Object
-
- org.goplanit.assignment.ltm.sltm.BushFlowLabel
-
- All Implemented Interfaces:
Comparable<BushFlowLabel>
public class BushFlowLabel extends Object implements Comparable<BushFlowLabel>
Label that track a unique composition of flow along an edge of a bush acyclic directed graph. In addition to the label itself it also carries information regarding its predecessor (if any). Predecessor composition labels are other flow compositions upstream of this composition that (partly) split off flow of this composition label at diverges, resulting in a non-zero splitting rate between the two labels at this diverge.- Author:
- markr
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BushFlowLabel(BushFlowLabel other)
Copy constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(BushFlowLabel o)
static BushFlowLabel
create(IdGroupingToken idToken)
Create a new flow composition label for this bushstatic BushFlowLabel
create(IdGroupingToken idToken, String name)
Create a new flow composition label for this bushboolean
equals(Object o)
protected static long
generateId(IdGroupingToken idToken)
Generate idlong
getLabelId()
The unique label id within its contextint
hashCode()
String
toString()
-
-
-
Constructor Detail
-
BushFlowLabel
protected BushFlowLabel(BushFlowLabel other)
Copy constructor- Parameters:
other
- to copy
-
-
Method Detail
-
generateId
protected static final long generateId(IdGroupingToken idToken)
Generate id- Parameters:
idToken
- to use- Returns:
- the generated id
-
getLabelId
public long getLabelId()
The unique label id within its context- Returns:
- the label id
-
compareTo
public int compareTo(BushFlowLabel o)
- Specified by:
compareTo
in interfaceComparable<BushFlowLabel>
-
create
public static BushFlowLabel create(IdGroupingToken idToken)
Create a new flow composition label for this bush- Parameters:
idToken
- to use- Returns:
- created label
-
create
public static BushFlowLabel create(IdGroupingToken idToken, String name)
Create a new flow composition label for this bush- Parameters:
idToken
- to usename
- of the label- Returns:
- created label
-
-