mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-27 01:29:58 +01:00
[apps] Build all apps
This commit is contained in:
@@ -23,9 +23,9 @@ const Expression RegressionContext::expressionForSymbol(const SymbolAbstract & s
|
||||
assert(m_seriesPairIndex >= 0);
|
||||
assert(m_seriesPairIndex < m_store->numberOfPairsOfSeries(series));
|
||||
return Float<double>(m_store->get(series, storeI, m_seriesPairIndex));
|
||||
} else {
|
||||
return m_parentContext->expressionForSymbol(symbol);
|
||||
}
|
||||
} else {
|
||||
return m_parentContext->expressionForSymbol(symbol);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Regression {
|
||||
class RegressionContext : public Shared::StoreContext {
|
||||
public:
|
||||
using Shared::StoreContext::StoreContext;
|
||||
const Poincare::Expression expressionForSymbol(const Poincare::Symbol & symbol) override;
|
||||
const Poincare::Expression expressionForSymbol(const Poincare::SymbolAbstract & symbol) override;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -21,7 +21,8 @@ const Expression CacheContext<T>::expressionForSymbol(const SymbolAbstract & sym
|
||||
&& (symbol.name()[0] == SequenceStore::k_sequenceNames[0][0] || symbol.name()[0] == SequenceStore::k_sequenceNames[1][0])
|
||||
&& (strcmp(symbol.name()+1, "(n)") == 0 || strcmp(symbol.name()+1, "(n+1)") == 0))
|
||||
{
|
||||
return Float<T>(m_values[nameIndexForSymbol(symbol)][rankIndexForSymbol(symbol)]);
|
||||
Symbol s = const_cast<Symbol &>(static_cast<const Symbol &>(symbol));
|
||||
return Float<T>(m_values[nameIndexForSymbol(s)][rankIndexForSymbol(s)]);
|
||||
}
|
||||
return VariableContext::expressionForSymbol(symbol);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ template<typename T>
|
||||
class CacheContext : public Poincare::VariableContext {
|
||||
public:
|
||||
CacheContext(Poincare::Context * parentContext);
|
||||
const Poincare::Expression expressionForSymbol(const Poincare::Symbol & symbol) override;
|
||||
const Poincare::Expression expressionForSymbol(const Poincare::SymbolAbstract & symbol) override;
|
||||
void setValueForSymbol(T value, const Poincare::Symbol & symbol);
|
||||
private:
|
||||
int nameIndexForSymbol(const Poincare::Symbol & symbol);
|
||||
|
||||
@@ -174,7 +174,7 @@ int ListController::maxNumberOfRows() {
|
||||
return k_maxNumberOfRows;
|
||||
}
|
||||
|
||||
HighlightCell * ListController::titleCells(int index) {
|
||||
FunctionTitleCell * ListController::titleCells(int index) {
|
||||
assert(index >= 0 && index < k_maxNumberOfRows);
|
||||
return &m_sequenceTitleCells[index];
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ void ListParameterController::willDisplayCellForIndex(HighlightCell * cell, int
|
||||
return;
|
||||
}
|
||||
char buffer[Sequence::k_initialRankNumberOfDigits+1];
|
||||
Integer(m_sequence->initialRank()).serialize(buffer, Sequence::k_initialRankNumberOfDigits+1);
|
||||
Poincare::Integer(m_sequence->initialRank()).serialize(buffer, Sequence::k_initialRankNumberOfDigits+1);
|
||||
myCell->setAccessoryText(buffer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,10 +45,10 @@ public:
|
||||
* context respective methods. Indeed, special chars like n, u(n), u(n+1),
|
||||
* v(n), v(n+1) are taken into accound only when evaluating sequences which
|
||||
* is done in another context. */
|
||||
const Poincare::Expression expressionForSymbol(const Poincare::Symbol & symbol) override {
|
||||
const Poincare::Expression expressionForSymbol(const Poincare::SymbolAbstract & symbol) override {
|
||||
return m_parentContext->expressionForSymbol(symbol);
|
||||
}
|
||||
void setExpressionForSymbol(const Poincare::Expression & expression, const Poincare::Symbol & symbol, Poincare::Context & context) override {
|
||||
void setExpressionForSymbol(const Poincare::Expression & expression, const Poincare::SymbolAbstract & symbol, Poincare::Context & context) override {
|
||||
m_parentContext->setExpressionForSymbol(expression, symbol, context);
|
||||
}
|
||||
template<typename T> T valueOfSequenceAtPreviousRank(int sequenceIndex, int rank) const {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define SEQUENCE_SEQUENCE_TITLE_CELL_H
|
||||
|
||||
#include "../shared/function_title_cell.h"
|
||||
#include <poincare_layouts.h>
|
||||
|
||||
namespace Sequence {
|
||||
|
||||
@@ -12,6 +13,9 @@ public:
|
||||
void setEven(bool even) override;
|
||||
void setHighlighted(bool highlight) override;
|
||||
void setColor(KDColor color) override;
|
||||
KDText::FontSize fontSize() const override {
|
||||
return Poincare::CharLayoutNode::k_defaultFontSize;
|
||||
}
|
||||
Poincare::Layout layout() const override {
|
||||
return m_titleTextView.layout();
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Statistics {
|
||||
class StatisticsContext : public Shared::StoreContext {
|
||||
public:
|
||||
using Shared::StoreContext::StoreContext;
|
||||
const Poincare::Expression expressionForSymbol(const Poincare::Symbol & symbol) override;
|
||||
const Poincare::Expression expressionForSymbol(const Poincare::SymbolAbstract & symbol) override;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -9,7 +9,8 @@ namespace Poincare {
|
||||
|
||||
class CharLayoutNode final : public LayoutNode {
|
||||
public:
|
||||
CharLayoutNode(char c = Ion::Charset::Empty, const KDFont * font = KDFont::LargeFont) :
|
||||
static constexpr KDFont * k_defaultFontSize = KDFont::LargeFont;
|
||||
CharLayoutNode(char c = Ion::Charset::Empty, const KDFont * font = k_defaultFontSize) :
|
||||
LayoutNode(),
|
||||
m_char(c),
|
||||
m_font(font)
|
||||
|
||||
Reference in New Issue
Block a user