#ifndef SEQUENCE_CACHE_CONTEXT_H #define SEQUENCE_CACHE_CONTEXT_H #include #include "sequence_context.h" namespace Sequence { template class CacheContext : public Poincare::VariableContext { public: CacheContext(Poincare::Context * parentContext); const Poincare::Expression * expressionForSymbol(const Poincare::Symbol * symbol) override; void setValueForSymbol(T value, const Poincare::Symbol * symbol); private: int nameIndexForSymbol(const Poincare::Symbol * symbol); int rankIndexForSymbol(const Poincare::Symbol * symbol); Poincare::Complex m_values[MaxNumberOfSequences][MaxRecurrenceDepth]; }; } #endif