Blame view

build3/apps/sequence/cache_context.h 659 Bytes
6663b6c9   adorian   projet complet av...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  #ifndef SEQUENCE_CACHE_CONTEXT_H
  #define SEQUENCE_CACHE_CONTEXT_H
  
  #include <poincare.h>
  #include "sequence_context.h"
  
  namespace Sequence {
  
  template<typename T>
  class CacheContext : public Poincare::VariableContext<T> {
  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<T> m_values[MaxNumberOfSequences][MaxRecurrenceDepth];
  };
  
  }
  
  #endif