Package jline.api.sn
Class SnSetRoutingKt
-
- All Implemented Interfaces:
public final class SnSetRoutingKt
-
-
Method Summary
Modifier and Type Method Description final static NetworkStructsnSetRoutingProb(NetworkStruct sn, Integer fromStateful, Integer fromClass, Integer toStateful, Integer toClass, Double probability, ModifyMode mode, ValidationLevel validation, Boolean autoRefresh)Sets a routing probability between two stateful node-class pairs. final static NetworkStructsnSetRoutingMatrix(NetworkStruct sn, Matrix rt, ModifyMode mode, ValidationLevel validation, Boolean autoRefresh)Sets the entire routing matrix for stateful nodes. final static NetworkStructsnSetRoutingNodesMatrix(NetworkStruct sn, Matrix rtnodes, ModifyMode mode, ValidationLevel validation, Boolean autoRefresh)Sets the entire routing matrix for all nodes. -
-
Method Detail
-
snSetRoutingProb
final static NetworkStruct snSetRoutingProb(NetworkStruct sn, Integer fromStateful, Integer fromClass, Integer toStateful, Integer toClass, Double probability, ModifyMode mode, ValidationLevel validation, Boolean autoRefresh)
Sets a routing probability between two stateful node-class pairs.
Updates the
rtmatrix in the NetworkStruct. The routing matrix is indexed as (fromStateful * nclasses + fromClass, toStateful * nclasses + toClass).- Parameters:
sn- NetworkStruct to modifyfromStateful- Source stateful node index (0-based)fromClass- Source class index (0-based)toStateful- Destination stateful node index (0-based)toClass- Destination class index (0-based)probability- Routing probability 0, 1mode- IN_PLACE modifies sn directly, COPY returns a modified copyvalidation- Validation level to applyautoRefresh- If true, refresh visit ratios after modification- Returns:
Modified NetworkStruct
-
snSetRoutingMatrix
final static NetworkStruct snSetRoutingMatrix(NetworkStruct sn, Matrix rt, ModifyMode mode, ValidationLevel validation, Boolean autoRefresh)
Sets the entire routing matrix for stateful nodes.
Replaces the
rtmatrix in the NetworkStruct. The matrix should be of size (nstateful * nclasses) x (nstateful * nclasses).- Parameters:
sn- NetworkStruct to modifyrt- New routing matrixmode- IN_PLACE modifies sn directly, COPY returns a modified copyvalidation- Validation level to applyautoRefresh- If true, refresh visit ratios after modification- Returns:
Modified NetworkStruct
-
snSetRoutingNodesMatrix
final static NetworkStruct snSetRoutingNodesMatrix(NetworkStruct sn, Matrix rtnodes, ModifyMode mode, ValidationLevel validation, Boolean autoRefresh)
Sets the entire routing matrix for all nodes.
Replaces the
rtnodesmatrix in the NetworkStruct. The matrix should be of size (nnodes * nclasses) x (nnodes * nclasses).- Parameters:
sn- NetworkStruct to modifyrtnodes- New node routing matrixmode- IN_PLACE modifies sn directly, COPY returns a modified copyvalidation- Validation level to applyautoRefresh- If true, refresh visit ratios after modification- Returns:
Modified NetworkStruct
-
-
-
-