Some minor documentation cleanup (e.g. converted C# comments to PHPDocumentor comments)

This commit is contained in:
Jeff Moser
2010-10-08 21:44:36 -04:00
parent f863e150d4
commit d2fc7dc5c7
22 changed files with 174 additions and 159 deletions

View File

@ -23,13 +23,17 @@ abstract class Factor
$this->_messageToVariableBinding = new HashMap();
}
/// Returns the log-normalization constant of that factor
/**
* @return The log-normalization constant of that factor
*/
public function getLogNormalization()
{
return 0;
}
/// Returns the number of messages that the factor has
/**
* @return The number of messages that the factor has
*/
public function getNumberOfMessages()
{
return count($this->_messages);
@ -45,7 +49,9 @@ abstract class Factor
return $this->_messages;
}
/// Update the message and marginal of the i-th variable that the factor is connected to
/**
* Update the message and marginal of the i-th variable that the factor is connected to
*/
public function updateMessageIndex($messageIndex)
{
Guard::argumentIsValidIndex($messageIndex, count($this->_messages), "messageIndex");
@ -59,7 +65,9 @@ abstract class Factor
throw new Exception();
}
/// Resets the marginal of the variables a factor is connected to
/**
* Resets the marginal of the variables a factor is connected to
*/
public function resetMarginals()
{
$allValues = &$this->_messageToVariableBinding->getAllValues();
@ -69,7 +77,9 @@ abstract class Factor
}
}
/// Sends the ith message to the marginal and returns the log-normalization constant
/**
* Sends the ith message to the marginal and returns the log-normalization constant
*/
public function sendMessageIndex($messageIndex)
{
Guard::argumentIsValidIndex($messageIndex, count($this->_messages), "messageIndex");

View File

@ -4,9 +4,9 @@ namespace Moserware\Skills\FactorGraphs;
require_once(dirname(__FILE__) . "/Factor.php");
/// <summary>
/// Helper class for computing the factor graph's normalization constant.
/// </summary>
/**
* Helper class for computing the factor graph's normalization constant.
*/
class FactorList
{
private $_list = array();