Package jline.api.sn
Class SnSetPriorityKt
-
- All Implemented Interfaces:
public final class SnSetPriorityKt
-
-
Method Summary
Modifier and Type Method Description final static NetworkStructsnSetPriority(NetworkStruct sn, Integer classIdx, Double priority, ModifyMode mode, ValidationLevel validation)Sets the priority for a class. final static NetworkStructsnSetPriorityBatch(NetworkStruct sn, Matrix priorities, ModifyMode mode, ValidationLevel validation)Sets priorities for multiple classes in a single operation. -
-
Method Detail
-
snSetPriority
final static NetworkStruct snSetPriority(NetworkStruct sn, Integer classIdx, Double priority, ModifyMode mode, ValidationLevel validation)
Sets the priority for a class.
Updates the
classpriomatrix in the NetworkStruct. Lower priority values typically indicate higher priority (depends on scheduler).- Parameters:
sn- NetworkStruct to modifyclassIdx- Class index (0-based)priority- Priority valuemode- IN_PLACE modifies sn directly, COPY returns a modified copyvalidation- Validation level to apply- Returns:
Modified NetworkStruct
-
snSetPriorityBatch
final static NetworkStruct snSetPriorityBatch(NetworkStruct sn, Matrix priorities, ModifyMode mode, ValidationLevel validation)
Sets priorities for multiple classes in a single operation.
More efficient than calling snSetPriority multiple times. NaN values in the priorities matrix are skipped (not updated).
- Parameters:
sn- NetworkStruct to modifypriorities- Matrix of new priorities (1 x nclasses or nclasses x 1) - NaN values are skippedmode- IN_PLACE modifies sn directly, COPY returns a modified copyvalidation- Validation level to apply- Returns:
Modified NetworkStruct
-
-
-
-