-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #369 from p2t2/DEV3.0.0
Dev3.0.0
- Loading branch information
Showing
169 changed files
with
11,656 additions
and
9,149 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,4 @@ project/plugins/project/ | |
.cache | ||
.classpath | ||
.project | ||
/bin/ |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
version=2.5.0.0 | ||
version=3.0.0.0 |
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
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
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
42 changes: 33 additions & 9 deletions
42
Figaro/src/main/scala/com/cra/figaro/algorithm/LazyAlgorithm.scala
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,54 @@ | ||
/* | ||
* LazyAlgorithm.scala | ||
* Lazy algorithms. | ||
* | ||
* | ||
* Created By: Avi Pfeffer (apfeffer@cra.com) | ||
* Creation Date: Dec 28, 2013 | ||
* | ||
* | ||
* Copyright 2013 Avrom J. Pfeffer and Charles River Analytics, Inc. | ||
* See http://www.cra.com or email figaro@cra.com for information. | ||
* | ||
* | ||
* See http://www.github.com/p2t2/figaro for a copy of the software license. | ||
*/ | ||
|
||
package com.cra.figaro.algorithm | ||
|
||
/** | ||
* A lazy algorithm is an algorithm that can be run to increasing depths. | ||
*/ | ||
trait LazyAlgorithm extends Algorithm { | ||
/** | ||
* The current depth to which the algorithm should be run. | ||
*/ | ||
var depth = 0 | ||
|
||
|
||
/** | ||
* Run the algorithm to the given depth. | ||
*/ | ||
def run(depth: Int): Unit | ||
|
||
|
||
/** | ||
* Start the algorithm. This will run the algorithm to one depth. | ||
*/ | ||
def doStart() { pump() } | ||
|
||
|
||
/** | ||
* Increase the depth and run the algorithm again. | ||
*/ | ||
def pump() { depth += 1; run(depth) } | ||
|
||
|
||
/** | ||
* Stop the algorithm. | ||
*/ | ||
def doStop() { } | ||
|
||
|
||
/** | ||
* Resume the algorithm by increasing the depth and running again. | ||
*/ | ||
def doResume() { pump() } | ||
|
||
|
||
/** | ||
* Kill the algorithm. | ||
*/ | ||
def doKill() { depth = -1 } | ||
} |
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
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
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
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
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
Oops, something went wrong.