Class Metrics


  • public class Metrics
    extends java.lang.Object
    This class defines all the parameters needed to understand how well the tree search exploration is doing
    Author:
    Alessandro Buldini, Alessandro Pomponio, Federico Zanini
    See Also:
    Aima Java
    • Constructor Summary

      Constructors 
      Constructor Description
      Metrics()
      Basic constructor that sets both nodeExpanded and currDepthLimit
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getCurrDepthLimit()
      Returns the variable currDepthLimit
      int getNodesExpanded()
      Returns the variable nodesExpanded
      void setCurrDepthLimit​(int currDepthLimit)
      Sets the variable currDepthLimit to the value passed as input
      void setNodesExpanded​(int nodesExpanded)
      Sets the variable nodesExpanded to the value passed as input
      void updateMetrics​(int depth)
      Function that needs to be invoked every time a new node is explored
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Metrics

        public Metrics()
        Basic constructor that sets both nodeExpanded and currDepthLimit
    • Method Detail

      • getNodesExpanded

        public int getNodesExpanded()
        Returns the variable nodesExpanded
        Returns:
        the variable nodesExpanded
      • setNodesExpanded

        public void setNodesExpanded​(int nodesExpanded)
        Sets the variable nodesExpanded to the value passed as input
        Parameters:
        nodesExpanded - value to be set within the class
      • getCurrDepthLimit

        public int getCurrDepthLimit()
        Returns the variable currDepthLimit
        Returns:
        the variable currDepthLimit
      • setCurrDepthLimit

        public void setCurrDepthLimit​(int currDepthLimit)
        Sets the variable currDepthLimit to the value passed as input
        Parameters:
        currDepthLimit - value to be set within the class
      • updateMetrics

        public void updateMetrics​(int depth)
        Function that needs to be invoked every time a new node is explored
        Parameters:
        depth - current depth within the search algorithm