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 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)
|
: base(name, prior)
|
||||||
{
|
{
|
||||||
Key = key;
|
Key = key;
|
||||||
|
@ -6,7 +6,6 @@ namespace Moserware.Skills.FactorGraphs
|
|||||||
public class VariableFactory<TValue>
|
public class VariableFactory<TValue>
|
||||||
{
|
{
|
||||||
// using a Func<TValue> to encourage fresh copies in case it's overwritten
|
// 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;
|
private readonly Func<TValue> _VariablePriorInitializer;
|
||||||
|
|
||||||
public VariableFactory(Func<TValue> variablePriorInitializer)
|
public VariableFactory(Func<TValue> variablePriorInitializer)
|
||||||
@ -20,7 +19,6 @@ namespace Moserware.Skills.FactorGraphs
|
|||||||
String.Format(nameFormat, args),
|
String.Format(nameFormat, args),
|
||||||
_VariablePriorInitializer());
|
_VariablePriorInitializer());
|
||||||
|
|
||||||
_CreatedVariables.Add(newVar);
|
|
||||||
return newVar;
|
return newVar;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28,12 +26,9 @@ namespace Moserware.Skills.FactorGraphs
|
|||||||
{
|
{
|
||||||
var newVar = new KeyedVariable<TKey, TValue>(
|
var newVar = new KeyedVariable<TKey, TValue>(
|
||||||
key,
|
key,
|
||||||
String.Format(nameFormat, args),
|
String.Format(nameFormat, args),
|
||||||
this,
|
|
||||||
_CreatedVariables.Count,
|
|
||||||
_VariablePriorInitializer());
|
_VariablePriorInitializer());
|
||||||
|
|
||||||
_CreatedVariables.Add(newVar);
|
|
||||||
return 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