[poincare] VariableContext holds an Expression instead of a Float<T>

This commit is contained in:
Émilie Feral
2018-09-27 18:06:41 +02:00
parent 438968384c
commit ccbcf18811
8 changed files with 26 additions and 31 deletions

View File

@@ -8,7 +8,7 @@ namespace Sequence {
template<typename T>
CacheContext<T>::CacheContext(Context * parentContext) :
VariableContext<T>("n", parentContext),
VariableContext("n", parentContext),
m_values{{NAN, NAN},
{NAN, NAN}}
{
@@ -21,7 +21,7 @@ const Expression CacheContext<T>::expressionForSymbol(const Symbol & symbol) {
&& (strcmp(symbol.name()+1, "(n)") == 0 || strcmp(symbol.name()+1, "(n+1)") == 0)) {
return Float<T>(m_values[nameIndexForSymbol(symbol)][rankIndexForSymbol(symbol)]);
}
return VariableContext<T>::expressionForSymbol(symbol);
return VariableContext::expressionForSymbol(symbol);
}
template<typename T>