mirror of
https://github.com/furyfire/trueskill.git
synced 2025-01-16 01:47:39 +00:00
Removed some old debugging vestiges of _CreatedVariables from the variable factories
This commit is contained in:
@ -43,7 +43,7 @@ namespace Moserware.Skills.FactorGraphs
|
||||
|
||||
public class KeyedVariable<TKey, TValue> : Variable<TValue>
|
||||
{
|
||||
public KeyedVariable(TKey key, string name, VariableFactory<TValue> parentFactory, int parentIndex, TValue prior)
|
||||
public KeyedVariable(TKey key, string name, TValue prior)
|
||||
: base(name, prior)
|
||||
{
|
||||
Key = key;
|
||||
|
@ -6,7 +6,6 @@ namespace Moserware.Skills.FactorGraphs
|
||||
public class VariableFactory<TValue>
|
||||
{
|
||||
// using a Func<TValue> to encourage fresh copies in case it's overwritten
|
||||
private readonly List<Variable<TValue>> _CreatedVariables = new List<Variable<TValue>>();
|
||||
private readonly Func<TValue> _VariablePriorInitializer;
|
||||
|
||||
public VariableFactory(Func<TValue> variablePriorInitializer)
|
||||
@ -20,7 +19,6 @@ namespace Moserware.Skills.FactorGraphs
|
||||
String.Format(nameFormat, args),
|
||||
_VariablePriorInitializer());
|
||||
|
||||
_CreatedVariables.Add(newVar);
|
||||
return newVar;
|
||||
}
|
||||
|
||||
@ -28,12 +26,9 @@ namespace Moserware.Skills.FactorGraphs
|
||||
{
|
||||
var newVar = new KeyedVariable<TKey, TValue>(
|
||||
key,
|
||||
String.Format(nameFormat, args),
|
||||
this,
|
||||
_CreatedVariables.Count,
|
||||
String.Format(nameFormat, args),
|
||||
_VariablePriorInitializer());
|
||||
|
||||
_CreatedVariables.Add(newVar);
|
||||
|
||||
return newVar;
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user