This file contains 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
import breeze.linalg._ | |
import breeze.numerics._ | |
import breeze.optimize.DiffFunction | |
abstract class LineSearch extends Log { | |
case class Bracket( | |
t : Double, // 1d line search parameter | |
dd : Double, // Directional Derivative at t | |
fval : Double // Function value at t |
This file contains 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
trait Action { | |
// ... | |
def instantiate(inventory: ResourceMap[Resource], units: Iterable[Unit]):ActionMachine | |
} | |
class BuildAction(tpe: UnitType) extends AwesomeAction { | |
def instantiate(inventory: ResourceMap[Resource], units: Iterable[Unit]):ActionMachine = new ActionMachine { |