-
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 #446 from p2t2/DEV3.1.0
Dev3.1.0
- Loading branch information
Showing
161 changed files
with
19,933 additions
and
4,157 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
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=3.0.0.0 | ||
version=3.1.0.0 |
40 changes: 40 additions & 0 deletions
40
Figaro/src/main/scala/com/cra/figaro/algorithm/Online.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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Online.scala | ||
* Online algorithms. | ||
* | ||
* Created By: Michael Howard | ||
* Creation Date: Mar 13, 2015 | ||
* | ||
* 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.online | ||
|
||
import com.cra.figaro.algorithm.Algorithm | ||
import com.cra.figaro.language.NamedEvidence | ||
import com.cra.figaro.language.Universe | ||
|
||
|
||
/** | ||
* The general class of online algorithms. An online algorithm is provided with an initial model, | ||
* represented by a universe encoding the probability distribution over the initial state, | ||
* and a transition model, which produces a universe encoding the probability distribution | ||
* over the new state. An implementation of Online must implement the update method. | ||
* | ||
* Querying and asserting evidence to a online algorithm are done using references. This is because references are stable over time, | ||
* while the particular elements they refer to are not. | ||
* | ||
*/ | ||
abstract trait Online extends Algorithm { | ||
|
||
/** | ||
* Update the algorithm, conditioning on the new evidence | ||
*/ | ||
def update(evidence: Seq[NamedEvidence[_]]=Seq()): Unit | ||
val initial: Universe | ||
val transition: Function0[Universe] | ||
|
||
} |
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.