package Ġorg . ev om aster . core . search . algorithms . on em ax Ċ Ċ import Ġcom . google . inject . Inject Ċ import Ġorg . ev om aster . core . search . Evalu ated Individual Ċ import Ġorg . ev om aster . core . search . Fitness Value Ċ import Ġorg . ev om aster . core . search . service . Fitness Function Ċ import Ġorg . ev om aster . core . search . tracer . Trace ableElement Copy Filter ĊĊ Ċ class ĠOne Max Fitness Ġ: ĠF itness Function < One Max Individual >() Ġ{ ĊĊĠĠĠ Ġ@ Inject ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġsampler : ĠOne Max Sampler ĊĊĠĠĠ Ġoverride Ġfun Ġdo Calculate Coverage ( individual : ĠOne Max Individual ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ: ĠEvalu ated Individual < One Max Individual >? Ġ{ ĊĊĠĠĠĠĠĠĠ Ġval Ġfv Ġ= ĠF itness Value ( individual . size (). toDouble ()) ĊĊĠĠĠĠĠĠĠ Ġ( 0 Ġuntil Ġindividual . n ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. forEach Ġ{ Ġfv . update Target ( it , Ġindividual . getValue ( it )) Ġ} ĊĊĠĠĠĠĠĠĠ Ġreturn ĠEvalu ated Individual ( fv , Ġindividual . copy ( if (! config . enable Track Individual ) ĠTrace ableElement Copy Filter . NONE Ġelse ĠTrace ableElement Copy Filter . WITH _ TRACK ) Ġas ĠOne Max Individual , ĠlistOf (), Ġenable Tracking Ġ= Ġconfig . enable Track Evalu ated Individual , Ġtrack Operator Ġ= Ġif ( config . enable Track Evalu ated Individual ) Ġsampler Ġelse Ġnull , Ġenable Impact Ġ= Ġ( config . prob Of Archive Mutation Ġ> Ġ 0 . 0 )) ĊĠĠĠ Ġ} Ċ }