Class StateAsNodeIDs<S>

  • All Implemented Interfaces:
    NodeIDs<S>

    public class StateAsNodeIDs<S>
    extends Object
    implements NodeIDs<S>
    • Constructor Detail

      • StateAsNodeIDs

        public StateAsNodeIDs​(StateIDs<S> stateIds)
    • Method Detail

      • getNodeId

        public int getNodeId​(S node)
        Description copied from interface: NodeIDs
        Returns for a given node of the graph an integer uniquely identifying the node. The returned ids should be within the range of the number of states of the graph so that they can be used for array-based indexing.
        Specified by:
        getNodeId in interface NodeIDs<S>
        Parameters:
        node - the node whose id should be retrieved
        Returns:
        the (positive) id of the given graph node.
      • getNode

        public S getNode​(int id)
        Description copied from interface: NodeIDs
        Return for a given id the node of the graph identified by it.
        Specified by:
        getNode in interface NodeIDs<S>
        Parameters:
        id - the id of the node to be returned
        Returns:
        the graph node identified by the given id.