Guest User

Untitled

a guest
Feb 24th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. @Inject BinarySearchSolver solver;
  2.  
  3. ...
  4.  
  5. Function<Double, Affordability> affordabilityFn ...; // our mapping function that takes a number and returns an affordability
  6.  
  7. Function<Affordability, Boolean> manageableTargetTest = affordability -> affordability.getOrdinal() <= MANAGEABLE.getOrdinal();
  8.  
  9. double maxManageablePrice = solver.solveForMaxValuePassingTargetTest(
  10. lowerBound,
  11. upperBound,
  12. tolerance, // how close our upper and lower bounds should be to stop searching
  13. affordabilityFn,
  14. manageableTargetTest,
  15. maxSearchIterations);
Add Comment
Please, Sign In to add comment