Package jline.api.sn
Class SnSetServersKt
-
- All Implemented Interfaces:
public final class SnSetServersKt
-
-
Method Summary
Modifier and Type Method Description final static NetworkStructsnSetServers(NetworkStruct sn, Integer stationIdx, Double nServers, ModifyMode mode, ValidationLevel validation)Sets the number of servers at a station. final static NetworkStructsnSetServersBatch(NetworkStruct sn, Matrix nServers, ModifyMode mode, ValidationLevel validation)Sets the number of servers for multiple stations in a single operation. -
-
Method Detail
-
snSetServers
final static NetworkStruct snSetServers(NetworkStruct sn, Integer stationIdx, Double nServers, ModifyMode mode, ValidationLevel validation)
Sets the number of servers at a station.
Updates the
nserversmatrix in the NetworkStruct.- Parameters:
sn- NetworkStruct to modifystationIdx- Station index (0-based)nServers- Number of servers (positive, or Double.mode- IN_PLACE modifies sn directly, COPY returns a modified copyvalidation- Validation level to apply- Returns:
Modified NetworkStruct
-
snSetServersBatch
final static NetworkStruct snSetServersBatch(NetworkStruct sn, Matrix nServers, ModifyMode mode, ValidationLevel validation)
Sets the number of servers for multiple stations in a single operation.
More efficient than calling snSetServers multiple times. NaN values in the nServers matrix are skipped (not updated).
- Parameters:
sn- NetworkStruct to modifynServers- Matrix of new server counts (nstations x 1) - NaN values are skippedmode- IN_PLACE modifies sn directly, COPY returns a modified copyvalidation- Validation level to apply- Returns:
Modified NetworkStruct
-
-
-
-