Removed some old debugging vestiges of _CreatedVariables from the variable factories

This commit is contained in:
Jeff Moser 2010-05-02 21:31:09 -04:00
parent 6a47da245f
commit 8c31881d13
6 changed files with 3 additions and 8 deletions

@ -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;
}
}