[Dune-devel] [Dune-Commit] [Commit] dune-istl - 1ede1c9: Cleanup: don't hand-implement binary search -- use std::lower_bound instead

Oliver Sander sander at igpm.rwth-aachen.de
Wed Jul 3 16:50:11 CEST 2013


> std::find does not assume that the container is sorted, and consequently
> does a linear sort.

s/sort/search/

OTOH, std::lower_bound is O(log n) on a random
> access container.
>
> Best,
> Oliver
>
> _______________________________________________
> Dune-devel mailing list
> Dune-devel at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-devel





More information about the Dune-devel mailing list