public Activated highestActivatedTerm ( ) { Activated maximumTerm = null ; double maximumActivation = Double . POSITIVE_INFINITY ; for ( Activated activated : terms ) { if ( Op . isGt ( activated . getDegree ( ) , maximumActivation ) ) { maximumActivation = activated . getDegree ( ) ; maximumTerm = activated ; } } return maximumTerm ; }
Iterates over the Activated terms to find the term with the maximum activation degree