public Op . Pair < Double , Term > highestMembership ( double x ) { Op . Pair < Double , Term > result = new Op . Pair < Double , Term > ( 0.0 , null ) ; for ( Term term : terms ) { double y = term . membership ( x ) ; if ( Op . isGt ( y , result . getFirst ( ) ) ) { result . setFirst ( y ) ; result . setSecond ( term ) ; } } return result ; }
Gets the term which has the highest membership function value for