Created
November 26, 2020 05:57
-
-
Save sumew/d6e82bd566f676f7be2a7a5156b6e6d7 to your computer and use it in GitHub Desktop.
The state, holds the current window and the optimum (so far) window
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case class State[Container](current: Window, best: Window, contained: Container) { | |
def lastIndex(): Int = current.r | |
def firstIndex(): Int = current.l | |
override def toString = | |
s"current: [${current.l}, ${current.r}], best: [${best.l}, ${best.r}], excess: ${contained}" | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment