Package jline.api.sn

Class SnSetRoutingKt

    • Constructor Detail

    • 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 rt matrix in the NetworkStruct. The routing matrix is indexed as (fromStateful * nclasses + fromClass, toStateful * nclasses + toClass).

        Parameters:
        sn - NetworkStruct to modify
        fromStateful - 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, 1
        mode - IN_PLACE modifies sn directly, COPY returns a modified copy
        validation - Validation level to apply
        autoRefresh - 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 rt matrix in the NetworkStruct. The matrix should be of size (nstateful * nclasses) x (nstateful * nclasses).

        Parameters:
        sn - NetworkStruct to modify
        rt - New routing matrix
        mode - IN_PLACE modifies sn directly, COPY returns a modified copy
        validation - Validation level to apply
        autoRefresh - 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 rtnodes matrix in the NetworkStruct. The matrix should be of size (nnodes * nclasses) x (nnodes * nclasses).

        Parameters:
        sn - NetworkStruct to modify
        rtnodes - New node routing matrix
        mode - IN_PLACE modifies sn directly, COPY returns a modified copy
        validation - Validation level to apply
        autoRefresh - If true, refresh visit ratios after modification
        Returns:

        Modified NetworkStruct