java.lang.Object
simula.runtime.RTS_Ranking
- Direct Known Subclasses:
RTS_EVENT_NOTICE
Utility class Ranking.
This is an implementation of a balanced tree used to support the sequencing set in class Simulation.
Link to GitHub: Source File.
- Author:
- Øystein Myhre Andersen
-
Field Summary
Modifier and TypeFieldDescription(package private) RTS_Ranking
Back link.(package private) RTS_Ranking
Left link.(package private) RTS_Ranking
Right link.(package private) double
The ranking value. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) static void
CLEAR
(RTS_Ranking head) Clear the Ranking tree.(package private) static boolean
EMPTY
(RTS_Ranking head) Check if the Ranking tree is empty.(package private) static RTS_Ranking
FIRST
(RTS_Ranking head) Returns the first element of the ranking tree.(package private) static void
FOLLOW
(RTS_Ranking ins, RTS_Ranking prd) Insert 'ins' following 'prd'.(package private) static void
INTO
(RTS_Ranking ins, RTS_Ranking head, double rnk) Insert 'ins' intp the ranking tree acording to the ranking value.(package private) static void
INTO_PRIOR
(RTS_Ranking ins, RTS_Ranking head, double rnk) Insert 'ins' into the ranking tree acording to the ranking value with priority.(package private) static RTS_Ranking
LAST
(RTS_Ranking head) Returns the last element of the ranking tree.(package private) static void
OUT
(RTS_Ranking ins) Remove 'ins' from the ranking tree.(package private) static void
PRECEDE
(RTS_Ranking ins, RTS_Ranking suc) Insert 'ins' preceding 'suc'.(package private) static RTS_Ranking
PRED
(RTS_Ranking ins) Returns the predecessor of the given instance.(package private) static RTS_Ranking
SUC
(RTS_Ranking ins) Returns the successor of the given instance.
-
Field Details
-
bl
RTS_Ranking blBack link. -
ll
RTS_Ranking llLeft link. -
rl
RTS_Ranking rlRight link. -
rnk
double rnkThe ranking value.
-
-
Constructor Details
-
RTS_Ranking
RTS_Ranking()Default Constructor.
-
-
Method Details
-
PRED
Returns the predecessor of the given instance.- Parameters:
ins
- the given instance- Returns:
- pred the predecessor of the given instance.
-
SUC
Returns the successor of the given instance.- Parameters:
ins
- the given instance- Returns:
- suc the successor of the given instance.
-
CLEAR
Clear the Ranking tree.- Parameters:
head
- the head of the tree
-
EMPTY
Check if the Ranking tree is empty.- Parameters:
head
- the head of the tree- Returns:
- true if the Ranking tree is empty, otherwise false
-
FIRST
Returns the first element of the ranking tree.- Parameters:
head
- the head of the tree- Returns:
- the first element of the ranking tree
-
LAST
Returns the last element of the ranking tree.- Parameters:
head
- the head of the tree- Returns:
- the last element of the ranking tree
-
FOLLOW
Insert 'ins' following 'prd'.- Parameters:
ins
- argumentprd
- argument
-
OUT
Remove 'ins' from the ranking tree.- Parameters:
ins
- argument
-
INTO
Insert 'ins' intp the ranking tree acording to the ranking value.- Parameters:
ins
- argumenthead
- the head of the treernk
- the ranking value
-
PRECEDE
Insert 'ins' preceding 'suc'.- Parameters:
ins
- argumentsuc
- argument
-
INTO_PRIOR
Insert 'ins' into the ranking tree acording to the ranking value with priority.- Parameters:
ins
- argumenthead
- the head of the treernk
- the ranking value
-