Package jason.stdlib

Class max

All Implemented Interfaces:
InternalAction, Serializable

public class max extends min

Internal action: .max.

Description: gets the maximum value within a list of terms, using the "natural" order for each type of term. Between different types of terms, the following order is used:
numbers < atoms < structures < lists

Parameters:

  • + list (list): the list where to find the maximum term.
  • +/- maximum (term).

Query version:

  • + term (variable or structure): the variable or structure whose instances will be used as max candidate.
  • + query (logical formula): the formula used to find values for the term
  • +/- result (term): the max value for the query.

Examples:

  • .max([c,a,b],X): X unifies with c.
  • .max([b,c,10,g,f(10),5,f(4)],X): X unifies with f(10).
  • .max([3,2,5],2]): false.
  • .max([3,2,5],5): true.
  • .max([],X): false.
  • .max(V, b(V), Max): unifies Max with the max V value for query b(V).
See Also:
  • Constructor Details

    • max

      public max()
  • Method Details